diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a8c4910b15ed..6a0943145f5c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -603,9 +603,6 @@ # ServiceLabel: %Media Services # ServiceOwners: @naiteeks @bennage @giakas -# PRLabel: %Microsoft Playwright Testing -/sdk/playwrighttesting/ @puagarwa @ShreyaAnand - # ServiceLabel: %Microsoft Playwright Testing # ServiceOwners: @puagarwa @ShreyaAnand @@ -873,10 +870,10 @@ # ServiceOwners: @shahbj79 @mit2nil @aygoya @ganganarayanan # PRLabel: %Synapse -/sdk/synapse/ @yanjungao718 +/sdk/synapse/ @yanjungao718 @wanyang7 # ServiceLabel: %Synapse -# ServiceOwners: @yanjungao718 +# ServiceOwners: @yanjungao718 @wanyang7 # PRLabel: %Tables /sdk/tables/ @christothes @jorgerangel-msft @@ -1168,6 +1165,14 @@ # ServiceLabel: %Weights & Biases %Mgmt # ServiceOwners: @aggarwalsw + +# PRLabel: %Workload Orchestration +/sdk/workloadorchestration/Azure.ResourceManager.*/ @atharvau + +# ServiceLabel: %Workload Orchestration %Mgmt +# ServiceOwners: @atharvau + + # ######## Eng Sys ######## /eng/ @hallipr @weshaggard @benbp /eng/common/ @Azure/azure-sdk-eng diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 4ccba02fecdf..aa08477c6af8 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -74,6 +74,8 @@ "cpus", "cref", "Dapr", + "decompile", + "decompiled", "deduplication", "deletesas", "deserializable", @@ -1821,6 +1823,13 @@ "Akri", "Bucketized" ] + }, + { + "filename": "**/sdk/workloadorchestration/**/*.cs", + "words": [ + "Inprogress", + "Undeployed" + ] } ], "allowCompoundWords": true diff --git a/doc/GeneratorMigration/Library_Inventory.md b/doc/GeneratorMigration/Library_Inventory.md index 0bdc0e385c1e..2080a7e81dc6 100644 --- a/doc/GeneratorMigration/Library_Inventory.md +++ b/doc/GeneratorMigration/Library_Inventory.md @@ -2,26 +2,27 @@ ## Summary -- Total libraries: 408 -- Management Plane (Swagger): 168 -- Management Plane (TSP-Old): 49 +- Total libraries: 412 +- Management Plane (Swagger): 167 +- Management Plane (TSP-Old): 52 - Management Plane (TypeSpec - @azure-typespec/http-client-csharp): 0 -- Management Plane (TypeSpec - @azure-typespec/http-client-csharp-mgmt): 2 +- Management Plane (TypeSpec - @azure-typespec/http-client-csharp-mgmt): 3 - Management Plane (TypeSpec - @typespec/http-client-csharp): 0 -- Data Plane (Swagger): 114 +- Data Plane (Swagger): 115 - Data Plane (TSP-Old): 27 -- Data Plane (TypeSpec - @azure-typespec/http-client-csharp): 7 +- Data Plane (TypeSpec - @azure-typespec/http-client-csharp): 8 - Data Plane (TypeSpec - @azure-typespec/http-client-csharp-mgmt): 0 - Data Plane (TypeSpec - @typespec/http-client-csharp): 2 -- No generator: 39 +- No generator: 38 ## Data Plane Libraries using TypeSpec (@azure-typespec/http-client-csharp) -TypeSpec with @azure-typespec/http-client-csharp generator is detected by the presence of a tsp-location.yaml file with an emitterPackageJsonPath value referencing @azure-typespec/http-client-csharp, or through special handling for specific libraries. Total: 7 +TypeSpec with @azure-typespec/http-client-csharp generator is detected by the presence of a tsp-location.yaml file with an emitterPackageJsonPath value referencing @azure-typespec/http-client-csharp, or through special handling for specific libraries. Total: 8 | Service | Library | Path | | ------- | ------- | ---- | +| ai | Azure.AI.VoiceLive | sdk/ai/Azure.AI.VoiceLive | | appconfiguration | Azure.Data.AppConfiguration | sdk/appconfiguration/Azure.Data.AppConfiguration | | eventgrid | Azure.Messaging.EventGrid.Namespaces | sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces | | eventgrid | Azure.Messaging.EventGrid.SystemEvents | sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents | @@ -78,7 +79,7 @@ TypeSpec with old generator is detected by the presence of a tsp-location.yaml f ## Data Plane Libraries using Swagger -Total: 114 +Total: 115 | Service | Library | Path | | ------- | ------- | ---- | @@ -142,7 +143,6 @@ Total: 114 | monitor | Azure.Monitor.Query | sdk/monitor/Azure.Monitor.Query | | objectanchors | Azure.MixedReality.ObjectAnchors.Conversion | sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion | | personalizer | Azure.AI.Personalizer | sdk/personalizer/Azure.AI.Personalizer | -| playwrighttesting | Azure.Developer.MicrosoftPlaywrightTesting.TestLogger | sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger | | provisioning | Azure.Provisioning | sdk/provisioning/Azure.Provisioning | | provisioning | Azure.Provisioning.AppConfiguration | sdk/provisioning/Azure.Provisioning.AppConfiguration | | provisioning | Azure.Provisioning.AppContainers | sdk/provisioning/Azure.Provisioning.AppContainers | @@ -158,6 +158,8 @@ Total: 114 | provisioning | Azure.Provisioning.KeyVault | sdk/provisioning/Azure.Provisioning.KeyVault | | provisioning | Azure.Provisioning.Kubernetes | sdk/provisioning/Azure.Provisioning.Kubernetes | | provisioning | Azure.Provisioning.KubernetesConfiguration | sdk/provisioning/Azure.Provisioning.KubernetesConfiguration | +| provisioning | Azure.Provisioning.Kusto | sdk/provisioning/Azure.Provisioning.Kusto | +| provisioning | Azure.Provisioning.Network | sdk/provisioning/Azure.Provisioning.Network | | provisioning | Azure.Provisioning.OperationalInsights | sdk/provisioning/Azure.Provisioning.OperationalInsights | | provisioning | Azure.Provisioning.PostgreSql | sdk/provisioning/Azure.Provisioning.PostgreSql | | provisioning | Azure.Provisioning.Redis | sdk/provisioning/Azure.Provisioning.Redis | @@ -200,17 +202,18 @@ Total: 114 ## 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: 2 +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: 3 | Service | Library | Path | | ------- | ------- | ---- | +| computerecommender | Azure.ResourceManager.Compute.Recommender | sdk/computerecommender/Azure.ResourceManager.Compute.Recommender | | portalservices | Azure.ResourceManager.PortalServicesCopilot | sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot | | storageactions | Azure.ResourceManager.StorageActions | sdk/storageactions/Azure.ResourceManager.StorageActions | ## 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: 49 +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: 52 | Service | Library | Path | | ------- | ------- | ---- | @@ -225,11 +228,13 @@ TypeSpec with old generator is detected by the presence of a tsp-location.yaml f | connectedcache | Azure.ResourceManager.ConnectedCache | sdk/connectedcache/Azure.ResourceManager.ConnectedCache | | 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 | | dellstorage | Azure.ResourceManager.Dell.Storage | sdk/dellstorage/Azure.ResourceManager.Dell.Storage | | dependencymap | Azure.ResourceManager.DependencyMap | sdk/dependencymap/Azure.ResourceManager.DependencyMap | | deviceprovisioningservices | Azure.ResourceManager.DeviceProvisioningServices | sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices | | deviceregistry | Azure.ResourceManager.DeviceRegistry | sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry | | 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 | @@ -248,10 +253,10 @@ TypeSpec with old generator is detected by the presence of a tsp-location.yaml f | pineconevectordb | Azure.ResourceManager.PineconeVectorDB | sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB | | planetarycomputer | Azure.ResourceManager.PlanetaryComputer | sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer | | playwright | Azure.ResourceManager.Playwright | sdk/playwright/Azure.ResourceManager.Playwright | -| playwrighttesting | Azure.ResourceManager.PlaywrightTesting | sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting | | purestorageblock | Azure.ResourceManager.PureStorageBlock | sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock | | recoveryservices | Azure.ResourceManager.RecoveryServices | sdk/recoveryservices/Azure.ResourceManager.RecoveryServices | | recoveryservices-datareplication | Azure.ResourceManager.RecoveryServicesDataReplication | sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication | +| resources | Azure.ResourceManager.Resources.Bicep | sdk/resources/Azure.ResourceManager.Resources.Bicep | | secretsstoreextension | Azure.ResourceManager.SecretsStoreExtension | sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension | | selfhelp | Azure.ResourceManager.SelfHelp | sdk/selfhelp/Azure.ResourceManager.SelfHelp | | servicefabricmanagedclusters | Azure.ResourceManager.ServiceFabricManagedClusters | sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters | @@ -262,12 +267,13 @@ TypeSpec with old generator is detected by the presence of a tsp-location.yaml f | storagemover | Azure.ResourceManager.StorageMover | sdk/storagemover/Azure.ResourceManager.StorageMover | | terraform | Azure.ResourceManager.Terraform | sdk/terraform/Azure.ResourceManager.Terraform | | weightsandbiases | Azure.ResourceManager.WeightsAndBiases | sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases | +| workloadorchestration | Azure.ResourceManager.WorkloadOrchestration | sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration | | workloadssapvirtualinstance | Azure.ResourceManager.WorkloadsSapVirtualInstance | sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance | ## Management Plane Libraries using Swagger -Total: 168 +Total: 167 | Service | Library | Path | | ------- | ------- | ---- | @@ -311,7 +317,6 @@ Total: 168 | cosmosdbforpostgresql | Azure.ResourceManager.CosmosDBForPostgreSql | sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql | | costmanagement | Azure.ResourceManager.CostManagement | sdk/costmanagement/Azure.ResourceManager.CostManagement | | customer-insights | Azure.ResourceManager.CustomerInsights | sdk/customer-insights/Azure.ResourceManager.CustomerInsights | -| databox | Azure.ResourceManager.DataBox | sdk/databox/Azure.ResourceManager.DataBox | | databoxedge | Azure.ResourceManager.DataBoxEdge | sdk/databoxedge/Azure.ResourceManager.DataBoxEdge | | datadog | Azure.ResourceManager.Datadog | sdk/datadog/Azure.ResourceManager.Datadog | | datafactory | Azure.ResourceManager.DataFactory | sdk/datafactory/Azure.ResourceManager.DataFactory | @@ -443,7 +448,7 @@ Total: 168 ## Libraries with No Generator -Libraries with no generator have neither autorest.md nor tsp-location.yaml files. Total: 39 +Libraries with no generator have neither autorest.md nor tsp-location.yaml files. Total: 38 | Service | Library | Path | | ------- | ------- | ---- | @@ -475,7 +480,6 @@ Libraries with no generator have neither autorest.md nor tsp-location.yaml files | loadtestservice | Azure.Developer.Playwright.NUnit | sdk/loadtestservice/Azure.Developer.Playwright.NUnit | | modelsrepository | Azure.IoT.ModelsRepository | sdk/modelsrepository/Azure.IoT.ModelsRepository | | monitor | Azure.Monitor.OpenTelemetry.AspNetCore | sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore | -| playwrighttesting | Azure.Developer.MicrosoftPlaywrightTesting.NUnit | sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit | | provisioning | Azure.Provisioning.Deployment | sdk/provisioning/Azure.Provisioning.Deployment | | provisioning | Generator | sdk/provisioning/Generator | | servicebus | Azure.Messaging.ServiceBus | sdk/servicebus/Azure.Messaging.ServiceBus | diff --git a/eng/CodeGeneration.targets b/eng/CodeGeneration.targets index b8b6bd695718..3565942c1a60 100644 --- a/eng/CodeGeneration.targets +++ b/eng/CodeGeneration.targets @@ -5,7 +5,7 @@ <_TypeSpecProjectGenerateCommand>npx --no-install --package=@azure-tools/typespec-client-generator-cli --yes tsp-client generate --no-prompt --output-dir $(MSBuildProjectDirectory)/../ <_TypeSpecProjectSyncAndGenerateCommand>npx --no-install --package=@azure-tools/typespec-client-generator-cli --yes tsp-client update --no-prompt --output-dir $(MSBuildProjectDirectory)/../ <_SaveInputs Condition="'$(SaveInputs)' == 'true'">--save-inputs - <_Trace Condition="'$(Trace)' == 'true'">--trace @typespec/http-client-csharp @azure-typespec/http-client-csharp @azure-typespec/http-client-csharp-mgmt + <_Trace Condition="'$(Trace)' == 'true'">--trace @typespec/http-client-csharp @azure-typespec/http-client-csharp @azure-typespec/http-client-csharp-mgmt --debug $(TypespecAdditionalOptions)%3Bgenerate-test-project=true generate-test-project=true diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index edf3606364fb..85af6e9936a0 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -205,7 +205,7 @@ - + @@ -297,7 +297,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + @@ -466,7 +466,7 @@ 1.0.0-dev.20250805.1 - 1.0.0-alpha.20250908.5 + 1.0.0-alpha.20250918.1 1.0.0-alpha.20250903.2 \ 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 2ffa540a8a1b..af851f369304 100644 --- a/eng/azure-typespec-http-client-csharp-emitter-package-lock.json +++ b/eng/azure-typespec-http-client-csharp-emitter-package-lock.json @@ -5,38 +5,38 @@ "packages": { "": { "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250908.4" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250912.2" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/versioning": "0.73.0" + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/versioning": "0.74.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.59.0.tgz", - "integrity": "sha512-3vTWDTSR+P0qeyFcOKTgXortNOeA3nsyKTPpZqfFZVTtNFiiO17UWAM2Eg3i0IpNQ3qxMMAksIkwt1bqltTDqA==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.59.0.tgz", - "integrity": "sha512-q0UkBnwWE4+9ivAkwAOOrDF9kvSb+qRIvMXJdUlqGfwFqDkOvQFwHSzSDeL/mBNK2fB9NIePKPFjDGP9lpC0vQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", "dev": true, "license": "MIT", "dependencies": { @@ -47,34 +47,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.59.0.tgz", - "integrity": "sha512-+eKYH25ptj6SZHT+/YfxrX+g6HMAQQTphmHmqOoRCbbfPaE8l855OaDrwEgh5NDLV8WXnHpzTNI0dsYipEp10g==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.60.0.tgz", + "integrity": "sha512-4sx9StBWkmnBfLJ9b23RSwCs0TkTElaU9+6a/cS6JS0F7UggP/KLQd6LG59D0u9ByXM2x9pvYPO8l/K7UOXoPg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.59.0.tgz", - "integrity": "sha512-5+pVcOr7Uyq4IaZ3oLjLi8jnBuR+t/B8hQF4CZo+goe/uK+WkmDfw1TlY14G2ve7W7v8m9+Sk2nil6bN1uHWEQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -85,25 +85,25 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/sse": "^0.73.0", - "@typespec/streams": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250908.4", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250908.4.tgz", - "integrity": "sha512-/rfnpFY0Sm4JZJP3AtSQb6zvRfMghZ4bbgCKH8hkD65t4UQKKVwvBgHv68MXEg0QsPvkZDWi4qFgJ/kYP0SXVw==", + "version": "1.0.0-alpha.20250912.2", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250912.2.tgz", + "integrity": "sha512-RImdae8o0zJRTVo2dOx8tLY7t59IqNjlaYuqSVvSoyJgEH9XT6Fb3MyhCUpKbnNfLUq/qAq2LdHsEeqSwrKWbw==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250908.5" + "@typespec/http-client-csharp": "1.0.0-alpha.20250912.2" } }, "node_modules/@babel/code-frame": { @@ -514,9 +514,9 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.3.0.tgz", - "integrity": "sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.27.1", @@ -546,29 +546,29 @@ } }, "node_modules/@typespec/events": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.73.0.tgz", - "integrity": "sha512-etlhp86amDaElD/UX27u9I4O58zREov73HkkV3xbdTWpv2RqOKyD3mkyGAWsW3hKaGVIxwHOvKcOZ2j+b07Gpw==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.3.0.tgz", - "integrity": "sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -577,99 +577,98 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250908.5", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250908.5.tgz", - "integrity": "sha512-zB3QrNQWBi248oYUIwnfnMDmxZLpNblNXZMzYdM3PzandepZAo0U+AWLaeovEPnGvIi8shEt3CmhbJAouil3qA==", + "version": "1.0.0-alpha.20250912.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250912.2.tgz", + "integrity": "sha512-N3rMrsOj1jXw8dMBCvcNelLEGw+y3divFUAgYOMLM+1xYYhs34525MS7z2L8k2wLv81crW40BwRC7OzQnDjeDQ==", "license": "MIT", "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/streams": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/versioning": ">=0.73.0 <0.74.0 || ~0.74.0-0" + "@azure-tools/typespec-client-generator-core": ">=0.60.0 < 0.61.0 || ~0.61.0-0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/streams": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/versioning": ">=0.74.0 <0.75.0 || ~0.75.0-0" } }, "node_modules/@typespec/openapi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.3.0.tgz", - "integrity": "sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/rest": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.73.0.tgz", - "integrity": "sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/sse": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.73.0.tgz", - "integrity": "sha512-WTnRJ1b1M3RPzlHxhnK9sh6+AGKPKWpuA0TSAqzyxb/uRHFYLNeoDKPOnlQ749SJ8lJz71Oh0nUsP3vB0EzO6Q==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" } }, "node_modules/@typespec/streams": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.73.0.tgz", - "integrity": "sha512-pL4xffHXEIhBQKPlB9L4AKuM0bn44WsGKjnz91wa6wBtP/CbsPrGQicof0Z7GPGdddtDi4G8PWGmJtVFw53V9g==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/versioning": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.73.0.tgz", - "integrity": "sha512-cfFvzTsvsu4VpdwZcRULr3p/fawKZnjiJClQxlLcYW0dLs/5k5jh7l0YyPkYvgkOcncUrIB6hIu82tQhKrMDKQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/xml": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.73.0.tgz", - "integrity": "sha512-vlMM8/L22O/PbI3ovj3qoww/3Z8wNwn7og4jzlGRM93jZBJvrOeDSwZo1Dc4rMJyU6KfjPkP3/l5TLbgW8x0zA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/ajv": { @@ -976,9 +975,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.1.tgz", - "integrity": "sha512-R1QfovbPsKmosqTnPoRFiJ7CF9MLRgb53ChvMZm+r4p76/+8yKDy17qLL2PKInORy2RkZZekuK0efYgmzTkXyQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "license": "MIT", "engines": { "node": ">=18" diff --git a/eng/azure-typespec-http-client-csharp-emitter-package.json b/eng/azure-typespec-http-client-csharp-emitter-package.json index cae332042744..07614f15c8a9 100644 --- a/eng/azure-typespec-http-client-csharp-emitter-package.json +++ b/eng/azure-typespec-http-client-csharp-emitter-package.json @@ -1,17 +1,17 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250908.4" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250912.2" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/versioning": "0.73.0" + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/versioning": "0.74.0" } } \ No newline at end of file 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 f064fb9ac8c4..ca3e3820c50a 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,39 +5,39 @@ "packages": { "": { "dependencies": { - "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20250902.3" + "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20250917.2" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@azure-tools/typespec-liftr-base": "0.8.0", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/versioning": "0.73.0" + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/versioning": "0.74.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.59.0.tgz", - "integrity": "sha512-3vTWDTSR+P0qeyFcOKTgXortNOeA3nsyKTPpZqfFZVTtNFiiO17UWAM2Eg3i0IpNQ3qxMMAksIkwt1bqltTDqA==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.59.0.tgz", - "integrity": "sha512-q0UkBnwWE4+9ivAkwAOOrDF9kvSb+qRIvMXJdUlqGfwFqDkOvQFwHSzSDeL/mBNK2fB9NIePKPFjDGP9lpC0vQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", "dev": true, "license": "MIT", "dependencies": { @@ -48,34 +48,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.59.0.tgz", - "integrity": "sha512-+eKYH25ptj6SZHT+/YfxrX+g6HMAQQTphmHmqOoRCbbfPaE8l855OaDrwEgh5NDLV8WXnHpzTNI0dsYipEp10g==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.60.0.tgz", + "integrity": "sha512-4sx9StBWkmnBfLJ9b23RSwCs0TkTElaU9+6a/cS6JS0F7UggP/KLQd6LG59D0u9ByXM2x9pvYPO8l/K7UOXoPg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.59.0.tgz", - "integrity": "sha512-5+pVcOr7Uyq4IaZ3oLjLi8jnBuR+t/B8hQF4CZo+goe/uK+WkmDfw1TlY14G2ve7W7v8m9+Sk2nil6bN1uHWEQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -86,16 +86,16 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/sse": "^0.73.0", - "@typespec/streams": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure-tools/typespec-liftr-base": { @@ -105,21 +105,21 @@ "dev": true }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250826.3", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250826.3.tgz", - "integrity": "sha512-SqorEOJQc38rpXNsz/H4GDHVhi5NvTb7I8qCoF3lSuAL9D0kcmutq56qarwsV0xHATnhB5TnUcwfDJLGWQNI0Q==", + "version": "1.0.0-alpha.20250912.2", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250912.2.tgz", + "integrity": "sha512-RImdae8o0zJRTVo2dOx8tLY7t59IqNjlaYuqSVvSoyJgEH9XT6Fb3MyhCUpKbnNfLUq/qAq2LdHsEeqSwrKWbw==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250826.5" + "@typespec/http-client-csharp": "1.0.0-alpha.20250912.2" } }, "node_modules/@azure-typespec/http-client-csharp-mgmt": { - "version": "1.0.0-alpha.20250902.3", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp-mgmt/-/http-client-csharp-mgmt-1.0.0-alpha.20250902.3.tgz", - "integrity": "sha512-exEqJj/OB0om0q2PGKpIsQUPxTlYAUkd/RJd82CxneQR0l7zlK3+zftaIrvuIGu3x7agWjzKWDKvkE4Wo529qg==", + "version": "1.0.0-alpha.20250917.2", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp-mgmt/-/http-client-csharp-mgmt-1.0.0-alpha.20250917.2.tgz", + "integrity": "sha512-9+4BH19MHoAPUJfUf/Pc7yYQyXHdBTaCBv4E9tH/l6uwlshAaTBT+pXpa1Kq9+JAXaDtjiNcyRom+vPx7+vu3A==", "license": "MIT", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250826.3" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250912.2" } }, "node_modules/@babel/code-frame": { @@ -145,16 +145,25 @@ "node": ">=6.9.0" } }, + "node_modules/@inquirer/ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz", + "integrity": "sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.2.tgz", - "integrity": "sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz", + "integrity": "sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -170,12 +179,12 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.16", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.16.tgz", - "integrity": "sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==", + "version": "5.1.18", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.18.tgz", + "integrity": "sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -191,14 +200,14 @@ } }, "node_modules/@inquirer/core": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", - "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz", + "integrity": "sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==", "license": "MIT", "dependencies": { + "@inquirer/ansi": "^1.0.0", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", @@ -218,13 +227,13 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.18", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", - "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", + "version": "4.2.20", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz", + "integrity": "sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", - "@inquirer/external-editor": "^1.0.1", + "@inquirer/core": "^10.2.2", + "@inquirer/external-editor": "^1.0.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -240,12 +249,12 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.18.tgz", - "integrity": "sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz", + "integrity": "sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, @@ -262,13 +271,13 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", - "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", "license": "MIT", "dependencies": { "chardet": "^2.1.0", - "iconv-lite": "^0.6.3" + "iconv-lite": "^0.7.0" }, "engines": { "node": ">=18" @@ -292,12 +301,12 @@ } }, "node_modules/@inquirer/input": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.2.tgz", - "integrity": "sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz", + "integrity": "sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -313,12 +322,12 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.18.tgz", - "integrity": "sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz", + "integrity": "sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -334,14 +343,14 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.18.tgz", - "integrity": "sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz", + "integrity": "sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", - "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -356,21 +365,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.4.tgz", - "integrity": "sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.6.tgz", + "integrity": "sha512-68JhkiojicX9SBUD8FE/pSKbOKtwoyaVj1kwqLfvjlVXZvOy3iaSWX4dCLsZyYx/5Ur07Fq+yuDNOen+5ce6ig==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.2.2", - "@inquirer/confirm": "^5.1.16", - "@inquirer/editor": "^4.2.18", - "@inquirer/expand": "^4.0.18", - "@inquirer/input": "^4.2.2", - "@inquirer/number": "^3.0.18", - "@inquirer/password": "^4.0.18", - "@inquirer/rawlist": "^4.1.6", - "@inquirer/search": "^3.1.1", - "@inquirer/select": "^4.3.2" + "@inquirer/checkbox": "^4.2.4", + "@inquirer/confirm": "^5.1.18", + "@inquirer/editor": "^4.2.20", + "@inquirer/expand": "^4.0.20", + "@inquirer/input": "^4.2.4", + "@inquirer/number": "^3.0.20", + "@inquirer/password": "^4.0.20", + "@inquirer/rawlist": "^4.1.8", + "@inquirer/search": "^3.1.3", + "@inquirer/select": "^4.3.4" }, "engines": { "node": ">=18" @@ -385,12 +394,12 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.6.tgz", - "integrity": "sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz", + "integrity": "sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, @@ -407,12 +416,12 @@ } }, "node_modules/@inquirer/search": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.1.tgz", - "integrity": "sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz", + "integrity": "sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" @@ -430,15 +439,15 @@ } }, "node_modules/@inquirer/select": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.2.tgz", - "integrity": "sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz", + "integrity": "sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -530,9 +539,9 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.3.0.tgz", - "integrity": "sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.27.1", @@ -562,29 +571,29 @@ } }, "node_modules/@typespec/events": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.73.0.tgz", - "integrity": "sha512-etlhp86amDaElD/UX27u9I4O58zREov73HkkV3xbdTWpv2RqOKyD3mkyGAWsW3hKaGVIxwHOvKcOZ2j+b07Gpw==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.3.0.tgz", - "integrity": "sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -593,99 +602,98 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250826.5", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250826.5.tgz", - "integrity": "sha512-KE1t7KqgT5pjrlvXUDChBO/9dExXxSF+ZjdVkqMn2w/tNHWrefYwkZ2QZ6lU3Xeix0JhPeY18LVF7L14MB6lIQ==", + "version": "1.0.0-alpha.20250912.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250912.2.tgz", + "integrity": "sha512-N3rMrsOj1jXw8dMBCvcNelLEGw+y3divFUAgYOMLM+1xYYhs34525MS7z2L8k2wLv81crW40BwRC7OzQnDjeDQ==", "license": "MIT", "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/streams": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/versioning": ">=0.73.0 <0.74.0 || ~0.74.0-0" + "@azure-tools/typespec-client-generator-core": ">=0.60.0 < 0.61.0 || ~0.61.0-0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/streams": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/versioning": ">=0.74.0 <0.75.0 || ~0.75.0-0" } }, "node_modules/@typespec/openapi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.3.0.tgz", - "integrity": "sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/rest": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.73.0.tgz", - "integrity": "sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/sse": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.73.0.tgz", - "integrity": "sha512-WTnRJ1b1M3RPzlHxhnK9sh6+AGKPKWpuA0TSAqzyxb/uRHFYLNeoDKPOnlQ749SJ8lJz71Oh0nUsP3vB0EzO6Q==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" } }, "node_modules/@typespec/streams": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.73.0.tgz", - "integrity": "sha512-pL4xffHXEIhBQKPlB9L4AKuM0bn44WsGKjnz91wa6wBtP/CbsPrGQicof0Z7GPGdddtDi4G8PWGmJtVFw53V9g==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/versioning": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.73.0.tgz", - "integrity": "sha512-cfFvzTsvsu4VpdwZcRULr3p/fawKZnjiJClQxlLcYW0dLs/5k5jh7l0YyPkYvgkOcncUrIB6hIu82tQhKrMDKQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/xml": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.73.0.tgz", - "integrity": "sha512-vlMM8/L22O/PbI3ovj3qoww/3Z8wNwn7og4jzlGRM93jZBJvrOeDSwZo1Dc4rMJyU6KfjPkP3/l5TLbgW8x0zA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/ajv": { @@ -704,21 +712,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -800,9 +793,9 @@ } }, "node_modules/cliui/node_modules/ansi-regex": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz", - "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { "node": ">=12" @@ -812,9 +805,9 @@ } }, "node_modules/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", "engines": { "node": ">=12" @@ -847,9 +840,9 @@ } }, "node_modules/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -862,9 +855,9 @@ } }, "node_modules/cliui/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", "dependencies": { "ansi-styles": "^6.2.1", @@ -992,9 +985,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.1.tgz", - "integrity": "sha512-R1QfovbPsKmosqTnPoRFiJ7CF9MLRgb53ChvMZm+r4p76/+8yKDy17qLL2PKInORy2RkZZekuK0efYgmzTkXyQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "license": "MIT", "engines": { "node": ">=18" @@ -1036,15 +1029,19 @@ } }, "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ignore": { @@ -1423,18 +1420,6 @@ "node": ">=8.0" } }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unicorn-magic": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", @@ -1561,9 +1546,9 @@ } }, "node_modules/yargs/node_modules/ansi-regex": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz", - "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { "node": ">=12" @@ -1596,9 +1581,9 @@ } }, "node_modules/yargs/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" 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 707d5ede0bf3..ab03b629a592 100644 --- a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json +++ b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json @@ -1,18 +1,18 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20250902.3" + "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20250917.2" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@azure-tools/typespec-liftr-base": "0.8.0", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/versioning": "0.73.0" + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/versioning": "0.74.0" } } \ No newline at end of file diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index fa55d8edb0ff..6cf05521925b 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -1,5 +1,10 @@ +> **Important Note for LLM** +> Backend processes may use Azure DevOps work item data as needed. However, do **not** mention or display the work item link/URL, or any reference to Azure DevOps work item resources directly in conversation with the user. +> All manual updates to an existing release plan must be made through the [Release Planner Tool](https://aka.ms/sdk-release-planner) to ensure proper tracking and validation. +> Only provide release plan details such as **Release Plan Link** and **Release Plan ID** to the user + # Release Plan Creation Process -You goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below. +Your goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below. Follow these steps in order to create or manage a release plan for an API specification pull request: ## Step 1: Validate Prerequisites diff --git a/eng/common/instructions/azsdk-tools/create-sdk-locally.instructions.md b/eng/common/instructions/azsdk-tools/create-sdk-locally.instructions.md deleted file mode 100644 index 20cc2f31bd5d..000000000000 --- a/eng/common/instructions/azsdk-tools/create-sdk-locally.instructions.md +++ /dev/null @@ -1,32 +0,0 @@ -Your goal is to help guide the user to create SDK locally for TypeSpec changes. This is currently supported for **Python** only. User can generate SDK for other languages using SDK generation pipeline. -## Steps to create Python SDK locally from TypeSpec -### Step 1: Check for existing azure-sdk-for-python repository -- Prompt the user to provide the path to their cloned azure-sdk-for-python repository. -### Step 2: Validate repository path -- If the user provides a path to the azure-sdk-for-python repository: - - Check if the repository exists at the specified path. - - If the repository exists, proceed to Step 5. -### Step 3: Guide user to set up azure-sdk-for-python repository (if not found) -- If the user does not have the repository or the path is invalid: - - Go to parent directory of current repo root path. - - Provide instructions to fork https://github.com/Azure/azure-sdk-for-python repository to the user's GitHub account. - - Provide instructions to clone the forked repository to the local machine: - ```bash - git clone https://github.com//azure-sdk-for-python.git - ``` -### Step 4: Set repository path -- Consider the cloned path as the path to the azure-sdk-for-python repository. -### Step 5: Open azure-sdk-for-python repository in VSCode -- Do not ask the user to run tsp compile. -- Prompt user to open the azure-sdk-for-python repository in VSCode. -### Step 6: Provide SDK generation instructions -- Inform user to use the following prompt to start SDK generation using GitHub Copilot agent: - ``` - "Help me generate SDK for Python from TypeSpec API specification for project ." - ``` -### Step 7: Inform user about SDK generation -- Inform user to provide link to SDK pull request if they generate SDK locally and created a pull request for it. SDK generation -step below will skip it for the language and reuse the pull request link provided by the user. -- In some cases, user will come back and make more changes to TypeSpec so start the process from step 1 again. -- If user provides a link to SDK pull request then link SDK pull request to release plan if a release plan already exists and skip SDK generation for that language. -- If a release plan does not exits then link the SDK pull request when release plan is created. diff --git a/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md b/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md new file mode 100644 index 000000000000..0edadd191604 --- /dev/null +++ b/eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md @@ -0,0 +1,119 @@ +--- +description: "Guide the user to generate and build SDKs locally for a TypeSpec based API spec" +--- + +# Goal + +Help the user generate and build SDKs locally from TypeSpec API specifications using the `azure-sdk-mcp` tools. + +--- + +## Part A: Generate SDK Locally + +### Step 1: Outline workflow + +**Goal**: Ensure the user understands the overall SDK generation and build process before starting. +**Actions**: + +- Present the high-level steps involved in generating and building SDK locally: + 1. Select target language + 2. Verify SDK repository + 3. Validate repository path + 4. Identify path to configuration file + 5. Generate SDK using `azsdk_package_generate_code` MCP tool + 6. Identify SDK project path + 7. Build/Compile SDK using `azsdk_package_build_code` MCP tool +- Ask the user to confirm readiness to proceed. + +--- + +### Step 2: Select language + +**Goal**: Confirm the target language for SDK generation. +**Actions**: + +- Prompt user to choose one of the supported languages: + - .NET + - Java + - JavaScript + - Python + - Go +- Validate input against the allowed list. + +--- + +### Step 3: Verify SDK repository + +**Goal**: Ensure the correct Azure SDK language repository is available locally. +**Actions**: + +- Prompt user to provide the path to their **locally cloned repository** for the selected language. +- Note: The **local folder name can be arbitrary**, but the repository must have originated from one of the official Azure SDK repositories: + - `azure-sdk-for-net` (.NET) + - `azure-sdk-for-java` (Java) + - `azure-sdk-for-js` (JavaScript) + - `azure-sdk-for-python` (Python) + - `azure-sdk-for-go` (Go) +- If the repository is not cloned → instruct user to clone the appropriate remote repository from GitHub. +- MCP tool will automatically validate the remote origin and repository structure. + +--- + +### Step 4: Validate repository path + +**Actions**: + +- Check if the provided repository path exists and matches the selected SDK language repository. +- If invalid → prompt user to re-enter a valid path. + +--- + +### Step 5: Identify path to configuration file + +**Goal**: Determine the correct path to the TypeSpec configuration file based on the working context. +**Actions**: + +- **Scenario A: Working in a repository cloned from `azure-rest-api-specs`** + - Identify the path to `tspconfig.yaml` (local path or HTTPS URL). + - The local folder name can be arbitrary; the MCP tool will validate that the remote origin URL points to the official `azure-rest-api-specs` repository. + - Example paths (pointing directly to tspconfig.yaml): + - `/home/usr/azure-rest-api-specs/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml` + - `https://github.com/Azure/azure-rest-api-specs/blob/4af373fc5826cf5a2365a20dde01c4b2efde48f0/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml` + +- **Scenario B: Working in one of the official Azure SDK language repositories** + (i.e., originally cloned from `azure-sdk-for-net`, `azure-sdk-for-java`, `azure-sdk-for-js`, `azure-sdk-for-python`, `azure-sdk-for-go`) + - Identify the path to `tsp-location.yaml`. + - The local folder name can be arbitrary; MCP tool will validate the remote origin URL. + - Example path: + `/home/usr/azure-sdk-for-net/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml` + +--- + +### Step 6: Generate SDK + +**Actions**: + +- Run `azsdk_package_generate_code` MCP tool to generate the SDK locally. + +--- + +## Part B: Build / Compile SDK Locally + +### Step 1: Identify SDK project path + +**Goal**: Locate the generated SDK project directory for building/compiling. +**Actions**: + +- Find the project directory inside the selected Azure SDK language repository. +- Typical structure: + `sdk/{service-name}/{package-name}/` +- Example: + `/path/to/azure-sdk-for-net/contoso/Azure.ResourceManager.Contoso/` + +--- + +### Step 2: Build/Compile the SDK + +**Actions**: + +- Run `azsdk_package_build_code` MCP tool to compile the SDK in the identified project directory. diff --git a/eng/common/instructions/azsdk-tools/sdk-details-in-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/sdk-details-in-release-plan.instructions.md index d6574bb8bd95..c88a598ed1a9 100644 --- a/eng/common/instructions/azsdk-tools/sdk-details-in-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/sdk-details-in-release-plan.instructions.md @@ -5,13 +5,16 @@ description: 'Identify languages configured in the TypeSpec project and add it t **Goal**: Identify languages configured in the TypeSpec project and generate the json object with language and package name. 1. Identify the language emitter configuration in the `tspconfig.yaml` file in the TypeSpec project root. 2. Identify the package name or namespace for each language emitter. + - For Java and Python, use `emitter-output-dir` for package name if it exists. Otherwise use `package-dir` to get the package name as fallback approach. + - For .NET, use namespace property to get package name. + - For JavaScript, use `packagedetails:name` property to get package name. + - For Go, use module name and remove `github.com/Azure/azure-sdk-for-go/` to get package name 3. Map the language name in emitter to one of the following in Pascal case(except .NET): - .NET - Java - Python - JavaScript - Go -4. Remove `github.com/Azure/azure-sdk-for-go/` from Go package name. 4. Create a JSON array object with the following structure: ```json [ diff --git a/eng/common/instructions/azsdk-tools/typespec-docs.instructions.md b/eng/common/instructions/azsdk-tools/typespec-docs.instructions.md new file mode 100644 index 000000000000..314555691f74 --- /dev/null +++ b/eng/common/instructions/azsdk-tools/typespec-docs.instructions.md @@ -0,0 +1,11 @@ +Your goal is to provide the most up-to-date documentation on the TypeSpec language, core libraries, and writing Azure services and clients in TypeSpec. Whenever a user asks a question about how something should be written in TypeSpec, you should use the documentation links below to pinpoint the most relevant and accurate information. + +## TypeSpec Azure + +- https://azure.github.io/typespec-azure/docs/llms.txt contains an index of up-to-date documentation for TypeSpec Azure libraries, including how to write service specifications for Azure Resource Manager (ARM) and Azure Data Plane services, as well as how to customize generated clients. +- Always refer to https://azure.github.io/typespec-azure/docs/llms.txt when a user asks TypeSpec related questions in case there is existing documentation that can help answer them. This also applies when a user asks to make changes to TypeSpec specifications. + +## TypeSpec documentation + +- https://typespec.io/docs/llms.txt contains an index of up-to-date documentation for TypeSpec language basics and core libraries, including how concepts like visibility and versioning work. +- Always refer to https://typespec.io/docs/llms.txt when a user asks TypeSpec related questions that aren't covered by the TypeSpec Azure topics. diff --git a/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md b/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md index b8a8eb6b90ae..dbeb8cb8f157 100644 --- a/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md +++ b/eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md @@ -1,7 +1,11 @@ --- description: 'Generate SDKs from TypeSpec' --- -Your goal is to guide user through the process of generating SDKs from TypeSpec projects. Show all the high level steps to the user to ensure they understand the flow. Use the provided tools to perform actions and gather information as needed. +Your goal is to guide the user through the process of generating SDKs from TypeSpec projects. **Before starting**, show all the high level steps to the user and ask: + +> "Would you like to begin the SDK generation process now? (yes/no)" + +Wait for the user to respond with a confirmation before proceeding to Step 1. Use the provided tools to perform actions and gather information as needed. ## Step 1: Identify TypeSpec Project **Goal**: Locate the TypeSpec project root path @@ -53,10 +57,12 @@ Your goal is to guide user through the process of generating SDKs from TypeSpec **Goal**: Determine how to generate SDKs **Actions**: 1. Present options: "How would you like to generate SDKs?" - - Option A: "Generate SDK locally". This is currently supported only for Python. Do not recommend this for other languages. + - Option A: "Generate SDK locally". - Option B: "Use SDK generation pipeline" 2. Based on selection: - - If Option A: Refer to #file:create-sdk-locally.instructions.md and then proceed to Step 6 + - If Option A: + - Follow #file:./local-sdk-workflow.instructions.md to generate and compile the SDK. + - After SDK has been generated, to continue the SDK release, users can create the SDK pull request manually then proceed to Step 9. - If Option B: Continue to Step 6 **Success Criteria**: SDK generation method selected diff --git a/eng/common/scripts/Helpers/Resource-Helpers.ps1 b/eng/common/scripts/Helpers/Resource-Helpers.ps1 index 546c5dd9aaed..f124ff217d40 100644 --- a/eng/common/scripts/Helpers/Resource-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Resource-Helpers.ps1 @@ -38,6 +38,32 @@ function Get-PurgeableGroupResources { $purgeableResources += $deletedKeyVaults } + Write-Verbose "Retrieving AI resources from resource group $ResourceGroupName" + + # Get AI resources that will go into soft-deleted state when the resource group is deleted + $subscriptionId = (Get-AzContext).Subscription.Id + $aiResources = @() + + # Get active Cognitive Services accounts from the resource group + $response = Invoke-AzRestMethod -Method GET -Path "/subscriptions/$subscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.CognitiveServices/accounts?api-version=2024-10-01" -ErrorAction Ignore + if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300 -and $response.Content) { + $content = $response.Content | ConvertFrom-Json + + foreach ($r in $content.value) { + $aiResources += [pscustomobject] @{ + AzsdkResourceType = "Cognitive Services ($($r.kind))" + AzsdkName = $r.name + Name = $r.name + Id = $r.id + } + } + } + + if ($aiResources) { + Write-Verbose "Found $($aiResources.Count) AI resources to potentially purge after resource group deletion." + $purgeableResources += $aiResources + } + return $purgeableResources } @@ -94,6 +120,29 @@ function Get-PurgeableResources { } catch { } + Write-Verbose "Retrieving deleted Cognitive Services accounts from subscription $subscriptionId" + + # Get deleted Cognitive Services accounts for the current subscription. + $response = Invoke-AzRestMethod -Method GET -Path "/subscriptions/$subscriptionId/providers/Microsoft.CognitiveServices/deletedAccounts?api-version=2024-10-01" -ErrorAction Ignore + if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300 -and $response.Content) { + $content = $response.Content | ConvertFrom-Json + + $deletedCognitiveServices = @() + foreach ($r in $content.value) { + $deletedCognitiveServices += [pscustomobject] @{ + AzsdkResourceType = "Cognitive Services ($($r.kind))" + AzsdkName = $r.name + Name = $r.name + Id = $r.id + } + } + + if ($deletedCognitiveServices) { + Write-Verbose "Found $($deletedCognitiveServices.Count) deleted Cognitive Services accounts to potentially purge." + $purgeableResources += $deletedCognitiveServices + } + } + return $purgeableResources } @@ -117,16 +166,18 @@ filter Remove-PurgeableResources { } $subscriptionId = (Get-AzContext).Subscription.Id + $verboseFlag = $VerbosePreference -eq 'Continue' foreach ($r in $Resource) { - Log "Attempting to purge $($r.AzsdkResourceType) '$($r.AzsdkName)'" switch ($r.AzsdkResourceType) { 'Key Vault' { if ($r.EnablePurgeProtection) { - Write-Warning "Key Vault '$($r.VaultName)' has purge protection enabled and may not be purged until $($r.ScheduledPurgeDate)" + Write-Verbose "Key Vault '$($r.VaultName)' has purge protection enabled and may not be purged until $($r.ScheduledPurgeDate)" -Verbose:$verboseFlag continue } + Log "Attempting to purge $($r.AzsdkResourceType) '$($r.AzsdkName)'" + # Use `-AsJob` to start a lightweight, cancellable job and pass to `Wait-PurgeableResoruceJob` for consistent behavior. Remove-AzKeyVault -VaultName $r.VaultName -Location $r.Location -InRemovedState -Force -ErrorAction Continue -AsJob ` | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru @@ -134,16 +185,18 @@ filter Remove-PurgeableResources { 'Managed HSM' { if ($r.EnablePurgeProtection) { - Write-Warning "Managed HSM '$($r.Name)' has purge protection enabled and may not be purged until $($r.ScheduledPurgeDate)" + Write-Verbose "Managed HSM '$($r.Name)' has purge protection enabled and may not be purged until $($r.ScheduledPurgeDate)" -Verbose:$verboseFlag continue } + Log "Attempting to purge $($r.AzsdkResourceType) '$($r.AzsdkName)'" + # Use `GetNewClosure()` on the `-Action` ScriptBlock to make sure variables are captured. Invoke-AzRestMethod -Method POST -Path "/subscriptions/$subscriptionId/providers/Microsoft.KeyVault/locations/$($r.Location)/deletedManagedHSMs/$($r.Name)/purge?api-version=2023-02-01" -ErrorAction Ignore -AsJob ` | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru -Action { param ( $response ) if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300) { - Write-Warning "Successfully requested that Managed HSM '$($r.Name)' be purged, but may take a few minutes before it is actually purged." + Write-Verbose "Successfully requested that Managed HSM '$($r.Name)' be purged, but may take a few minutes before it is actually purged." -Verbose:$verboseFlag } elseif ($response.Content) { $content = $response.Content | ConvertFrom-Json @@ -155,6 +208,22 @@ filter Remove-PurgeableResources { }.GetNewClosure() } + { $_.StartsWith('Cognitive Services') } + { + Log "Attempting to purge $($r.AzsdkResourceType) '$($r.AzsdkName)'" + # Use `GetNewClosure()` on the `-Action` ScriptBlock to make sure variables are captured. + Invoke-AzRestMethod -Method DELETE -Path "$($r.id)?api-version=2024-10-01" -ErrorAction Ignore -AsJob ` + | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru -Action { + param ( $response ) + + if ($response.StatusCode -eq 200 -or $response.StatusCode -eq 202 -or $response.StatusCode -eq 204) { + Write-Verbose "Successfully purged $($r.AzsdkResourceType) '$($r.Name)'." -Verbose:$verboseFlag + } else { + Write-Warning "Failed purging $($r.AzsdkResourceType) '$($r.Name)' with status code $($response.StatusCode)." + } + }.GetNewClosure() + } + default { Write-Warning "Cannot purge $($r.AzsdkResourceType) '$($r.AzsdkName)'. Add support to https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/Helpers/Resource-Helpers.ps1." } diff --git a/eng/common/scripts/Prepare-Release.ps1 b/eng/common/scripts/Prepare-Release.ps1 old mode 100644 new mode 100755 index e82c5982ac96..b3990671deea --- a/eng/common/scripts/Prepare-Release.ps1 +++ b/eng/common/scripts/Prepare-Release.ps1 @@ -1,3 +1,5 @@ +#!/usr/bin/env pwsh + #Requires -Version 6.0 <# diff --git a/eng/common/tsp-client/README.md b/eng/common/tsp-client/README.md new file mode 100644 index 000000000000..c0a6076a4b87 --- /dev/null +++ b/eng/common/tsp-client/README.md @@ -0,0 +1,80 @@ +# TypeSpec Client Generator CLI + +This directory contains npm package definitions for `@azure-tools/typespec-client-generator-cli` (tsp-client) with pinned versions to ensure reproducible builds across environments. + +## Files + +- **`package.json`** - npm package definition with pinned tsp-client version +- **`package-lock.json`** - Lock file ensuring exact dependency versions + +## Prerequisites + +- **Node.js** (with npm) - Required to install and run tsp-client + +## Installation + +### Install dependencies + +```bash +# Navigate to this directory +cd eng/common/tsp-client + +# Install dependencies +npm ci +``` + +## Usage + +After installation, you can run tsp-client by navigating to the directory and using npm exec: + +```bash +cd eng/common/tsp-client + +# Get help +npm exec --no -- tsp-client --help + +# Check version +npm exec --no -- tsp-client version + +# Generate client code +npm exec --no -- tsp-client generate --output-dir ./generated + +# Initialize a new project +npm exec --no -- tsp-client init --tsp-config ./tspconfig.yaml +``` + +## CI/CD Best Practices + +```bash +cd eng/common/tsp-client +npm ci +npm exec --no -- tsp-client init --update-if-exists --tsp-config https://github.com/Azure/azure-rest-api-specs/blob/dee71463cbde1d416c47cf544e34f7966a94ddcb/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml +``` + +## Package Management + +### Automatic Updates via Dependabot + +Dependabot is configured to automatically check for updates to `@azure-tools/typespec-client-generator-cli` daily and create pull requests with updated `package.json` and `package-lock.json` files. This ensures the package stays current with the latest versions while maintaining security through the PR review process. + +### Manual Version Updates + +If you need to manually update the tsp-client version: + +1. Edit `package.json` to update the version: + + ```json + { + "dependencies": { + "@azure-tools/typespec-client-generator-cli": "0.28.1" + } + } + ``` + +2. Update the lock file: + + ```bash + npm install + ``` + +3. Commit both `package.json` and `package-lock.json` diff --git a/eng/common/tsp-client/package-lock.json b/eng/common/tsp-client/package-lock.json new file mode 100644 index 000000000000..9016712410c3 --- /dev/null +++ b/eng/common/tsp-client/package-lock.json @@ -0,0 +1,2290 @@ +{ + "name": "tools", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@azure-tools/typespec-client-generator-cli": "0.28.1" + } + }, + "node_modules/@autorest/codemodel": { + "version": "4.20.1", + "resolved": "https://registry.npmjs.org/@autorest/codemodel/-/codemodel-4.20.1.tgz", + "integrity": "sha512-MdI4G0EdQ8yOxGzgT1rCOXxXkCrUQLjVykOvdAyByIgHbnpRop1UzUQuuKmXO8gQPSy7xwYhnfVSgETbHIJZgg==", + "license": "MIT", + "dependencies": { + "@azure-tools/codegen": "~2.10.1", + "js-yaml": "~4.1.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@autorest/core": { + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@autorest/core/-/core-3.10.8.tgz", + "integrity": "sha512-7tj+zPUYu42lrzOZUC2hNaH7Xt53IVaEbWzV23aEYzDhXF0zD9TTpVexFXKTT4idBV0njsAKEKjPMkmQuHLbgQ==", + "license": "MIT", + "bin": { + "autorest-core": "entrypoints/app.js", + "autorest-language-service": "entrypoints/language-service.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@autorest/extension-base": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@autorest/extension-base/-/extension-base-3.6.1.tgz", + "integrity": "sha512-FWfO6LM3p+R1dW87wnGdJsCpZw67/h1hj09LsQuY0ywKBKv9lrLAW6AlVPrFyvUUIaCMMgd01U6TifCz/FRG9g==", + "license": "MIT", + "dependencies": { + "@azure-tools/codegen": "~2.10.1", + "js-yaml": "~4.1.0", + "vscode-jsonrpc": "^3.5.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@autorest/openapi-to-typespec": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@autorest/openapi-to-typespec/-/openapi-to-typespec-0.11.10.tgz", + "integrity": "sha512-1bP26wuUioqHxhV11o48VthMCkOwHhiHwJ9ebaINf/NvVKU9YNTXbzStKUclS4vpRpk2Zb/VSmE1TZfAomI/mg==", + "license": "MIT", + "dependencies": { + "@autorest/codemodel": "~4.20.1", + "@autorest/extension-base": "~3.6.1", + "@azure-tools/codegen": "~2.10.1", + "@azure-tools/openapi": "~3.6.1", + "@typespec/prettier-plugin-typespec": "^1.4.0", + "change-case-all": "~2.1.0", + "lodash": "~4.17.20", + "pluralize": "^8.0.0", + "prettier": "~3.5.3" + } + }, + "node_modules/@azure-tools/async-io": { + "version": "3.0.254", + "resolved": "https://registry.npmjs.org/@azure-tools/async-io/-/async-io-3.0.254.tgz", + "integrity": "sha512-X1C7XdyCuo50ch9FzKtTvmK18FgDxxf1Bbt3cSoknQqeDaRegHSSCO+zByq2YA4NvUzKXeZ1engh29IDxZXgpQ==", + "license": "MIT", + "dependencies": { + "@azure-tools/tasks": "~3.0.255", + "proper-lockfile": "~2.0.1" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@azure-tools/codegen": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.10.1.tgz", + "integrity": "sha512-fZfREKjQnBTscjObgK4LuyZNFaofoCNQDNz0jl1i8fYNwCM5EOF9BXwtEtobuEyCpPUNDxQ/KKO65eWzirqk4w==", + "license": "MIT", + "dependencies": { + "@azure-tools/async-io": "~3.0.0", + "js-yaml": "~4.1.0", + "semver": "^7.7.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure-tools/json": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure-tools/json/-/json-1.3.1.tgz", + "integrity": "sha512-0f4kQ6c513ycuk0Z29Nm09D/3dQHrHkduUW8wsFR1QTQ5uqgdYaDWg5I4cZbA8OkOIrJG73TzB/3G0liVCQ+Fw==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure-tools/jsonschema": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure-tools/jsonschema/-/jsonschema-1.3.1.tgz", + "integrity": "sha512-P4KnJzZJjCATcn3nRcF5MPja2wrPdP48Us643+0eqGtNBL4O20CFVEm6WFeFeR8JhvNCsZfeayHiE6VOspe1rg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure-tools/openapi": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@azure-tools/openapi/-/openapi-3.6.1.tgz", + "integrity": "sha512-vkIu0CUg09bzxqrlrNHdoOPu9AFhObp0FqG40M2WaF2dcVgLalsUc+wK5s4LpftlZAxcBmzVHna22JhI5/0X9g==", + "license": "MIT", + "dependencies": { + "@azure-tools/json": "~1.3.1", + "@azure-tools/jsonschema": "~1.3.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure-tools/tasks": { + "version": "3.0.255", + "resolved": "https://registry.npmjs.org/@azure-tools/tasks/-/tasks-3.0.255.tgz", + "integrity": "sha512-GjALNLz7kWMEdRVbaN5g0cJHNAr3XVTbP0611Mv2UzMgGL6FOhNZJK+oPHJKLDR8EEDZNnkwPlyi7B+INXUSQA==", + "license": "MIT", + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@azure-tools/typespec-autorest": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.60.0.tgz", + "integrity": "sha512-aIRr1e4g3irkjLTpxqzJ8BFnNFYwj4nlcG6cKGPuhNtiHhJgHjUhLVUNIW1A9O4jx+3RSErL9AkAl1ep+ZbiuA==", + "license": "MIT", + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" + } + }, + "node_modules/@azure-tools/typespec-azure-core": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" + } + }, + "node_modules/@azure-tools/typespec-azure-resource-manager": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", + "license": "MIT", + "peer": true, + "dependencies": { + "change-case": "~5.4.4", + "pluralize": "^8.0.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" + } + }, + "node_modules/@azure-tools/typespec-client-generator-cli": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-cli/-/typespec-client-generator-cli-0.28.1.tgz", + "integrity": "sha512-OrC529UNZsMsn6A3kXFyLqWslhP+Ji1lGJna1FhNwfJClO0Pi/6yc3p6lbnMCDAq+gzsYkbfXRTdXpPXfd5m9A==", + "license": "MIT", + "dependencies": { + "@autorest/core": "^3.10.2", + "@autorest/openapi-to-typespec": ">=0.10.6 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.53.0 <1.0.0", + "@azure/core-rest-pipeline": "^1.12.0", + "@types/yargs": "^17.0.32", + "autorest": "^3.7.1", + "chalk": "^5.3.0", + "dotenv": "^16.4.5", + "prompt-sync": "^4.2.0", + "simple-git": "^3.20.0", + "yaml": "^2.3.1", + "yargs": "^17.2.1" + }, + "bin": { + "tsp-client": "cmd/tsp-client.js" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@typespec/compiler": "1.0.0-rc.1 || >=1.0.0 <2.0.0" + } + }, + "node_modules/@azure-tools/typespec-client-generator-core": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "change-case": "~5.4.4", + "pluralize": "^8.0.0", + "yaml": "~2.8.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" + } + }, + "node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-auth": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz", + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-util": "^1.13.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.1.tgz", + "integrity": "sha512-UVZlVLfLyz6g3Hy7GNDpooMQonUygH7ghdiSASOOHy97fKj/mPLqgDX7aidOijn+sCMU+WU8NjlPlNTgnvbcGA==", + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", + "@typespec/ts-http-runtime": "^0.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure/core-tracing": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz", + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure/core-util": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz", + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@typespec/ts-http-runtime": "^0.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure/logger": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz", + "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", + "license": "MIT", + "dependencies": { + "@typespec/ts-http-runtime": "^0.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.2.tgz", + "integrity": "sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.16.tgz", + "integrity": "sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", + "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/editor": { + "version": "4.2.18", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", + "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/external-editor": "^1.0.1", + "@inquirer/type": "^3.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.18.tgz", + "integrity": "sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", + "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.6.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.2.tgz", + "integrity": "sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.18.tgz", + "integrity": "sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.18.tgz", + "integrity": "sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.4.tgz", + "integrity": "sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/checkbox": "^4.2.2", + "@inquirer/confirm": "^5.1.16", + "@inquirer/editor": "^4.2.18", + "@inquirer/expand": "^4.0.18", + "@inquirer/input": "^4.2.2", + "@inquirer/number": "^3.0.18", + "@inquirer/password": "^4.0.18", + "@inquirer/rawlist": "^4.1.6", + "@inquirer/search": "^3.1.1", + "@inquirer/select": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.6.tgz", + "integrity": "sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.1.tgz", + "integrity": "sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.2.tgz", + "integrity": "sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@inquirer/core": "^10.2.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "peer": true, + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@kwsites/file-exists": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", + "license": "MIT", + "dependencies": { + "debug": "^4.1.1" + } + }, + "node_modules/@kwsites/promise-deferred": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "license": "MIT" + }, + "node_modules/@typespec/compiler": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "~7.27.1", + "@inquirer/prompts": "^7.4.0", + "ajv": "~8.17.1", + "change-case": "~5.4.4", + "env-paths": "^3.0.0", + "globby": "~14.1.0", + "is-unicode-supported": "^2.1.0", + "mustache": "~4.2.0", + "picocolors": "~1.1.1", + "prettier": "~3.6.2", + "semver": "^7.7.1", + "tar": "^7.4.3", + "temporal-polyfill": "^0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.12", + "yaml": "~2.8.0", + "yargs": "~18.0.0" + }, + "bin": { + "tsp": "cmd/tsp.js", + "tsp-server": "cmd/tsp-server.js" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@typespec/compiler/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@typespec/compiler/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@typespec/compiler/node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@typespec/compiler/node_modules/emoji-regex": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "license": "MIT", + "peer": true + }, + "node_modules/@typespec/compiler/node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/@typespec/compiler/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typespec/compiler/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@typespec/compiler/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@typespec/compiler/node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "license": "MIT", + "peer": true, + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/@typespec/compiler/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "peer": true, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/@typespec/events": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0" + } + }, + "node_modules/@typespec/http": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" + }, + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } + } + }, + "node_modules/@typespec/openapi": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" + } + }, + "node_modules/@typespec/prettier-plugin-typespec": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/prettier-plugin-typespec/-/prettier-plugin-typespec-1.4.0.tgz", + "integrity": "sha512-P4ATX7Ryu4IKlzJWv36WbEPCn4xrusaJdb2tbm2wJWobhHW6jt7bWGpJXrXvdHMcfk2IYyIpbOx0+EZb7Aof+g==", + "license": "MIT", + "dependencies": { + "prettier": "~3.6.2" + } + }, + "node_modules/@typespec/prettier-plugin-typespec/node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/@typespec/rest": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" + } + }, + "node_modules/@typespec/sse": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" + } + }, + "node_modules/@typespec/streams": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0" + } + }, + "node_modules/@typespec/ts-http-runtime": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.1.tgz", + "integrity": "sha512-SnbaqayTVFEA6/tYumdF0UmybY0KHyKwGPBXnyckFlrrKdhWFrL3a2HIPXHjht5ZOElKGcXfD2D63P36btb+ww==", + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@typespec/versioning": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0" + } + }, + "node_modules/@typespec/xml": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "^1.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/autorest": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/autorest/-/autorest-3.7.2.tgz", + "integrity": "sha512-yEeF0tJjx2fROK9VWIVHKFiUSzD0cxwqnq7z+v7kIIRRZjyOM3rpBS9OPp6tQv5d3mmxPAUNh57G1ZumQNqQGg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "autorest": "entrypoints/app.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "peer": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "license": "MIT" + }, + "node_modules/change-case-all": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/change-case-all/-/change-case-all-2.1.0.tgz", + "integrity": "sha512-v6b0WWWkZUMHVuYk82l+WROgkUm4qEN2w5hKRNWtEOYwWqUGoi8C6xH0l1RLF1EoWqDFK6MFclmN3od6ws3/uw==", + "license": "MIT", + "dependencies": { + "change-case": "^5.2.0", + "sponge-case": "^2.0.2", + "swap-case": "^3.0.2", + "title-case": "^3.0.3" + } + }, + "node_modules/chardet": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "license": "MIT", + "peer": true + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "peer": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "peer": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "license": "MIT", + "peer": true, + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "peer": true, + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "license": "MIT", + "peer": true, + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "peer": true, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/path-type": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC", + "peer": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prompt-sync": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz", + "integrity": "sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw==", + "license": "MIT", + "dependencies": { + "strip-ansi": "^5.0.0" + } + }, + "node_modules/proper-lockfile": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-2.0.1.tgz", + "integrity": "sha512-rjaeGbsmhNDcDInmwi4MuI6mRwJu6zq8GjYCLuSuE7GF+4UjgzkL69sVKKJ2T2xH61kK7rXvGYpvaTu909oXaQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "retry": "^0.10.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT", + "peer": true + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-git": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.28.0.tgz", + "integrity": "sha512-Rs/vQRwsn1ILH1oBUy8NucJlXmnnLeLCfcvbSehkPzbv3wwoFWIdtfd6Ndo6ZPhlPsCZ60CPI4rxurnwAa+a2w==", + "license": "MIT", + "dependencies": { + "@kwsites/file-exists": "^1.1.1", + "@kwsites/promise-deferred": "^1.1.1", + "debug": "^4.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/steveukx/git-js?sponsor=1" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sponge-case": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/sponge-case/-/sponge-case-2.0.3.tgz", + "integrity": "sha512-i4h9ZGRfxV6Xw3mpZSFOfbXjf0cQcYmssGWutgNIfFZ2VM+YIWfD71N/kjjwK6X/AAHzBr+rciEcn/L34S8TGw==", + "license": "MIT" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/swap-case": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-3.0.3.tgz", + "integrity": "sha512-6p4op8wE9CQv7uDFzulI6YXUw4lD9n4oQierdbFThEKVWVQcbQcUjdP27W8XE7V4QnWmnq9jueSHceyyQnqQVA==", + "license": "MIT" + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "license": "ISC", + "peer": true, + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/temporal-polyfill": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.0.tgz", + "integrity": "sha512-qNsTkX9K8hi+FHDfHmf22e/OGuXmfBm9RqNismxBrnSmZVJKegQ+HYYXT+R7Ha8F/YSm2Y34vmzD4cxMu2u95g==", + "license": "MIT", + "peer": true, + "dependencies": { + "temporal-spec": "0.3.0" + } + }, + "node_modules/temporal-spec": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.0.tgz", + "integrity": "sha512-n+noVpIqz4hYgFSMOSiINNOUOMFtV5cZQNCmmszA6GiVFVRt3G7AqVyhXjhCSmowvQn+NsGn+jMDMKJYHd3bSQ==", + "license": "ISC", + "peer": true + }, + "node_modules/title-case": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-3.0.3.tgz", + "integrity": "sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vscode-jsonrpc": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz", + "integrity": "sha512-T24Jb5V48e4VgYliUXMnZ379ItbrXgOimweKaJshD84z+8q7ZOZjJan0MeDe+Ugb+uqERDVV8SBmemaGMSMugA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0 || >=6.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "license": "MIT", + "peer": true, + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "license": "MIT", + "peer": true, + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "license": "MIT", + "peer": true + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT", + "peer": true + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/yaml": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/eng/common/tsp-client/package.json b/eng/common/tsp-client/package.json new file mode 100644 index 000000000000..a999f99ba653 --- /dev/null +++ b/eng/common/tsp-client/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@azure-tools/typespec-client-generator-cli": "0.28.1" + } +} diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index a5009fc0055d..118cc4b655ae 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,70 +5,70 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20250901.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20250916.1" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.59.0", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.2", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.1", + "@azure-tools/typespec-autorest": "0.60.0", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@azure-tools/typespec-liftr-base": "0.8.0", - "@typespec/compiler": "1.3.0", - "@typespec/events": "0.73.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/sse": "0.73.0", - "@typespec/streams": "0.73.0", - "@typespec/versioning": "0.73.0", - "@typespec/xml": "0.73.0" + "@typespec/compiler": "1.4.0", + "@typespec/events": "0.74.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/sse": "0.74.0", + "@typespec/streams": "0.74.0", + "@typespec/versioning": "0.74.0", + "@typespec/xml": "0.74.0" } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20250901.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20250901.1.tgz", - "integrity": "sha512-iIZjEGrBNwZYF/QHmwa/A/SNVNKPSCVnV5Cn/UatJl9mMPpKgxwfJ+ip3PvOtx8UcNlvXRZZn0k/DuZ+MgX8yA==" + "version": "3.0.0-beta.20250916.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20250916.1.tgz", + "integrity": "sha512-dJzsoWbiRv9WqLLLe5Q38fjSD2lIzg1SGivWswjMHtDFdGtT1RABj2MQmX659xObdXPIUbVFHQLiESShrpnZGw==" }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.59.0.tgz", - "integrity": "sha512-IdjicuLJRNFZUWHJd1Z8e9RQUlVUyUb2v7pT1rYkhpxAxFb9uluVVpi09GkUFimkrUZ+HkFO/jI2zbIAptZ2FQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.60.0.tgz", + "integrity": "sha512-aIRr1e4g3irkjLTpxqzJ8BFnNFYwj4nlcG6cKGPuhNtiHhJgHjUhLVUNIW1A9O4jx+3RSErL9AkAl1ep+ZbiuA==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.59.0.tgz", - "integrity": "sha512-3vTWDTSR+P0qeyFcOKTgXortNOeA3nsyKTPpZqfFZVTtNFiiO17UWAM2Eg3i0IpNQ3qxMMAksIkwt1bqltTDqA==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.59.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.59.2.tgz", - "integrity": "sha512-EsRUuCONazl32694raxilRYDtcZ4TcjE5tP6wD73PesemOxK9KPDT6ZIJ3ZGX9ALkMti5SOWAsJUpy55o6I7Wg==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", "dev": true, "license": "MIT", "dependencies": { @@ -79,34 +79,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.59.0.tgz", - "integrity": "sha512-+eKYH25ptj6SZHT+/YfxrX+g6HMAQQTphmHmqOoRCbbfPaE8l855OaDrwEgh5NDLV8WXnHpzTNI0dsYipEp10g==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.60.0.tgz", + "integrity": "sha512-4sx9StBWkmnBfLJ9b23RSwCs0TkTElaU9+6a/cS6JS0F7UggP/KLQd6LG59D0u9ByXM2x9pvYPO8l/K7UOXoPg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.59.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.59.1.tgz", - "integrity": "sha512-sGtn6snCEapPaIM+CaARrOsJYdpB7AS7eX5Z6q2x7Ev3YF5HGwpM14EcdTVp0VkQhTSStv9WJ8c0sUjZ8Eb7Bg==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", "dev": true, "license": "MIT", "dependencies": { @@ -118,42 +118,42 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/sse": "^0.73.0", - "@typespec/streams": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20250901.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20250901.1.tgz", - "integrity": "sha512-893KbexcyDAjzngkx3HXKVQFeJ/t25QgFplC5UI28m6VKVMUB0gcadWJWLQUsCdwVTDa7Pj7GrfqIRc2upr89Q==", + "version": "0.2.0-beta.20250916.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20250916.1.tgz", + "integrity": "sha512-pO622woUGhktCDRaXDZGb1h1IDTiBxFdwMmqmP9b0OMJwVUcKxBp8ig9KuU8HnibyWbPrhkVYcw12yjaqRpupA==", "license": "MIT", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20250901.1" + "@autorest/csharp": "3.0.0-beta.20250916.1" }, "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-azure-resource-manager": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-azure-rulesets": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", + "@azure-tools/typespec-autorest": ">=0.60.0 <0.61.0 || ~0.61.0-0", + "@azure-tools/typespec-azure-core": ">=0.60.0 <0.61.0 || ~0.61.0-0", + "@azure-tools/typespec-azure-resource-manager": ">=0.60.0 <0.61.0 || ~0.61.0-0", + "@azure-tools/typespec-azure-rulesets": ">=0.60.0 <0.61.0 || ~0.61.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.60.0 <0.61.0 || ~0.61.0-0", "@azure-tools/typespec-liftr-base": ">=0.6.0 <1.0.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": ">=0.73.0 <1.0.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": ">=0.73.0 <1.0.0", - "@typespec/sse": ">=0.73.0 <1.0.0", - "@typespec/streams": ">=0.73.0 <1.0.0", - "@typespec/versioning": ">=0.73.0 <1.0.0", - "@typespec/xml": ">=0.73.0 <1.0.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": ">=0.74.0 <1.0.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": ">=0.74.0 <1.0.0", + "@typespec/sse": ">=0.74.0 <1.0.0", + "@typespec/streams": ">=0.74.0 <1.0.0", + "@typespec/versioning": ">=0.74.0 <1.0.0", + "@typespec/xml": ">=0.74.0 <1.0.0" } }, "node_modules/@azure-tools/typespec-liftr-base": { @@ -187,17 +187,27 @@ "node": ">=6.9.0" } }, + "node_modules/@inquirer/ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz", + "integrity": "sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.2.tgz", - "integrity": "sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz", + "integrity": "sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -213,13 +223,13 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.16", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.16.tgz", - "integrity": "sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==", + "version": "5.1.18", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.18.tgz", + "integrity": "sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -235,15 +245,15 @@ } }, "node_modules/@inquirer/core": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", - "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz", + "integrity": "sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==", "dev": true, "license": "MIT", "dependencies": { + "@inquirer/ansi": "^1.0.0", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", @@ -263,14 +273,14 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.18", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", - "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", + "version": "4.2.20", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz", + "integrity": "sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", - "@inquirer/external-editor": "^1.0.1", + "@inquirer/core": "^10.2.2", + "@inquirer/external-editor": "^1.0.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -286,13 +296,13 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.18.tgz", - "integrity": "sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz", + "integrity": "sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, @@ -309,14 +319,14 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", - "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", "dev": true, "license": "MIT", "dependencies": { "chardet": "^2.1.0", - "iconv-lite": "^0.6.3" + "iconv-lite": "^0.7.0" }, "engines": { "node": ">=18" @@ -341,13 +351,13 @@ } }, "node_modules/@inquirer/input": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.2.tgz", - "integrity": "sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz", + "integrity": "sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -363,13 +373,13 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.18.tgz", - "integrity": "sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz", + "integrity": "sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -385,15 +395,15 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.18.tgz", - "integrity": "sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz", + "integrity": "sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", - "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -408,22 +418,22 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.4.tgz", - "integrity": "sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.6.tgz", + "integrity": "sha512-68JhkiojicX9SBUD8FE/pSKbOKtwoyaVj1kwqLfvjlVXZvOy3iaSWX4dCLsZyYx/5Ur07Fq+yuDNOen+5ce6ig==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.2.2", - "@inquirer/confirm": "^5.1.16", - "@inquirer/editor": "^4.2.18", - "@inquirer/expand": "^4.0.18", - "@inquirer/input": "^4.2.2", - "@inquirer/number": "^3.0.18", - "@inquirer/password": "^4.0.18", - "@inquirer/rawlist": "^4.1.6", - "@inquirer/search": "^3.1.1", - "@inquirer/select": "^4.3.2" + "@inquirer/checkbox": "^4.2.4", + "@inquirer/confirm": "^5.1.18", + "@inquirer/editor": "^4.2.20", + "@inquirer/expand": "^4.0.20", + "@inquirer/input": "^4.2.4", + "@inquirer/number": "^3.0.20", + "@inquirer/password": "^4.0.20", + "@inquirer/rawlist": "^4.1.8", + "@inquirer/search": "^3.1.3", + "@inquirer/select": "^4.3.4" }, "engines": { "node": ">=18" @@ -438,13 +448,13 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.6.tgz", - "integrity": "sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz", + "integrity": "sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, @@ -461,13 +471,13 @@ } }, "node_modules/@inquirer/search": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.1.tgz", - "integrity": "sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz", + "integrity": "sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" @@ -485,16 +495,16 @@ } }, "node_modules/@inquirer/select": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.2.tgz", - "integrity": "sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz", + "integrity": "sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -592,9 +602,9 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.3.0.tgz", - "integrity": "sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", "dev": true, "license": "MIT", "dependencies": { @@ -625,30 +635,30 @@ } }, "node_modules/@typespec/events": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.73.0.tgz", - "integrity": "sha512-etlhp86amDaElD/UX27u9I4O58zREov73HkkV3xbdTWpv2RqOKyD3mkyGAWsW3hKaGVIxwHOvKcOZ2j+b07Gpw==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.3.0.tgz", - "integrity": "sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -657,86 +667,86 @@ } }, "node_modules/@typespec/openapi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.3.0.tgz", - "integrity": "sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/rest": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.73.0.tgz", - "integrity": "sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/sse": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.73.0.tgz", - "integrity": "sha512-WTnRJ1b1M3RPzlHxhnK9sh6+AGKPKWpuA0TSAqzyxb/uRHFYLNeoDKPOnlQ749SJ8lJz71Oh0nUsP3vB0EzO6Q==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" } }, "node_modules/@typespec/streams": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.73.0.tgz", - "integrity": "sha512-pL4xffHXEIhBQKPlB9L4AKuM0bn44WsGKjnz91wa6wBtP/CbsPrGQicof0Z7GPGdddtDi4G8PWGmJtVFw53V9g==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/versioning": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.73.0.tgz", - "integrity": "sha512-cfFvzTsvsu4VpdwZcRULr3p/fawKZnjiJClQxlLcYW0dLs/5k5jh7l0YyPkYvgkOcncUrIB6hIu82tQhKrMDKQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/xml": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.73.0.tgz", - "integrity": "sha512-vlMM8/L22O/PbI3ovj3qoww/3Z8wNwn7og4jzlGRM93jZBJvrOeDSwZo1Dc4rMJyU6KfjPkP3/l5TLbgW8x0zA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/ajv": { @@ -756,22 +766,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -861,9 +855,9 @@ } }, "node_modules/cliui/node_modules/ansi-regex": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz", - "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -874,9 +868,9 @@ } }, "node_modules/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -912,9 +906,9 @@ } }, "node_modules/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -928,9 +922,9 @@ } }, "node_modules/cliui/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "dev": true, "license": "MIT", "dependencies": { @@ -1070,9 +1064,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.1.tgz", - "integrity": "sha512-R1QfovbPsKmosqTnPoRFiJ7CF9MLRgb53ChvMZm+r4p76/+8yKDy17qLL2PKInORy2RkZZekuK0efYgmzTkXyQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "dev": true, "license": "MIT", "engines": { @@ -1117,9 +1111,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1127,6 +1121,10 @@ }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ignore": { @@ -1539,19 +1537,6 @@ "node": ">=8.0" } }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unicorn-magic": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", @@ -1690,9 +1675,9 @@ } }, "node_modules/yargs/node_modules/ansi-regex": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.0.tgz", - "integrity": "sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -1728,9 +1713,9 @@ } }, "node_modules/yargs/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 591973c2c962..9c32e5958fde 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,23 +1,23 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20250901.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20250916.1" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.59.0", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.2", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.1", + "@azure-tools/typespec-autorest": "0.60.0", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@azure-tools/typespec-liftr-base": "0.8.0", - "@typespec/compiler": "1.3.0", - "@typespec/events": "0.73.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/sse": "0.73.0", - "@typespec/streams": "0.73.0", - "@typespec/versioning": "0.73.0", - "@typespec/xml": "0.73.0" + "@typespec/compiler": "1.4.0", + "@typespec/events": "0.74.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/sse": "0.74.0", + "@typespec/streams": "0.74.0", + "@typespec/versioning": "0.74.0", + "@typespec/xml": "0.74.0" } } diff --git a/eng/http-client-csharp-emitter-package-lock.json b/eng/http-client-csharp-emitter-package-lock.json index 42c81fb02d61..cac28dd2aedf 100644 --- a/eng/http-client-csharp-emitter-package-lock.json +++ b/eng/http-client-csharp-emitter-package-lock.json @@ -5,62 +5,62 @@ "packages": { "": { "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250908.5", + "@typespec/http-client-csharp": "1.0.0-alpha.20250918.1", "client-plugin": "file:../../../../eng/packages/plugins/client" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.59.0", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/streams": "0.73.0", - "@typespec/versioning": "0.73.0" + "@azure-tools/typespec-autorest": "0.60.0", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/streams": "0.74.0", + "@typespec/versioning": "0.74.0" } }, "../../../../eng/packages/plugins/client": {}, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.59.0.tgz", - "integrity": "sha512-IdjicuLJRNFZUWHJd1Z8e9RQUlVUyUb2v7pT1rYkhpxAxFb9uluVVpi09GkUFimkrUZ+HkFO/jI2zbIAptZ2FQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.60.0.tgz", + "integrity": "sha512-aIRr1e4g3irkjLTpxqzJ8BFnNFYwj4nlcG6cKGPuhNtiHhJgHjUhLVUNIW1A9O4jx+3RSErL9AkAl1ep+ZbiuA==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.59.0.tgz", - "integrity": "sha512-3vTWDTSR+P0qeyFcOKTgXortNOeA3nsyKTPpZqfFZVTtNFiiO17UWAM2Eg3i0IpNQ3qxMMAksIkwt1bqltTDqA==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.59.0.tgz", - "integrity": "sha512-q0UkBnwWE4+9ivAkwAOOrDF9kvSb+qRIvMXJdUlqGfwFqDkOvQFwHSzSDeL/mBNK2fB9NIePKPFjDGP9lpC0vQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", "dev": true, "license": "MIT", "dependencies": { @@ -71,34 +71,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.59.0.tgz", - "integrity": "sha512-+eKYH25ptj6SZHT+/YfxrX+g6HMAQQTphmHmqOoRCbbfPaE8l855OaDrwEgh5NDLV8WXnHpzTNI0dsYipEp10g==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.60.0.tgz", + "integrity": "sha512-4sx9StBWkmnBfLJ9b23RSwCs0TkTElaU9+6a/cS6JS0F7UggP/KLQd6LG59D0u9ByXM2x9pvYPO8l/K7UOXoPg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.59.0.tgz", - "integrity": "sha512-5+pVcOr7Uyq4IaZ3oLjLi8jnBuR+t/B8hQF4CZo+goe/uK+WkmDfw1TlY14G2ve7W7v8m9+Sk2nil6bN1uHWEQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -109,16 +109,16 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/sse": "^0.73.0", - "@typespec/streams": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@babel/code-frame": { @@ -144,16 +144,25 @@ "node": ">=6.9.0" } }, + "node_modules/@inquirer/ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz", + "integrity": "sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.2.tgz", - "integrity": "sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz", + "integrity": "sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -169,12 +178,12 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.16", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.16.tgz", - "integrity": "sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==", + "version": "5.1.18", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.18.tgz", + "integrity": "sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -190,14 +199,14 @@ } }, "node_modules/@inquirer/core": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", - "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz", + "integrity": "sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==", "license": "MIT", "dependencies": { + "@inquirer/ansi": "^1.0.0", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", @@ -217,13 +226,13 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.18", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", - "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", + "version": "4.2.20", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz", + "integrity": "sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", - "@inquirer/external-editor": "^1.0.1", + "@inquirer/core": "^10.2.2", + "@inquirer/external-editor": "^1.0.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -239,12 +248,12 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.18.tgz", - "integrity": "sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz", + "integrity": "sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, @@ -261,13 +270,13 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", - "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", "license": "MIT", "dependencies": { "chardet": "^2.1.0", - "iconv-lite": "^0.6.3" + "iconv-lite": "^0.7.0" }, "engines": { "node": ">=18" @@ -291,12 +300,12 @@ } }, "node_modules/@inquirer/input": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.2.tgz", - "integrity": "sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz", + "integrity": "sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -312,12 +321,12 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.18.tgz", - "integrity": "sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz", + "integrity": "sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8" }, "engines": { @@ -333,14 +342,14 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.18.tgz", - "integrity": "sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz", + "integrity": "sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", - "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -355,21 +364,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.4.tgz", - "integrity": "sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.6.tgz", + "integrity": "sha512-68JhkiojicX9SBUD8FE/pSKbOKtwoyaVj1kwqLfvjlVXZvOy3iaSWX4dCLsZyYx/5Ur07Fq+yuDNOen+5ce6ig==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.2.2", - "@inquirer/confirm": "^5.1.16", - "@inquirer/editor": "^4.2.18", - "@inquirer/expand": "^4.0.18", - "@inquirer/input": "^4.2.2", - "@inquirer/number": "^3.0.18", - "@inquirer/password": "^4.0.18", - "@inquirer/rawlist": "^4.1.6", - "@inquirer/search": "^3.1.1", - "@inquirer/select": "^4.3.2" + "@inquirer/checkbox": "^4.2.4", + "@inquirer/confirm": "^5.1.18", + "@inquirer/editor": "^4.2.20", + "@inquirer/expand": "^4.0.20", + "@inquirer/input": "^4.2.4", + "@inquirer/number": "^3.0.20", + "@inquirer/password": "^4.0.20", + "@inquirer/rawlist": "^4.1.8", + "@inquirer/search": "^3.1.3", + "@inquirer/select": "^4.3.4" }, "engines": { "node": ">=18" @@ -384,12 +393,12 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.6.tgz", - "integrity": "sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz", + "integrity": "sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, @@ -406,12 +415,12 @@ } }, "node_modules/@inquirer/search": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.1.tgz", - "integrity": "sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz", + "integrity": "sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" @@ -429,15 +438,15 @@ } }, "node_modules/@inquirer/select": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.2.tgz", - "integrity": "sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz", + "integrity": "sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.2.0", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", "@inquirer/figures": "^1.0.13", "@inquirer/type": "^3.0.8", - "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -529,9 +538,9 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.3.0.tgz", - "integrity": "sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.27.1", @@ -561,29 +570,29 @@ } }, "node_modules/@typespec/events": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.73.0.tgz", - "integrity": "sha512-etlhp86amDaElD/UX27u9I4O58zREov73HkkV3xbdTWpv2RqOKyD3mkyGAWsW3hKaGVIxwHOvKcOZ2j+b07Gpw==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.3.0.tgz", - "integrity": "sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -592,98 +601,97 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250908.5", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250908.5.tgz", - "integrity": "sha512-zB3QrNQWBi248oYUIwnfnMDmxZLpNblNXZMzYdM3PzandepZAo0U+AWLaeovEPnGvIi8shEt3CmhbJAouil3qA==", + "version": "1.0.0-alpha.20250918.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250918.1.tgz", + "integrity": "sha512-Yy5FOOjC6XgQdHO3f1iIMby8yRjE93i6ZeALfyq7PgCNee2Kf7ucmzfkZaM4QgiiGLba1ibCqO1nbn99zeb04Q==", "license": "MIT", "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/streams": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/versioning": ">=0.73.0 <0.74.0 || ~0.74.0-0" + "@azure-tools/typespec-client-generator-core": ">=0.60.0 < 0.61.0 || ~0.61.0-0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/streams": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/versioning": ">=0.74.0 <0.75.0 || ~0.75.0-0" } }, "node_modules/@typespec/openapi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.3.0.tgz", - "integrity": "sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/rest": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.73.0.tgz", - "integrity": "sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/sse": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.73.0.tgz", - "integrity": "sha512-WTnRJ1b1M3RPzlHxhnK9sh6+AGKPKWpuA0TSAqzyxb/uRHFYLNeoDKPOnlQ749SJ8lJz71Oh0nUsP3vB0EzO6Q==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" } }, "node_modules/@typespec/streams": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.73.0.tgz", - "integrity": "sha512-pL4xffHXEIhBQKPlB9L4AKuM0bn44WsGKjnz91wa6wBtP/CbsPrGQicof0Z7GPGdddtDi4G8PWGmJtVFw53V9g==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/versioning": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.73.0.tgz", - "integrity": "sha512-cfFvzTsvsu4VpdwZcRULr3p/fawKZnjiJClQxlLcYW0dLs/5k5jh7l0YyPkYvgkOcncUrIB6hIu82tQhKrMDKQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/xml": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.73.0.tgz", - "integrity": "sha512-vlMM8/L22O/PbI3ovj3qoww/3Z8wNwn7og4jzlGRM93jZBJvrOeDSwZo1Dc4rMJyU6KfjPkP3/l5TLbgW8x0zA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/ajv": { @@ -702,21 +710,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -994,9 +987,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.1.tgz", - "integrity": "sha512-R1QfovbPsKmosqTnPoRFiJ7CF9MLRgb53ChvMZm+r4p76/+8yKDy17qLL2PKInORy2RkZZekuK0efYgmzTkXyQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "license": "MIT", "engines": { "node": ">=18" @@ -1038,15 +1031,19 @@ } }, "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ignore": { @@ -1425,18 +1422,6 @@ "node": ">=8.0" } }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unicorn-magic": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", diff --git a/eng/http-client-csharp-emitter-package.json b/eng/http-client-csharp-emitter-package.json index 3696cb6090ed..dc49fb812027 100644 --- a/eng/http-client-csharp-emitter-package.json +++ b/eng/http-client-csharp-emitter-package.json @@ -2,19 +2,19 @@ "main": "dist/src/index.js", "dependencies": { "client-plugin": "file:../../../../eng/packages/plugins/client", - "@typespec/http-client-csharp": "1.0.0-alpha.20250908.5" + "@typespec/http-client-csharp": "1.0.0-alpha.20250918.1" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/streams": "0.73.0", - "@typespec/versioning": "0.73.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-autorest": "0.59.0" + "@azure-tools/typespec-client-generator-core": "0.60.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/streams": "0.74.0", + "@typespec/versioning": "0.74.0", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-autorest": "0.60.0" } } \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/emitter/src/emitter.ts b/eng/packages/http-client-csharp-mgmt/emitter/src/emitter.ts index 69b922b56dac..b5b037f2bc79 100644 --- a/eng/packages/http-client-csharp-mgmt/emitter/src/emitter.ts +++ b/eng/packages/http-client-csharp-mgmt/emitter/src/emitter.ts @@ -9,8 +9,9 @@ import { $onEmit as $onAzureEmit, AzureEmitterOptions } from "@azure-typespec/http-client-csharp"; -import { azureSDKContextOptions } from "./sdk-context-options.js"; +import { azureSDKContextOptions, flattenPropertyDecorator } from "./sdk-context-options.js"; import { updateClients } from "./resource-detection.js"; +import { DecoratorInfo } from "@azure-tools/typespec-client-generator-core"; export async function $onEmit(context: EmitContext) { context.options["generator-name"] ??= "ManagementClientGenerator"; @@ -25,6 +26,22 @@ export async function $onEmit(context: EmitContext) { sdkContext: CSharpEmitterContext ): CodeModel { updateClients(codeModel, sdkContext); + setFlattenProperty(codeModel, sdkContext); return codeModel; } } + +function setFlattenProperty(codeModel: CodeModel, sdkContext: CSharpEmitterContext): void { + for (const model of sdkContext.sdkPackage.models) { + for (const property of model.properties) { + if (property.flatten ) { + + const flattenPropertyMetadataDecorator: DecoratorInfo = { + name: flattenPropertyDecorator, + arguments: {} + }; + property.decorators.push(flattenPropertyMetadataDecorator); + } + } + } +} 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 b825eef63032..6ddf2b4e4db8 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 @@ -13,6 +13,7 @@ import { convertResourceMetadataToArguments, NonResourceMethod, ResourceMetadata, + ResourceMethod, ResourceOperationKind, ResourceScope } from "./resource-metadata.js"; @@ -58,6 +59,9 @@ export async function updateClients( sdkContext.sdkPackage.models.map((m) => [m.crossLanguageDefinitionId, m]) ); const resourceModels = getAllResourceModels(codeModel); + const resourceModelMap = new Map( + resourceModels.map((m) => [m.crossLanguageDefinitionId, m]) + ); const resourceModelToMetadataMap = new Map( resourceModels.map((m) => [ @@ -68,7 +72,7 @@ export async function updateClients( singletonResourceName: getSingletonResource( m.decorators?.find((d) => d.name == singleton) ), - resourceScope: getResourceScope(m), + resourceScope: ResourceScope.Tenant, // temporary default to Tenant, will be properly set later after methods are populated methods: [], parentResourceId: undefined, // this will be populated later resourceName: m.name @@ -137,6 +141,12 @@ export async function updateClients( resourceModelToMetadataMap.values() ); } + + // update the model's resourceScope based on resource scope decorator if it exists or based on the Get method's scope. If neither exist, it will be set to ResourceGroup by default + const model = resourceModelMap.get(modelId); + if (model) { + metadata.resourceScope = getResourceScope(model, metadata.methods); + } } // the last step, add the decorator to the resource model @@ -273,7 +283,6 @@ function getAllResourceModels(codeModel: CodeModel): InputModelType[] { const resourceModels: InputModelType[] = []; for (const model of codeModel.models) { if (model.decorators?.some((d) => d.name == armResourceInternal)) { - model.crossLanguageDefinitionId; resourceModels.push(model); } } @@ -290,7 +299,8 @@ function getSingletonResource( return singletonResource ?? "default"; } -function getResourceScope(model: InputModelType): ResourceScope { +function getResourceScope(model: InputModelType, methods?: ResourceMethod[]): ResourceScope { + // First, check for explicit scope decorators const decorators = model.decorators; if (decorators?.some((d) => d.name == tenantResource)) { return ResourceScope.Tenant; @@ -299,6 +309,16 @@ function getResourceScope(model: InputModelType): ResourceScope { } else if (decorators?.some((d) => d.name == resourceGroupResource)) { return ResourceScope.ResourceGroup; } + + // Fall back to Get method's scope only if no scope decorators are found + if (methods) { + const getMethod = methods.find(m => m.kind === ResourceOperationKind.Get); + if (getMethod) { + return getMethod.operationScope; + } + } + + // Final fallback to ResourceGroup return ResourceScope.ResourceGroup; // all the templates work as if there is a resource group decorator when there is no such decorator } diff --git a/eng/packages/http-client-csharp-mgmt/emitter/src/sdk-context-options.ts b/eng/packages/http-client-csharp-mgmt/emitter/src/sdk-context-options.ts index 7a7a4c8108f0..3eebbd7e74cf 100644 --- a/eng/packages/http-client-csharp-mgmt/emitter/src/sdk-context-options.ts +++ b/eng/packages/http-client-csharp-mgmt/emitter/src/sdk-context-options.ts @@ -76,9 +76,6 @@ export const resourceGroupResource = const resourceGroupResourceRegex = "Azure\\.ResourceManager\\.@resourceGroupResource"; -const flattenPropertyRegex = - "Azure\\.ClientGenerator\\.Core\\.@flattenProperty"; - // TODO: add this decorator to TCGC export const resourceMetadata = "Azure.ClientGenerator.Core.@resourceSchema"; const resourceMetadataRegex = @@ -88,6 +85,8 @@ export const nonResourceMethodMetadata = const nonResourceMethodMetadataRegex = "Azure\\.ClientGenerator\\.Core\\.@nonResourceMethodSchema"; +export const flattenPropertyDecorator = "Azure.ResourceManager.@flattenProperty"; + export const azureSDKContextOptions: CreateSdkContextOptions = { versioning: { previewStringRegex: /-preview$/ @@ -104,7 +103,6 @@ export const azureSDKContextOptions: CreateSdkContextOptions = { armResourceOperationsRegex, armResourceUpdateRegex, armResourceReadRegex, - flattenPropertyRegex, parentResourceRegex, resourceGroupResourceRegex, singletonRegex, 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 601ef22c7de4..c53e8a36d02a 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 @@ -9,7 +9,12 @@ import { TestHost } from "@typespec/compiler/testing"; import { createModel } from "@typespec/http-client-csharp"; import { getAllClients, updateClients } from "../src/resource-detection.js"; import { ok, strictEqual } from "assert"; -import { resourceMetadata } from "../src/sdk-context-options.js"; +import { + resourceMetadata, + tenantResource, + subscriptionResource, + resourceGroupResource +} from "../src/sdk-context-options.js"; import { ResourceScope } from "../src/resource-metadata.js"; describe("Resource Detection", () => { @@ -963,4 +968,73 @@ interface Employees { ); strictEqual(employeeMetadataDecorator.arguments.resourceName, "Employee"); }); + + it("resource scope determined from Get method when no explicit decorator", async () => { + const program = await typeSpecCompile( + ` +@parentResource(SubscriptionLocationResource) +model Employee is ProxyResource { + ...ResourceNameParameter; +} + +model EmployeeProperties { + age?: int32; +} + +union EmployeeType { + string, +} + +interface Operations extends Azure.ResourceManager.Operations {} + +@armResourceOperations +interface Employees { + get is ArmResourceRead; +} +`, + 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); + const getMethod = employeeClient.methods.find((m) => m.name === "get"); + ok(getMethod); + + const resourceMetadataDecorator = employeeModel.decorators?.find( + (d) => d.name === resourceMetadata + ); + ok(resourceMetadataDecorator); + ok(resourceMetadataDecorator.arguments); + + // Verify that the model has NO scope-related decorators + const hasNoScopeDecorators = !employeeModel.decorators?.some((d) => + d.name === tenantResource || + d.name === subscriptionResource || + d.name === resourceGroupResource + ); + ok(hasNoScopeDecorators, "Model should have no scope-related decorators to test fallback logic"); + + // The model should inherit its resourceScope from the Get method's operationScope (Subscription) + // because the Get method operates at subscription scope and there are no explicit scope decorators + strictEqual( + resourceMetadataDecorator.arguments.resourceScope, + "Subscription" + ); + + // Verify the Get method itself has the correct scope + const getMethodEntry = resourceMetadataDecorator.arguments.methods.find( + (m: any) => m.methodId === getMethod.crossLanguageDefinitionId + ); + ok(getMethodEntry); + strictEqual(getMethodEntry.kind, "Get"); + strictEqual(getMethodEntry.operationScope, ResourceScope.Subscription); + }); }); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementInputLibrary.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementInputLibrary.cs index 925f9e258548..3e1061fcb473 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementInputLibrary.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementInputLibrary.cs @@ -15,7 +15,7 @@ public class ManagementInputLibrary : InputLibrary { private const string ResourceMetadataDecoratorName = "Azure.ClientGenerator.Core.@resourceSchema"; private const string NonResourceMethodMetadata = "Azure.ClientGenerator.Core.@nonResourceMethodSchema"; - private const string FlattenPropertyDecoratorName = "Azure.ClientGenerator.Core.@flattenProperty"; + private const string FlattenPropertyDecoratorName = "Azure.ResourceManager.@flattenProperty"; private IReadOnlyDictionary? _inputServiceMethodsByCrossLanguageDefinitionId; private IReadOnlyDictionary? _intMethodClientMap; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/RequestPathPattern.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/RequestPathPattern.cs index a489a0bf1d60..e3ea29a8d5b0 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/RequestPathPattern.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/RequestPathPattern.cs @@ -29,18 +29,19 @@ internal class RequestPathPattern : IEquatable, IReadOnlyLis public static readonly RequestPathPattern ManagementGroup = new("/providers/Microsoft.Management/managementGroups/{managementGroupId}"); public static readonly RequestPathPattern ResourceGroup = new("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"); public static readonly RequestPathPattern Subscription = new("/subscriptions/{subscriptionId}"); - public static readonly RequestPathPattern Extension = new("/{resourceUri}"); - public static readonly RequestPathPattern Tenant = new(string.Empty); - public static RequestPathPattern GetFromScope(ResourceScope scope) + public static RequestPathPattern GetFromScope(ResourceScope scope, RequestPathPattern? path = null) { return scope switch { ResourceScope.ResourceGroup => ResourceGroup, ResourceScope.Subscription => Subscription, ResourceScope.ManagementGroup => ManagementGroup, - ResourceScope.Extension => Extension, + ResourceScope.Extension => + path is null + ? throw new InvalidOperationException("Extension scope requires a path parameter.") + : new RequestPathPattern(path._segments.Take(1)), ResourceScope.Tenant => Tenant, _ => throw new InvalidOperationException($"Unhandled scope {scope}"), }; @@ -80,17 +81,23 @@ private static IReadOnlyList ParseSegments(string path) /// public bool IsAncestorOf(RequestPathPattern other) { + // Ancestor detection: compare only constant segments, skip variable segments. // To be the parent of other, you must at least be shorter than other. if (other.Count <= Count) return false; for (int i = 0; i < Count; i++) { - // we need the segment to be identical when strict is true (which is the default value) - // when strict is false, we also need the segment to be identical if it is constant. - // but if it is a reference, we only require they have the same type, do not require they have the same variable name. - // This case happens a lot during the management group parent detection - different RP calls this different things - if (!this[i].Equals(other[i])) + if (this[i].IsConstant) + { + if (!this[i].Equals(other[i])) + return false; + } + else // variable segment + { + if (!other[i].IsConstant) + continue; return false; + } } return true; } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceMetadata.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceMetadata.cs index f24396e27bae..cb89f2a16259 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceMetadata.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceMetadata.cs @@ -52,7 +52,7 @@ internal static ResourceMetadata DeserializeResourceMetadata(IReadOnlyDictionary } //TODO: handle Extension resource in emitter - if (resourceIdPattern is not null && resourceIdPattern.StartsWith("/{resourceUri}/")) + if (resourceIdPattern is not null && (resourceIdPattern.StartsWith("/{resourceUri}/") || resourceIdPattern.StartsWith("/{scope}/"))) { resourceScope = ResourceScope.Extension; } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs index 1de16ee7a777..ea0ccd5ba2cd 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/MockableResourceProvider.cs @@ -220,8 +220,10 @@ private IEnumerable BuildMethodsForResource(ResourceClientProvid // the first method is returning the collection var collection = resource.ResourceCollection!; var collectionMethodSignature = resource.FactoryMethodSignature; + var pathParameters = collection.PathParameters; + collectionMethodSignature.Update(parameters: [.. collectionMethodSignature.Parameters, .. pathParameters]); - var bodyStatement = Return(This.As().GetCachedClient(new CodeWriterDeclaration("client"), client => New.Instance(collection.Type, client, This.As().Id()))); + var bodyStatement = Return(This.As().GetCachedClient(new CodeWriterDeclaration("client"), client => New.Instance(collection.Type, [client, This.As().Id(), .. pathParameters]))); yield return new MethodProvider( collectionMethodSignature, bodyStatement, @@ -233,16 +235,16 @@ private IEnumerable BuildMethodsForResource(ResourceClientProvid if (getAsyncMethod is not null) { // we should be sure that this would never be null, but this null check here is just ensuring that we never crash - yield return BuildGetMethod(this, getAsyncMethod, collectionMethodSignature, $"Get{resource.ResourceName}Async"); + yield return BuildGetMethod(this, getAsyncMethod, collectionMethodSignature, pathParameters, $"Get{resource.ResourceName}Async"); } if (getMethod is not null) { // we should be sure that this would never be null, but this null check here is just ensuring that we never crash - yield return BuildGetMethod(this, getMethod, collectionMethodSignature, $"Get{resource.ResourceName}"); + yield return BuildGetMethod(this, getMethod, collectionMethodSignature, pathParameters, $"Get{resource.ResourceName}"); } - static MethodProvider BuildGetMethod(TypeProvider enclosingType, MethodProvider resourceGetMethod, MethodSignature collectionGetSignature, string methodName) + static MethodProvider BuildGetMethod(TypeProvider enclosingType, MethodProvider resourceGetMethod, MethodSignature collectionGetSignature, IReadOnlyList pathParameters, string methodName) { var signature = new MethodSignature( methodName, @@ -250,7 +252,7 @@ static MethodProvider BuildGetMethod(TypeProvider enclosingType, MethodProvider resourceGetMethod.Signature.Modifiers, resourceGetMethod.Signature.ReturnType, resourceGetMethod.Signature.ReturnDescription, - resourceGetMethod.Signature.Parameters, + [.. pathParameters, .. resourceGetMethod.Signature.Parameters], Attributes: [new AttributeStatement(typeof(ForwardsClientCallsAttribute))]); return new MethodProvider( @@ -265,7 +267,6 @@ static MethodProvider BuildGetMethod(TypeProvider enclosingType, MethodProvider private MethodProvider BuildResourceServiceMethod(ResourceClientProvider resource, ResourceMethod resourceMethod, bool isAsync) { var methodName = ResourceHelpers.GetExtensionOperationMethodName(resourceMethod.Kind, resource.ResourceName, isAsync); - return BuildServiceMethod(resourceMethod.InputMethod, resourceMethod.InputClient, isAsync, methodName); } @@ -274,8 +275,8 @@ private MethodProvider BuildServiceMethod(InputServiceMethod method, InputClient var clientInfo = _clientInfos[inputClient]; return method switch { - InputPagingServiceMethod pagingMethod => new PageableOperationMethodProvider(this, _contextualPath, clientInfo, pagingMethod, isAsync, methodName: methodName), - _ => new ResourceOperationMethodProvider(this, _contextualPath, clientInfo, method, isAsync, methodName: methodName) + InputPagingServiceMethod pagingMethod => new PageableOperationMethodProvider(this, _contextualPath, clientInfo, pagingMethod, isAsync, methodName), + _ => new ResourceOperationMethodProvider(this, _contextualPath, clientInfo, method, isAsync, methodName) }; } 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 84803c629fbd..fe35d7e737f3 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 @@ -94,7 +94,7 @@ protected MethodSignature CreateSignature() _convenienceMethod.Signature.Modifiers, returnType, returnDescription, - OperationMethodParameterHelper.GetOperationMethodParameters(_method, _contextualPath), + OperationMethodParameterHelper.GetOperationMethodParameters(_method, _contextualPath, _enclosingType), _convenienceMethod.Signature.Attributes, _convenienceMethod.Signature.GenericArguments, _convenienceMethod.Signature.GenericParameterConstraints, @@ -119,7 +119,8 @@ protected MethodBodyStatement[] BuildBodyStatements() { _restClientInfo.RestClient, }; - arguments.AddRange(_contextualPath.PopulateArguments(This.As().Id(), requestMethod.Signature.Parameters, contextVariable, _signature.Parameters)); + + arguments.AddRange(_contextualPath.PopulateArguments(This.As().Id(), requestMethod.Signature.Parameters, contextVariable, _signature.Parameters, _enclosingType)); // Handle ResourceData type conversion if needed if (_itemResourceClient != null) 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 397ce90e4ad1..06ef16f560d0 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 @@ -150,7 +150,7 @@ protected virtual MethodBodyStatement[] BuildBodyStatements() protected IReadOnlyList GetOperationMethodParameters() { - return OperationMethodParameterHelper.GetOperationMethodParameters(_serviceMethod, _contextualPath, _isFakeLongRunningOperation); + return OperationMethodParameterHelper.GetOperationMethodParameters(_serviceMethod, _contextualPath, _enclosingType, _isFakeLongRunningOperation); } protected virtual MethodSignature CreateSignature() @@ -178,8 +178,9 @@ private TryExpression BuildTryExpression() { ResourceMethodSnippets.CreateRequestContext(cancellationTokenParameter, out var contextVariable) }; + // Populate arguments for the REST client method call - var arguments = _contextualPath.PopulateArguments(This.As().Id(), requestMethod.Signature.Parameters, contextVariable, _signature.Parameters); + var arguments = _contextualPath.PopulateArguments(This.As().Id(), requestMethod.Signature.Parameters, contextVariable, _signature.Parameters, _enclosingType); tryStatements.Add(ResourceMethodSnippets.CreateHttpMessage(_restClientField, requestMethod.Signature.Name, arguments, out var messageVariable)); 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 327e5bbf3b86..b46bbc374050 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 @@ -86,6 +86,8 @@ private ResourceClientProvider(string resourceName, InputModelType model, IReadO internal ResourceCollectionClientProvider? ResourceCollection { get; private set; } + public RequestPathPattern ContextualPath => _contextualPath; + protected override string BuildName() => ResourceName.EndsWith("Resource") ? ResourceName : $"{ResourceName}Resource"; protected override FormattableString BuildDescription() => $"A class representing a {ResourceName} along with the instance operations that can be performed on it.\nIf you have a {typeof(ResourceIdentifier):C} you can construct a {Type:C} from an instance of {typeof(ArmClient):C} using the GetResource method.\nOtherwise you can get one from its parent resource {TypeOfParentResource:C} using the {FactoryMethodSignature.Name} method."; @@ -302,7 +304,7 @@ private ConstructorProvider BuildResourceIdentifierConstructor() } // TODO -- this is temporary. We should change this to find the corresponding parameters in ContextualParameters after it is refactored to consume parent resources. - private CSharpType GetPathParameterType(string parameterName) + public CSharpType GetPathParameterType(string parameterName) { foreach (var resourceMethod in _resourceServiceMethods) { 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 8e1b943e6da1..d148864ea34c 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 @@ -17,19 +17,19 @@ using Microsoft.TypeSpec.Generator.Providers; using Microsoft.TypeSpec.Generator.Snippets; using Microsoft.TypeSpec.Generator.Statements; -using Microsoft.TypeSpec.Generator.Expressions; using System; using System.Collections; using System.Collections.Generic; using System.IO; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; +using System.Linq; namespace Azure.Generator.Management.Providers { internal sealed class ResourceCollectionClientProvider : TypeProvider { private readonly ResourceMetadata _resourceMetadata; - + private readonly Dictionary _pathParameterMap; private readonly ResourceClientProvider _resource; private readonly ResourceMethod? _getAll; private readonly ResourceMethod? _create; @@ -49,6 +49,8 @@ internal ResourceCollectionClientProvider(ResourceClientProvider resource, Input _contextualPath = GetContextualRequestPattern(resourceMetadata); _resource = resource; + _pathParameterMap = BuildPathParameterMap(); + // Initialize client info dictionary using extension method _clientInfos = resourceMetadata.CreateClientInfosMap(this); @@ -71,6 +73,15 @@ private static RequestPathPattern GetContextualRequestPattern(ResourceMetadata r return new RequestPathPattern(resourceMetadata.ParentResourceId); } + if (resourceMetadata.ResourceScope == ResourceScope.Extension) + { + if (string.IsNullOrEmpty(resourceMetadata.ResourceIdPattern)) + { + throw new InvalidOperationException("Extension resource's IdPattern can't be empty or null."); + } + return RequestPathPattern.GetFromScope(resourceMetadata.ResourceScope, new RequestPathPattern(resourceMetadata.ResourceIdPattern)); + } + return RequestPathPattern.GetFromScope(resourceMetadata.ResourceScope); } @@ -103,6 +114,9 @@ private static void InitializeMethods( } public ResourceClientProvider Resource => _resource; + public IReadOnlyList PathParameterFields => _pathParameterMap.Values.ToList(); + public IReadOnlyList PathParameters => _pathParameterMap.Keys.ToList(); + public RequestPathPattern ContextualPath => _contextualPath; internal string ResourceName => _resource.ResourceName; internal ResourceScope ResourceScope => _resource.ResourceScope; @@ -142,6 +156,29 @@ protected override PropertyProvider[] BuildProperties() return [.. properties]; } + private Dictionary BuildPathParameterMap() + { + var map = new Dictionary(); + var diff = ContextualPath.TrimAncestorFrom(Resource.ContextualPath); + var variableSegments = diff.Where(seg => !seg.IsConstant).ToList(); + if (variableSegments.Count > 0) + { + variableSegments.RemoveAt(variableSegments.Count - 1); + } + foreach (var seg in variableSegments) + { + var parameter = new ParameterProvider( + seg.VariableName, + $"The {seg.VariableName} for the resource.", + Resource.GetPathParameterType(seg.VariableName)); + var field = new FieldProvider(FieldModifiers.Private | FieldModifiers.ReadOnly, Resource.GetPathParameterType(seg.VariableName), $"_{seg.VariableName}", this, description: $"The {seg.VariableName}."); + map.Add(parameter, field); + } + return map; + } + + // BuildPathParameters is now handled by BuildPathParametersAndFields + protected override FieldProvider[] BuildFields() { var fields = new List(); @@ -150,7 +187,7 @@ protected override FieldProvider[] BuildFields() fields.Add(clientInfo.DiagnosticsField); fields.Add(clientInfo.RestClientField); } - return [.. fields]; + return [ .. fields, .. _pathParameterMap.Values]; } protected override ConstructorProvider[] BuildConstructors() @@ -159,13 +196,17 @@ protected override ConstructorProvider[] BuildConstructors() private ConstructorProvider BuildResourceIdentifierConstructor() { var idParameter = new ParameterProvider("id", $"The identifier of the resource that is the target of operations.", typeof(ResourceIdentifier)); - var parameters = new List + var baseParameters = new List { new("client", $"The client parameters to use in these operations.", typeof(ArmClient)), idParameter }; - var initializer = new ConstructorInitializer(true, parameters); + var initializer = new ConstructorInitializer(true, baseParameters); + var parameters = new List(baseParameters); + + parameters.AddRange(_pathParameterMap.Keys); + var signature = new ConstructorSignature( Type, $"Initializes a new instance of {Type:C} class.", @@ -180,6 +221,12 @@ private ConstructorProvider BuildResourceIdentifierConstructor() bodyStatements.Add(thisCollection.TryGetApiVersion(_resourceTypeExpression, $"{ResourceName}ApiVersion".ToVariableName(), out var apiVersion).Terminate()); + // Assign all path parameter fields by assigning from the path parameters + foreach (var kvp in _pathParameterMap) + { + bodyStatements.Add(kvp.Value.Assign(kvp.Key).Terminate()); + } + // Initialize all client diagnostics and rest client fields foreach (var (inputClient, clientInfo) in _clientInfos) { @@ -285,8 +332,8 @@ private MethodProvider BuildGetAllMethod(ResourceMethod getAll, bool isAsync) var methodName = ResourceHelpers.GetOperationMethodName(ResourceOperationKind.List, isAsync); return getAll.InputMethod switch { - InputPagingServiceMethod pagingGetAll => new PageableOperationMethodProvider(this, _contextualPath, restClientInfo, pagingGetAll, isAsync, methodName: methodName), - _ => new ResourceOperationMethodProvider(this, _contextualPath, restClientInfo, getAll.InputMethod, isAsync, methodName: methodName) + InputPagingServiceMethod pagingGetAll => new PageableOperationMethodProvider(this, _contextualPath, restClientInfo, pagingGetAll, isAsync, methodName), + _ => new ResourceOperationMethodProvider(this, _contextualPath, restClientInfo, getAll.InputMethod, isAsync, methodName) }; } @@ -345,5 +392,13 @@ private List BuildGetIfExistsMethods() return result; } + + public bool TryGetPrivateFieldParameter(ParameterProvider parameter, out FieldProvider? matchingField) + { + matchingField = _pathParameterMap + .FirstOrDefault(kvp => kvp.Key.WireInfo.SerializedName.Equals(parameter.WireInfo.SerializedName, StringComparison.OrdinalIgnoreCase)) + .Value; + return matchingField != null; + } } } 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 38eb5a88892c..c3ebd94d95a9 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 @@ -3,6 +3,7 @@ using Azure.Generator.Management.Extensions; using Azure.Generator.Management.Models; +using Azure.Generator.Management.Primitives; using Azure.Generator.Management.Providers.OperationMethodProviders; using Azure.Generator.Management.Snippets; using Azure.Generator.Management.Utilities; @@ -116,7 +117,8 @@ protected List CreateRequestContextAndProcessMessage( }; var requestMethod = _getRestClient.GetRequestMethodByOperation(_getMethodProvider.Operation); - var arguments = _contextualPath.PopulateArguments(This.As().Id(), requestMethod.Signature.Parameters, contextVariable, _signature.Parameters); + + var arguments = _contextualPath.PopulateArguments(This.As().Id(), requestMethod.Signature.Parameters, contextVariable, _signature.Parameters, _enclosingType); statements.Add(ResourceMethodSnippets.CreateHttpMessage(_getRestClientField, "CreateGetRequest", arguments, out var messageVariable)); @@ -169,7 +171,7 @@ protected static MethodBodyStatement GetResourceDataStatements( return Declare( variableName, resourceClientProvider.ResourceData.Type, - new TupleExpression(This.Invoke(getMethod, [cancellationTokenParam], null, isAsync)) + new TupleExpression(This.Invoke(getMethod, [KnownAzureParameters.CancellationTokenWithoutDefault.PositionalReference(cancellationTokenParam)], null, isAsync)) .Property("Value").Property("Data"), out currentVar); } 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 a70cbf6bd989..824b91a263b5 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 @@ -60,9 +60,10 @@ private static void BuildContextualParameterHierarchy(RequestPathPattern current // using the reference name of the last segment as the parameter name, aka resourceGroupName parameterStack.Push(new ContextualParameter(current[^2].Value, current[^1].VariableName, id => id.ResourceGroupName())); } - else if (current == RequestPathPattern.Extension) + else if (current.Count == 1 && !current[0].IsConstant) // Extension resource case: single variable segment. Here we assume the extension resource's requestPathPattern start with one and only one variable segment { - parameterStack.Push(new ContextualParameter("resourceUri", "resourceUri", id => BuildParentInvocation(parentLayerCount, id))); + // Extension resource case: single variable segment + parameterStack.Push(new ContextualParameter(current[0].VariableName, current[0].VariableName, id => BuildParentInvocation(parentLayerCount, id))); } else { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/OperationMethodParameterHelper.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/OperationMethodParameterHelper.cs index 606c9b830ed1..a2d5cd5fd5ec 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/OperationMethodParameterHelper.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/OperationMethodParameterHelper.cs @@ -3,6 +3,7 @@ using Azure.Generator.Management.Models; using Azure.Generator.Management.Primitives; +using Azure.Generator.Management.Providers; using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Providers; @@ -17,6 +18,7 @@ internal static class OperationMethodParameterHelper public static IReadOnlyList GetOperationMethodParameters( InputServiceMethod serviceMethod, RequestPathPattern contextualPath, + TypeProvider? enclosingTypeProvider, bool forceLro = false) { var requiredParameters = new List(); @@ -36,21 +38,30 @@ public static IReadOnlyList GetOperationMethodParameters( } var outputParameter = ManagementClientGenerator.Instance.TypeFactory.CreateParameter(parameter)!; - if (!contextualPath.TryGetContextualParameter(outputParameter, out _)) + + if (contextualPath.TryGetContextualParameter(outputParameter, out _)) + { + continue; + } + + if (enclosingTypeProvider is ResourceCollectionClientProvider collectionProvider && + collectionProvider.TryGetPrivateFieldParameter(outputParameter, out _)) + { + continue; + } + + if (parameter.Type is InputModelType modelType && ManagementClientGenerator.Instance.InputLibrary.IsResourceModel(modelType)) + { + outputParameter.Update(name: "data"); + } + + if (parameter.IsRequired) + { + requiredParameters.Add(outputParameter); + } + else { - if (parameter.Type is InputModelType modelType && ManagementClientGenerator.Instance.InputLibrary.IsResourceModel(modelType)) - { - outputParameter.Update(name: "data"); - } - - if (parameter.IsRequired) - { - requiredParameters.Add(outputParameter); - } - else - { - optionalParameters.Add(outputParameter); - } + optionalParameters.Add(outputParameter); } } 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 7f5dcbb5d00f..4a9121c7b33c 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 @@ -80,9 +80,15 @@ private static bool HasDefaultPublicCtor(ModelProvider? innerModel) return false; } - public static MethodBodyStatement BuildGetter(bool? includeGetterNullCheck, PropertyProvider internalProperty, TypeProvider innerModel, PropertyProvider singleProperty) + public static MethodBodyStatement BuildGetter(bool? includeGetterNullCheck, PropertyProvider internalProperty, TypeProvider innerModel, PropertyProvider innerProperty) { var checkNullExpression = This.Property(internalProperty.Name).Is(Null); + // For collection types, we do not do null check and initialization in getter, they have been initialized in constructor. + if (innerProperty.Type.IsCollection && internalProperty.WireInfo?.IsRequired == true) + { + return new List() { Return(new MemberExpression(internalProperty, innerProperty.Name)) }; + } + if (includeGetterNullCheck == true) { return new List { @@ -90,25 +96,30 @@ public static MethodBodyStatement BuildGetter(bool? includeGetterNullCheck, Prop { internalProperty.Assign(New.Instance(innerModel.Type)).Terminate() }, - Return(new MemberExpression(internalProperty, singleProperty.Name)) + Return(new MemberExpression(internalProperty, innerProperty.Name)) }; } else if (includeGetterNullCheck == false) { - return Return(new TernaryConditionalExpression(checkNullExpression, Default, new MemberExpression(internalProperty, singleProperty.Name))); + return Return(new TernaryConditionalExpression(checkNullExpression, Default, new MemberExpression(internalProperty, innerProperty.Name))); } else { if (innerModel.Type.IsNullable) { - return Return(new MemberExpression(internalProperty.AsVariableExpression.NullConditional(), singleProperty.Name)); + return Return(new MemberExpression(internalProperty.AsVariableExpression.NullConditional(), innerProperty.Name)); } - return Return(new MemberExpression(internalProperty, singleProperty.Name)); + return Return(new MemberExpression(internalProperty, innerProperty.Name)); } } - public static MethodBodyStatement BuildSetterForPropertyFlatten(ModelProvider innerModel, PropertyProvider internalProperty, PropertyProvider innerProperty) + public static MethodBodyStatement? BuildSetterForPropertyFlatten(ModelProvider innerModel, PropertyProvider internalProperty, PropertyProvider innerProperty) { + if (innerProperty.Type.IsCollection) + { + return null; + } + var isNullableValueType = innerProperty.Type.IsValueType && innerProperty.Type.IsNullable; var setter = new List(); var internalPropertyExpression = This.Property(internalProperty.Name); @@ -122,26 +133,9 @@ public static MethodBodyStatement BuildSetterForPropertyFlatten(ModelProvider in return setter; } - public static Dictionary PopulateCollectionProperties(IEnumerable collectionTypeProperties) - { - var result = new Dictionary(); - foreach (var property in collectionTypeProperties) - { - var propertyValue = Value.Property(property.Name); - if (property.Type.IsList) - { - result.Add(Identifier(property.Name), New.Instance(ManagementClientGenerator.Instance.TypeFactory.ListInitializationType.MakeGenericType(property.Type.Arguments))); - } - if (property.Type.IsDictionary) - { - result.Add(Identifier(property.Name), New.Instance(ManagementClientGenerator.Instance.TypeFactory.DictionaryInitializationType.MakeGenericType(property.Type.Arguments))); - } - } - return result; - } - - public static MethodBodyStatement BuildSetterForSafeFlatten(bool includeSetterCheck, ModelProvider innerModel, PropertyProvider internalProperty, PropertyProvider innerProperty) + public static MethodBodyStatement? BuildSetterForSafeFlatten(bool includeSetterCheck, ModelProvider innerModel, PropertyProvider internalProperty, PropertyProvider innerProperty) { + // To not introduce breaking change, for collection types, we keep the setter for collection-type properties during safe flatten. var isOverriddenValueType = IsOverriddenValueType(innerProperty); var setter = new List(); var internalPropertyExpression = This.Property(internalProperty.Name); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/RequestPathPatternExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/RequestPathPatternExtensions.cs index af6b52e3002d..09d8d4fd5195 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/RequestPathPatternExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/RequestPathPatternExtensions.cs @@ -3,6 +3,7 @@ using Azure.Core; using Azure.Generator.Management.Models; +using Azure.Generator.Management.Providers; using Azure.Generator.Management.Visitors; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; @@ -22,7 +23,8 @@ public static IReadOnlyList PopulateArguments( ScopedApi idProperty, IReadOnlyList requestParameters, VariableExpression requestContext, - IReadOnlyList methodParameters) + IReadOnlyList methodParameters, + TypeProvider? enclosingType = null) { var arguments = new List(); // here we always assume that the parameter name matches the parameter name in the request path. @@ -33,6 +35,11 @@ public static IReadOnlyList PopulateArguments( { arguments.Add(Convert(contextualParameter.BuildValueExpression(idProperty), typeof(string), parameter.Type)); } + //Find matching parameter from pathFieldsParameters if enclosing type is ResourceCollectionClientProvider + else if (enclosingType is ResourceCollectionClientProvider collectionProvider && collectionProvider.TryGetPrivateFieldParameter(parameter, out var matchingField) && matchingField != null) + { + arguments.Add(matchingField); + } else if (parameter.Type.Equals(typeof(RequestContent))) { // find the body parameter @@ -52,10 +59,18 @@ public static IReadOnlyList PopulateArguments( } else { - var methodParam = methodParameters.Single(p => p.WireInfo.SerializedName == parameter.WireInfo.SerializedName); - arguments.Add(Convert(methodParam, methodParam.Type, parameter.Type)); + var methodParam = methodParameters.SingleOrDefault(p => p.WireInfo.SerializedName == parameter.WireInfo.SerializedName); + if (methodParam != null) + { + arguments.Add(Convert(methodParam, methodParam.Type, parameter.Type)); + } + else + { + arguments.Add(Null); + } } } + return arguments; static ValueExpression Convert(ValueExpression expression, CSharpType fromType, CSharpType toType) 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 c787d98b6a1f..43886f3c9b1b 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 @@ -9,6 +9,7 @@ using Microsoft.TypeSpec.Generator.Providers; using Microsoft.TypeSpec.Generator.Snippets; using Microsoft.TypeSpec.Generator.Statements; +using System; using System.Collections.Generic; using System.Linq; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; @@ -36,41 +37,55 @@ internal class FlattenPropertyVisitor : ScmLibraryVisitor if (type is ModelProvider model && _collectionTypeProperties.TryGetValue(model, out var value)) { - foreach (var (internalProperty, collectionProperties) in value) + foreach (var internalProperty in value) { - var innerCollectionProperties = collectionProperties.Select(x => x.InnerProperty); - var initializationMethod = BuildInitializationMethod(innerCollectionProperties, internalProperty, model); - var publicConstructor = model.Constructors.Single(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Public)); - var invokeInitialization = This.Invoke(initializationMethod.Signature.Name).Terminate(); + var publicConstructor = model.Constructors.SingleOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Public)); + if (publicConstructor is null) + { + continue; + } + var internalPropertyTypeConstructor = ManagementClientGenerator.Instance.TypeFactory.CSharpTypeMap[internalProperty.Type]!.Constructors.Single(c => c.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Public)); + var initializationParameters = PopulateInitializationParameters(publicConstructor, internalPropertyTypeConstructor); + var initialization = internalProperty.Assign(New.Instance(internalProperty.Type, initializationParameters)).Terminate(); // If the property is a collection type, we need to ensure that it is initialized if (publicConstructor.BodyStatements is null) { - publicConstructor.Update(bodyStatements: new List { invokeInitialization }); + publicConstructor.Update(bodyStatements: new List { initialization }); } else { var body = publicConstructor.BodyStatements.ToList(); - body.Add(invokeInitialization); + body.Add(initialization); publicConstructor.Update(bodyStatements: body); } - model.Update(methods: [.. model.Methods, initializationMethod]); } } return base.PostVisitType(type); } - internal const string s_initializationMethodName = "Initialize"; - private MethodProvider BuildInitializationMethod(IEnumerable collectionTypeProperties, PropertyProvider internalProperty, ModelProvider model) + private ValueExpression[] PopulateInitializationParameters(ConstructorProvider publicConstructor, ConstructorProvider internalPropertyTypeConstructor) { - var signature = new MethodSignature($"{s_initializationMethodName}{internalProperty.Type.Name}", null, MethodSignatureModifiers.Private, null, null, []); - MethodBodyStatement[] body = [ - new IfStatement(This.Property(internalProperty.Name).Is(Null)) - { - internalProperty.Assign(New.Instance(internalProperty.Type, PropertyHelpers.PopulateCollectionProperties(collectionTypeProperties))).Terminate() - },]; - return new MethodProvider(signature, body, model); + var parameters = new List(); + foreach (var parameter in internalPropertyTypeConstructor.Signature.Parameters) + { + if (parameter.Type.IsList) + { + parameters.Add(New.Instance(ManagementClientGenerator.Instance.TypeFactory.ListInitializationType.MakeGenericType(parameter.Type.Arguments))); + } + else if (parameter.Type.IsDictionary) + { + parameters.Add(New.Instance(ManagementClientGenerator.Instance.TypeFactory.DictionaryInitializationType.MakeGenericType(parameter.Type.Arguments))); + } + else + { + var constructorParameter = publicConstructor.Signature.Parameters.Single(p => p.Name.Equals(parameter.Name, System.StringComparison.OrdinalIgnoreCase)); + + parameters.Add(constructorParameter); + } + } + return parameters.ToArray(); } private void UpdateModelFactory(ModelFactoryProvider modelFactory) @@ -256,7 +271,7 @@ int GetAdditionalPropertyIndex() // So that, we can use this to update the model factory methods later. private readonly Dictionary>> _flattenedModelTypes = new(); // TODO: Workadound to initialize all collection-type properties in all collection-type setters, remove this once we have lazy initializtion for collection-type properties - private readonly Dictionary>> _collectionTypeProperties = new(); + private readonly Dictionary> _collectionTypeProperties = new(); private void FlattenProperties(ModelProvider model) { var isFlattened = false; @@ -281,11 +296,12 @@ private void FlattenProperties(ModelProvider model) foreach (var innerProperty in innerProperties) { + CollectFlattenTypeCollectionProperty(property, innerProperty, model); // flatten the property to public and associate it with the internal property var (_, includeGetterNullCheck, _) = PropertyHelpers.GetFlags(property, innerProperty); var flattenPropertyName = innerProperty.Name; // TODO: handle name conflicts var flattenPropertyBody = new MethodPropertyBody( - PropertyHelpers.BuildGetter(includeGetterNullCheck == true && !innerProperty.Type.IsCollection, property, modelProvider, innerProperty), + PropertyHelpers.BuildGetter(includeGetterNullCheck, property, modelProvider, innerProperty), !innerProperty.Body.HasSetter ? null : PropertyHelpers.BuildSetterForPropertyFlatten(modelProvider, property, innerProperty) ); @@ -304,7 +320,6 @@ private void FlattenProperties(ModelProvider model) innerProperty.Attributes); flattenedProperties.Add((isOverriddenValueType, flattenedProperty)); - AddInternalSetterForFlattenTypeCollectionProperty(property, innerProperty, flattenedProperty, model); } // make the internalized properties internal property.Update(modifiers: property.Modifiers & ~MethodSignatureModifiers.Public | MethodSignatureModifiers.Internal); @@ -322,28 +337,20 @@ private void FlattenProperties(ModelProvider model) } // TODO: workaround to add internal setter, we should remove this once we add lazy initialization for collection type properties - private void AddInternalSetterForFlattenTypeCollectionProperty(PropertyProvider internalProperty, PropertyProvider innerProperty, PropertyProvider flattenedProperty, ModelProvider modelProvider) + private void CollectFlattenTypeCollectionProperty(PropertyProvider internalProperty, PropertyProvider innerProperty, ModelProvider modelProvider) { if (innerProperty.Type.IsCollection) { if (_collectionTypeProperties.TryGetValue(modelProvider, out var value)) { - if (value.TryGetValue(internalProperty, out var properties)) - { - properties.Add((flattenedProperty, innerProperty)); - } - else - { - value.Add(internalProperty, [(flattenedProperty, innerProperty)]); - } + value.Add(internalProperty); } else { - var dict = new Dictionary>(); - dict.Add(internalProperty, [(flattenedProperty, innerProperty)]); - _collectionTypeProperties.Add(modelProvider, dict); + var set = new HashSet(); + set.Add(internalProperty); + _collectionTypeProperties.Add(modelProvider, set); } - innerProperty.Update(body: new AutoPropertyBody(true, MethodSignatureModifiers.Internal)); } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTag.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTag.cs index 292c51ba3e8e..5eb1048c3978 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTag.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTag.cs @@ -21,7 +21,7 @@ } else { - global::Samples.Models.ResponseTypeData current = (this.Get(cancellationToken)).Value.Data; + global::Samples.Models.ResponseTypeData current = (this.Get(cancellationToken: cancellationToken)).Value.Data; global::Samples.Models.ResponseTypeData patch = new global::Samples.Models.ResponseTypeData(); foreach (global::System.Collections.Generic.KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTagAsync.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTagAsync.cs index dd1af0434e78..ca596162e938 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTagAsync.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_AddTagAsync.cs @@ -21,7 +21,7 @@ } else { - global::Samples.Models.ResponseTypeData current = (await this.GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + global::Samples.Models.ResponseTypeData current = (await this.GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; global::Samples.Models.ResponseTypeData patch = new global::Samples.Models.ResponseTypeData(); foreach (global::System.Collections.Generic.KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTag.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTag.cs index f5a815e1792b..5fbfa777d26d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTag.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTag.cs @@ -20,7 +20,7 @@ } else { - global::Samples.Models.ResponseTypeData current = (this.Get(cancellationToken)).Value.Data; + global::Samples.Models.ResponseTypeData current = (this.Get(cancellationToken: cancellationToken)).Value.Data; global::Samples.Models.ResponseTypeData patch = new global::Samples.Models.ResponseTypeData(); foreach (global::System.Collections.Generic.KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTagAsync.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTagAsync.cs index efa5fe022734..4e03018f975d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTagAsync.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_RemoveTagAsync.cs @@ -20,7 +20,7 @@ } else { - global::Samples.Models.ResponseTypeData current = (await this.GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + global::Samples.Models.ResponseTypeData current = (await this.GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; global::Samples.Models.ResponseTypeData patch = new global::Samples.Models.ResponseTypeData(); foreach (global::System.Collections.Generic.KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTags.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTags.cs index 379079e7ad54..383b1cb7f097 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTags.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTags.cs @@ -21,7 +21,7 @@ } else { - global::Samples.Models.ResponseTypeData current = (this.Get(cancellationToken)).Value.Data; + global::Samples.Models.ResponseTypeData current = (this.Get(cancellationToken: cancellationToken)).Value.Data; global::Samples.Models.ResponseTypeData patch = new global::Samples.Models.ResponseTypeData(); patch.Tags.ReplaceWith(tags); global::Azure.Response result = this.Update(patch, cancellationToken); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTagsAsync.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTagsAsync.cs index 6a09479451db..31bec31e8692 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTagsAsync.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/TagMethodProviderTests/Verify_SetTagsAsync.cs @@ -21,7 +21,7 @@ } else { - global::Samples.Models.ResponseTypeData current = (await this.GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + global::Samples.Models.ResponseTypeData current = (await this.GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; global::Samples.Models.ResponseTypeData patch = new global::Samples.Models.ResponseTypeData(); patch.Tags.ReplaceWith(tags); global::Azure.Response result = await this.UpdateAsync(patch, cancellationToken).ConfigureAwait(false); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/RequestPathPatternTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/RequestPathPatternTests.cs new file mode 100644 index 000000000000..469e88c3b1ef --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/RequestPathPatternTests.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Generator.Management.Models; +using NUnit.Framework; + +namespace Azure.Generator.Management.Tests +{ + public class RequestPathPatternTests + { + [TestCase("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", true)] + [TestCase("/subscriptions/{subscriptionId}", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}", true)] + [TestCase("/subscriptions/{subscriptionId}", "/providers/Microsoft.Management/managementGroups/{managementGroupId}", false)] + public void IsAncestorOf_BasicCases(string ancestor, string descendant, bool expected) + { + var ancestorPattern = new RequestPathPattern(ancestor); + var descendantPattern = new RequestPathPattern(descendant); + Assert.AreEqual(expected, ancestorPattern.IsAncestorOf(descendantPattern)); + } + + [Test] + public void IsAncestorOf_AncestorMustBeShorterThanDescendant() + { + var ancestorPattern = new RequestPathPattern("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"); + var childPattern = new RequestPathPattern("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"); + // Ancestor and child are the same length, should return false + Assert.IsFalse(ancestorPattern.IsAncestorOf(childPattern)); + + var longerAncestor = new RequestPathPattern("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage"); + var shorterChild = new RequestPathPattern("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"); + // Ancestor is longer than child, should return false + Assert.IsFalse(longerAncestor.IsAncestorOf(shorterChild)); + } + + [Test] + public void IsAncestorOf_VariableSegmentCheck() + { + var ancestorPattern = new RequestPathPattern("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"); + var descendantPattern = new RequestPathPattern("/subscriptions/{otherSub}/resourceGroups/{otherGroup}/providers/Microsoft.Storage/storageAccounts/{accountName}"); + Assert.IsTrue(ancestorPattern.IsAncestorOf(descendantPattern)); + } + + [Test] + public void IsAncestorOf_ConstantSegmentMismatch() + { + var ancestorPattern = new RequestPathPattern("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"); + var descendantPattern = new RequestPathPattern("/tenants/{tenantId}/resourceGroups/{resourceGroupName}"); + Assert.IsFalse(ancestorPattern.IsAncestorOf(descendantPattern)); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/bar.tsp b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/bar.tsp index 2b0ea5185f81..524755706f4d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/bar.tsp +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/bar.tsp @@ -51,6 +51,7 @@ model BarSettingsResource is ProxyResource { property: BarQuotaProperties; anotherProperty: BarQuotaProperties; flattenedNestedProperty: BarNestedQuotaProperties; + optionalFlattenProperty?: optionalFlattenPropertyType; } @parentResource(Bar) @@ -68,6 +69,10 @@ model BarMiddleNestedQuotaProperties extends BarDeeplyNestedQuotaProperties { middleProp2: Record; } +model optionalFlattenPropertyType { + randomCollectionProp: string[]; +} + model BarDeeplyNestedQuotaProperties { innerProp1?: int32; innerProp2: string; diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/databox.tsp b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/databox.tsp new file mode 100644 index 000000000000..c056ec5dcf07 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/databox.tsp @@ -0,0 +1,56 @@ +import "@typespec/rest"; +import "@typespec/openapi"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +namespace MgmtTypeSpec; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + + +model JobResource + is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = JobResource, + KeyName = "jobName", + SegmentName = "jobs", + NamePattern = "^[-\\w\\.]+$" + >; +} + +model JobProperties { + jobName: string; +} + +@armResourceOperations +interface JobResources { + /** + * Gets information about the specified job. + */ + get is ArmResourceRead< + JobResource, + Parameters = { + /** + * $expand is supported on details parameter for job, which provides details on the job stages. + */ + @query("$expand") + $expand?: string; + }, + >; + + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + @patch(#{ implicitOptionality: false }) + update is ArmCustomPatchAsync< + JobResource, + PatchModel = JobResourceUpdateParameter, + >; +} + +model JobResourceUpdateParameter { + properties?: JobProperties; + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + tags?: Record; +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/main.tsp b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/main.tsp index 63846603a96f..39a5860551d4 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/main.tsp +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/main.tsp @@ -7,7 +7,9 @@ import "./baz.tsp"; import "./zoo.tsp"; import "./routes.tsp"; import "./endpoint.tsp"; - +import "./selfhelp.tsp"; +import "./playwright.tsp"; +import "./databox.tsp"; using TypeSpec.Versioning; using Azure.ClientGenerator.Core; using Azure.ResourceManager; @@ -34,4 +36,4 @@ enum Versions { @@clientLocation(Bars.update, "Bar"); #suppress "deprecated" -@@flattenProperty(BarSettingsResource.flattenedNestedProperty); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BarSettingsResource.flattenedNestedProperty); \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/playwright.tsp b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/playwright.tsp new file mode 100644 index 000000000000..cd61c3737626 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/playwright.tsp @@ -0,0 +1,44 @@ +import "@typespec/rest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +namespace MgmtTypeSpec; + +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Rest; + +@doc("Subscription-level location-based Playwright quota resource.") +@parentResource(SubscriptionLocationResource) +model PlaywrightQuota is ProxyResource { + ...ResourceNameParameter; +} + +@doc("Playwright quota names.") +union PlaywrightQuotaName { + string, + + @doc("Quota for execution duration in minutes.") + ExecutionMinutes: "ExecutionMinutes", +} + +@doc("Subscription-level location-based Playwright quota resource properties.") +model PlaywrightQuotaProperties { + @visibility(Lifecycle.Read) + @doc("The subscription-level location-based Playwright quota resource free-trial properties.") + freeTrial?: string; + + @visibility(Lifecycle.Read) + @doc("The status of the last resource operation.") + provisioningState?: string; +} + + +@armResourceOperations +interface PlaywrightQuotas { + @doc("Get subscription-level location-based Playwright quota resource by name.") + get is ArmResourceRead; + + @doc("List Playwright quota resources for a given subscription Id.") + listBySubscription is ArmListBySubscription; +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/selfhelp.tsp b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/selfhelp.tsp new file mode 100644 index 000000000000..146904514395 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/selfhelp.tsp @@ -0,0 +1,30 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; + +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace MgmtTypeSpec; + +model SelfHelpResource + is Azure.ResourceManager.ExtensionResource { + ...ResourceNameParameter< + Resource = SelfHelpResource, + KeyName = "selfHelpName", + SegmentName = "selfHelps", + NamePattern = "" + >; +} + +model SelfHelpResourceProperties { + selfHelpId: string; +} + +#suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" +@armResourceOperations +interface SolutionResources { + get is Extension.Read; +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.Serialization.cs index 6e680bc60eb8..ab171884174d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.Serialization.cs @@ -82,7 +82,7 @@ internal static BarData DeserializeBarData(JsonElement element, ModelReaderWrite SystemData systemData = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); IDictionary tags = default; - string location = default; + AzureLocation location = default; BarProperties properties = default; foreach (var prop in element.EnumerateObject()) { @@ -141,7 +141,7 @@ internal static BarData DeserializeBarData(JsonElement element, ModelReaderWrite } if (prop.NameEquals("location"u8)) { - location = prop.Value.GetString(); + location = new AzureLocation(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.cs index 5e7c9fbd91b1..3e8990dd5d99 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarData.cs @@ -21,11 +21,8 @@ public partial class BarData : TrackedResourceData /// Initializes a new instance of . /// The geo-location where the resource lives. - /// is null. - public BarData(string location) : base(location) + public BarData(AzureLocation location) : base(location) { - Argument.AssertNotNull(location, nameof(location)); - } /// Initializes a new instance of . @@ -37,7 +34,7 @@ public BarData(string location) : base(location) /// Resource tags. /// The geo-location where the resource lives. /// The resource-specific properties for this resource. - internal BarData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, string location, BarProperties properties) : base(id, name, resourceType, systemData, tags, location) + internal BarData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, BarProperties properties) : base(id, name, resourceType, systemData, tags, location) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarResource.cs index c37df128d954..630ec7b4f696 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarResource.cs @@ -305,7 +305,7 @@ public virtual async Task> AddTagAsync(string key, string } else { - BarData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + BarData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; BarData patch = new BarData(); foreach (KeyValuePair tag in current.Tags) { @@ -353,7 +353,7 @@ public virtual Response AddTag(string key, string value, Cancellati } else { - BarData current = Get(cancellationToken).Value.Data; + BarData current = Get(cancellationToken: cancellationToken).Value.Data; BarData patch = new BarData(); foreach (KeyValuePair tag in current.Tags) { @@ -400,7 +400,7 @@ public virtual async Task> SetTagsAsync(IDictionary result = await UpdateAsync(patch, cancellationToken).ConfigureAwait(false); @@ -443,7 +443,7 @@ public virtual Response SetTags(IDictionary tags, C } else { - BarData current = Get(cancellationToken).Value.Data; + BarData current = Get(cancellationToken: cancellationToken).Value.Data; BarData patch = new BarData(); patch.Tags.ReplaceWith(tags); Response result = Update(patch, cancellationToken); @@ -485,7 +485,7 @@ public virtual async Task> RemoveTagAsync(string key, Canc } else { - BarData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + BarData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; BarData patch = new BarData(); foreach (KeyValuePair tag in current.Tags) { @@ -531,7 +531,7 @@ public virtual Response RemoveTag(string key, CancellationToken can } else { - BarData current = Get(cancellationToken).Value.Data; + BarData current = Get(cancellationToken: cancellationToken).Value.Data; BarData patch = new BarData(); foreach (KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.Serialization.cs index 15b3d6d9feb4..c4083ea1e27e 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.Serialization.cs @@ -70,6 +70,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(AnotherProperty, options); writer.WritePropertyName("flattenedNestedProperty"u8); writer.WriteObjectValue(FlattenedNestedProperty, options); + if (Optional.IsDefined(OptionalFlattenProperty)) + { + writer.WritePropertyName("optionalFlattenProperty"u8); + writer.WriteObjectValue(OptionalFlattenProperty, options); + } } /// The JSON reader. @@ -107,6 +112,7 @@ internal static BarSettingsResourceData DeserializeBarSettingsResourceData(JsonE BarQuotaProperties @property = default; BarQuotaProperties anotherProperty = default; BarNestedQuotaProperties flattenedNestedProperty = default; + OptionalFlattenPropertyType optionalFlattenProperty = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("id"u8)) @@ -186,6 +192,15 @@ internal static BarSettingsResourceData DeserializeBarSettingsResourceData(JsonE flattenedNestedProperty = BarNestedQuotaProperties.DeserializeBarNestedQuotaProperties(prop.Value, options); continue; } + if (prop.NameEquals("optionalFlattenProperty"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + optionalFlattenProperty = OptionalFlattenPropertyType.DeserializeOptionalFlattenPropertyType(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -201,7 +216,8 @@ internal static BarSettingsResourceData DeserializeBarSettingsResourceData(JsonE stringArray ?? new ChangeTrackingList(), @property, anotherProperty, - flattenedNestedProperty); + flattenedNestedProperty, + optionalFlattenProperty); } /// The client options for reading and writing models. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.cs index df5a31fc8960..66839da53e1b 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResourceData.cs @@ -36,7 +36,7 @@ public BarSettingsResourceData(BarQuotaProperties @property, BarQuotaProperties InnerProp2 = innerProp2; MiddleProp1 = middleProp1; Prop2 = prop2; - InitializeBarNestedQuotaProperties(); + FlattenedNestedProperty = new BarNestedQuotaProperties(innerProp2, middleProp1, new ChangeTrackingDictionary(), new ChangeTrackingList(), prop2); } /// Initializes a new instance of . @@ -50,7 +50,8 @@ public BarSettingsResourceData(BarQuotaProperties @property, BarQuotaProperties /// /// /// - internal BarSettingsResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, BarSettingsProperties properties, IList stringArray, BarQuotaProperties @property, BarQuotaProperties anotherProperty, BarNestedQuotaProperties flattenedNestedProperty) : base(id, name, resourceType, systemData) + /// + internal BarSettingsResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, BarSettingsProperties properties, IList stringArray, BarQuotaProperties @property, BarQuotaProperties anotherProperty, BarNestedQuotaProperties flattenedNestedProperty, OptionalFlattenPropertyType optionalFlattenProperty) : base(id, name, resourceType, systemData) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; @@ -58,6 +59,7 @@ internal BarSettingsResourceData(ResourceIdentifier id, string name, ResourceTyp Property = @property; AnotherProperty = anotherProperty; FlattenedNestedProperty = flattenedNestedProperty; + OptionalFlattenProperty = optionalFlattenProperty; } /// The resource-specific properties for this resource. @@ -75,6 +77,9 @@ internal BarSettingsResourceData(ResourceIdentifier id, string name, ResourceTyp /// Gets or sets the FlattenedNestedProperty. internal BarNestedQuotaProperties FlattenedNestedProperty { get; set; } + /// Gets or sets the OptionalFlattenProperty. + internal OptionalFlattenPropertyType OptionalFlattenProperty { get; set; } + /// Gets or sets the InnerProp1. public int? InnerProp1 { @@ -131,7 +136,7 @@ public IDictionary MiddleProp2 { get { - return FlattenedNestedProperty is null ? default : FlattenedNestedProperty.MiddleProp2; + return FlattenedNestedProperty.MiddleProp2; } } @@ -140,7 +145,7 @@ public IList Prop1 { get { - return FlattenedNestedProperty is null ? default : FlattenedNestedProperty.Prop1; + return FlattenedNestedProperty.Prop1; } } @@ -196,15 +201,16 @@ public int? AnotherPropertyLeft } } - private void InitializeBarNestedQuotaProperties() + /// Gets the RandomCollectionProp. + public IList OptionalFlattenPropertyRandomCollectionProp { - if (FlattenedNestedProperty is null) + get { - FlattenedNestedProperty = new BarNestedQuotaProperties - { - MiddleProp2 = new ChangeTrackingDictionary(), - Prop1 = new ChangeTrackingList() - }; + return OptionalFlattenProperty is null ? default : OptionalFlattenProperty.RandomCollectionProp; + } + set + { + OptionalFlattenProperty = new OptionalFlattenPropertyType(value); } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.Serialization.cs index 8f0b71710483..dc03094c000b 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.Serialization.cs @@ -82,7 +82,7 @@ internal static BazData DeserializeBazData(JsonElement element, ModelReaderWrite SystemData systemData = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); IDictionary tags = default; - string location = default; + AzureLocation location = default; BazProperties properties = default; foreach (var prop in element.EnumerateObject()) { @@ -141,7 +141,7 @@ internal static BazData DeserializeBazData(JsonElement element, ModelReaderWrite } if (prop.NameEquals("location"u8)) { - location = prop.Value.GetString(); + location = new AzureLocation(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.cs index 1522a315144d..224ef09843a1 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazData.cs @@ -21,11 +21,8 @@ public partial class BazData : TrackedResourceData /// Initializes a new instance of . /// The geo-location where the resource lives. - /// is null. - public BazData(string location) : base(location) + public BazData(AzureLocation location) : base(location) { - Argument.AssertNotNull(location, nameof(location)); - } /// Initializes a new instance of . @@ -37,7 +34,7 @@ public BazData(string location) : base(location) /// Resource tags. /// The geo-location where the resource lives. /// The resource-specific properties for this resource. - internal BazData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, string location, BazProperties properties) : base(id, name, resourceType, systemData, tags, location) + internal BazData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, BazProperties properties) : base(id, name, resourceType, systemData, tags, location) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazResource.cs index a493c7add159..741f96823210 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BazResource.cs @@ -314,7 +314,7 @@ public virtual async Task> AddTagAsync(string key, string } else { - BazData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + BazData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; BazData patch = new BazData(); foreach (KeyValuePair tag in current.Tags) { @@ -362,7 +362,7 @@ public virtual Response AddTag(string key, string value, Cancellati } else { - BazData current = Get(cancellationToken).Value.Data; + BazData current = Get(cancellationToken: cancellationToken).Value.Data; BazData patch = new BazData(); foreach (KeyValuePair tag in current.Tags) { @@ -409,7 +409,7 @@ public virtual async Task> SetTagsAsync(IDictionary result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); @@ -452,7 +452,7 @@ public virtual Response SetTags(IDictionary tags, C } else { - BazData current = Get(cancellationToken).Value.Data; + BazData current = Get(cancellationToken: cancellationToken).Value.Data; BazData patch = new BazData(); patch.Tags.ReplaceWith(tags); ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); @@ -494,7 +494,7 @@ public virtual async Task> RemoveTagAsync(string key, Canc } else { - BazData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + BazData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; BazData patch = new BazData(); foreach (KeyValuePair tag in current.Tags) { @@ -540,7 +540,7 @@ public virtual Response RemoveTag(string key, CancellationToken can } else { - BazData current = Get(cancellationToken).Value.Data; + BazData current = Get(cancellationToken: cancellationToken).Value.Data; BazData patch = new BazData(); foreach (KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs index a7e1312b88db..0a97588f3d1c 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MgmtTypeSpecExtensions.cs @@ -174,6 +174,82 @@ public static async Task> GetEndpointResourceAsync(th return await GetMockableMgmtTypeSpecArmClient(client).GetEndpointResourceAsync(scope, endpointName, cancellationToken).ConfigureAwait(false); } + /// 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 SelfHelpResource GetSelfHelpResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMgmtTypeSpecArmClient(client).GetSelfHelpResource(id); + } + + /// Gets a collection of objects within the specified scope. + /// The the method will execute against. + /// The scope of the resource collection to get. + /// is null. + /// Returns a collection of objects. + public static SelfHelpResourceCollection GetSelfHelpResources(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMgmtTypeSpecArmClient(client).GetSelfHelpResources(scope); + } + + /// Get a SelfHelpResource. + /// The the method will execute against. + /// The scope of the resource collection to get. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + [ForwardsClientCalls] + public static Response GetSelfHelpResource(this ArmClient client, ResourceIdentifier scope, string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMgmtTypeSpecArmClient(client).GetSelfHelpResource(scope, selfHelpName, cancellationToken); + } + + /// Get a SelfHelpResource. + /// The the method will execute against. + /// The scope of the resource collection to get. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + [ForwardsClientCalls] + public static async Task> GetSelfHelpResourceAsync(this ArmClient client, ResourceIdentifier scope, string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableMgmtTypeSpecArmClient(client).GetSelfHelpResourceAsync(scope, selfHelpName, cancellationToken).ConfigureAwait(false); + } + + /// 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 PlaywrightQuotaResource GetPlaywrightQuotaResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMgmtTypeSpecArmClient(client).GetPlaywrightQuotaResource(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. + /// is null. + /// Returns a object. + public static JobResource GetJobResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMgmtTypeSpecArmClient(client).GetJobResource(id); + } + /// Gets a collection of Foos in the . /// The the method will execute against. /// is null. @@ -296,6 +372,85 @@ public static Response GetZoo(this ResourceGroupResource resourceGr return GetMockableMgmtTypeSpecResourceGroupResource(resourceGroupResource).GetZoo(zooName, cancellationToken); } + /// Gets a collection of JobResources in the . + /// The the method will execute against. + /// is null. + /// An object representing collection of JobResources and their operations over a JobResource. + public static JobResourceCollection GetJobResources(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableMgmtTypeSpecResourceGroupResource(resourceGroupResource).GetJobResources(); + } + + /// Gets information about the specified job. + /// The the method will execute against. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + [ForwardsClientCalls] + public static async Task> GetJobResourceAsync(this ResourceGroupResource resourceGroupResource, string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableMgmtTypeSpecResourceGroupResource(resourceGroupResource).GetJobResourceAsync(jobName, expand, cancellationToken).ConfigureAwait(false); + } + + /// Gets information about the specified job. + /// The the method will execute against. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + [ForwardsClientCalls] + public static Response GetJobResource(this ResourceGroupResource resourceGroupResource, string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableMgmtTypeSpecResourceGroupResource(resourceGroupResource).GetJobResource(jobName, expand, cancellationToken); + } + + /// Gets a collection of PlaywrightQuotas in the . + /// The the method will execute against. + /// The location for the resource. + /// is null. + /// An object representing collection of PlaywrightQuotas and their operations over a PlaywrightQuotaResource. + public static PlaywrightQuotaCollection GetPlaywrightQuotas(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableMgmtTypeSpecSubscriptionResource(subscriptionResource).GetPlaywrightQuotas(location); + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The the method will execute against. + /// The location for the resource. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + /// is null. + [ForwardsClientCalls] + public static async Task> GetPlaywrightQuotaAsync(this SubscriptionResource subscriptionResource, AzureLocation location, PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableMgmtTypeSpecSubscriptionResource(subscriptionResource).GetPlaywrightQuotaAsync(location, playwrightQuotaName, cancellationToken).ConfigureAwait(false); + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The the method will execute against. + /// The location for the resource. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + /// is null. + [ForwardsClientCalls] + public static Response GetPlaywrightQuota(this SubscriptionResource subscriptionResource, AzureLocation location, PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableMgmtTypeSpecSubscriptionResource(subscriptionResource).GetPlaywrightQuota(location, playwrightQuotaName, cancellationToken); + } + /// List Foo resources by subscription ID. /// The the method will execute against. /// The cancellation token to use. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs index 2f4bab3dcdd0..5386fab3e0b8 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecArmClient.cs @@ -137,5 +137,68 @@ public virtual async Task> GetEndpointResourceAsync(R return await GetEndpointResources(scope).GetAsync(endpointName, cancellationToken).ConfigureAwait(false); } + + /// 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 SelfHelpResource GetSelfHelpResource(ResourceIdentifier id) + { + SelfHelpResource.ValidateResourceId(id); + return new SelfHelpResource(Client, id); + } + + /// Gets a collection of objects within the specified scope. + /// The scope of the resource collection to get. + /// Returns a collection of objects. + public virtual SelfHelpResourceCollection GetSelfHelpResources(ResourceIdentifier scope) + { + return new SelfHelpResourceCollection(Client, scope); + } + + /// Get a SelfHelpResource. + /// The scope of the resource collection to get. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSelfHelpResource(ResourceIdentifier scope, string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + return GetSelfHelpResources(scope).Get(selfHelpName, cancellationToken); + } + + /// Get a SelfHelpResource. + /// The scope of the resource collection to get. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSelfHelpResourceAsync(ResourceIdentifier scope, string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + return await GetSelfHelpResources(scope).GetAsync(selfHelpName, cancellationToken).ConfigureAwait(false); + } + + /// 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 PlaywrightQuotaResource GetPlaywrightQuotaResource(ResourceIdentifier id) + { + PlaywrightQuotaResource.ValidateResourceId(id); + return new PlaywrightQuotaResource(Client, id); + } + + /// 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 JobResource GetJobResource(ResourceIdentifier id) + { + JobResource.ValidateResourceId(id); + return new JobResource(Client, id); + } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs index 837b9657e948..c1225fcdfcbb 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecResourceGroupResource.cs @@ -136,5 +136,40 @@ public virtual Response GetZoo(string zooName, CancellationToken ca return GetZoos().Get(zooName, cancellationToken); } + + /// Gets a collection of JobResources in the . + /// An object representing collection of JobResources and their operations over a JobResource. + public virtual JobResourceCollection GetJobResources() + { + return GetCachedClient(client => new JobResourceCollection(client, Id)); + } + + /// Gets information about the specified job. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetJobResourceAsync(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + return await GetJobResources().GetAsync(jobName, expand, cancellationToken).ConfigureAwait(false); + } + + /// Gets information about the specified job. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetJobResource(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + return GetJobResources().Get(jobName, expand, cancellationToken); + } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecSubscriptionResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecSubscriptionResource.cs index 7963dfa41a2b..491de17a9c1b 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecSubscriptionResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableMgmtTypeSpecSubscriptionResource.cs @@ -58,6 +58,34 @@ internal MockableMgmtTypeSpecSubscriptionResource(ArmClient client, ResourceIden private MgmtTypeSpecClient MgmtTypeSpecClientRestClient => _mgmtTypeSpecClientRestClient ??= new MgmtTypeSpecClient(MgmtTypeSpecClientClientDiagnostics, Pipeline, Endpoint, "2024-05-01"); + /// Gets a collection of PlaywrightQuotas in the . + /// The location for the resource. + /// An object representing collection of PlaywrightQuotas and their operations over a PlaywrightQuotaResource. + public virtual PlaywrightQuotaCollection GetPlaywrightQuotas(AzureLocation location) + { + return GetCachedClient(client => new PlaywrightQuotaCollection(client, Id, location)); + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The location for the resource. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetPlaywrightQuotaAsync(AzureLocation location, PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + return await GetPlaywrightQuotas(location).GetAsync(playwrightQuotaName, cancellationToken).ConfigureAwait(false); + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The location for the resource. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetPlaywrightQuota(AzureLocation location, PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + return GetPlaywrightQuotas(location).Get(playwrightQuotaName, cancellationToken); + } + /// List Foo resources by subscription ID. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs index 1403260190cf..10041424228f 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.Serialization.cs @@ -88,7 +88,7 @@ internal static FooData DeserializeFooData(JsonElement element, ModelReaderWrite SystemData systemData = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); IDictionary tags = default; - string location = default; + AzureLocation location = default; FooProperties properties = default; ExtendedLocation extendedLocation = default; foreach (var prop in element.EnumerateObject()) @@ -148,7 +148,7 @@ internal static FooData DeserializeFooData(JsonElement element, ModelReaderWrite } if (prop.NameEquals("location"u8)) { - location = prop.Value.GetString(); + location = new AzureLocation(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs index 0d1da356c948..6ebab2e5aa07 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooData.cs @@ -22,11 +22,8 @@ public partial class FooData : TrackedResourceData /// Initializes a new instance of . /// The geo-location where the resource lives. - /// is null. - public FooData(string location) : base(location) + public FooData(AzureLocation location) : base(location) { - Argument.AssertNotNull(location, nameof(location)); - } /// Initializes a new instance of . @@ -39,7 +36,7 @@ public FooData(string location) : base(location) /// The geo-location where the resource lives. /// The resource-specific properties for this resource. /// - internal FooData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, string location, FooProperties properties, ExtendedLocation extendedLocation) : base(id, name, resourceType, systemData, tags, location) + internal FooData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, FooProperties properties, ExtendedLocation extendedLocation) : base(id, name, resourceType, systemData, tags, location) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs index d97900b140f6..44b20d66dc62 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs @@ -314,7 +314,7 @@ public virtual async Task> AddTagAsync(string key, string } else { - FooData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + FooData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; FooData patch = new FooData(); foreach (KeyValuePair tag in current.Tags) { @@ -362,7 +362,7 @@ public virtual Response AddTag(string key, string value, Cancellati } else { - FooData current = Get(cancellationToken).Value.Data; + FooData current = Get(cancellationToken: cancellationToken).Value.Data; FooData patch = new FooData(); foreach (KeyValuePair tag in current.Tags) { @@ -409,7 +409,7 @@ public virtual async Task> SetTagsAsync(IDictionary result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); @@ -452,7 +452,7 @@ public virtual Response SetTags(IDictionary tags, C } else { - FooData current = Get(cancellationToken).Value.Data; + FooData current = Get(cancellationToken: cancellationToken).Value.Data; FooData patch = new FooData(); patch.Tags.ReplaceWith(tags); ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); @@ -494,7 +494,7 @@ public virtual async Task> RemoveTagAsync(string key, Canc } else { - FooData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + FooData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; FooData patch = new FooData(); foreach (KeyValuePair tag in current.Tags) { @@ -540,7 +540,7 @@ public virtual Response RemoveTag(string key, CancellationToken can } else { - FooData current = Get(cancellationToken).Value.Data; + FooData current = Get(cancellationToken: cancellationToken).Value.Data; FooData patch = new FooData(); foreach (KeyValuePair tag in current.Tags) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResource.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResource.Serialization.cs new file mode 100644 index 000000000000..8bf8ef080092 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResource.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 MgmtTypeSpec +{ + /// + public partial class JobResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new JobResourceData(); + + /// 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. + JobResourceData 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, MgmtTypeSpecContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + JobResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, MgmtTypeSpecContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResource.cs new file mode 100644 index 000000000000..9405c87ac5e8 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResource.cs @@ -0,0 +1,506 @@ +// 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.Resources; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// + /// A class representing a JobResource 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 GetJobResources method. + /// + public partial class JobResource : ArmResource + { + private readonly ClientDiagnostics _jobResourcesClientDiagnostics; + private readonly JobResources _jobResourcesRestClient; + private readonly JobResourceData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "MgmtTypeSpec/jobs"; + + /// Initializes a new instance of JobResource for mocking. + protected JobResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal JobResource(ArmClient client, JobResourceData 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 JobResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string jobResourceApiVersion); + _jobResourcesClientDiagnostics = new ClientDiagnostics("MgmtTypeSpec", ResourceType.Namespace, Diagnostics); + _jobResourcesRestClient = new JobResources(_jobResourcesClientDiagnostics, Pipeline, Endpoint, jobResourceApiVersion ?? "2024-05-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 JobResourceData 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 jobName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string jobName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}"; + 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); + } + } + + /// Gets information about the specified job. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + public virtual async Task> GetAsync(string expand = default, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified job. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + public virtual Response Get(string expand = default, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update a JobResource. + /// 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, JobResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, JobResourcePatch.ToRequestContent(patch), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + MgmtTypeSpecArmOperation operation = new MgmtTypeSpecArmOperation( + new JobResourceOperationSource(Client), + _jobResourcesClientDiagnostics, + 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 JobResource. + /// 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, JobResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, JobResourcePatch.ToRequestContent(patch), context); + Response response = Pipeline.ProcessMessage(message, context); + MgmtTypeSpecArmOperation operation = new MgmtTypeSpecArmOperation( + new JobResourceOperationSource(Client), + _jobResourcesClientDiagnostics, + Pipeline, + message.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. + /// 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 = _jobResourcesClientDiagnostics.CreateScope("JobResource.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 = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, null, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + else + { + JobResourceData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + JobResourcePatch patch = new JobResourcePatch(); + 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 = _jobResourcesClientDiagnostics.CreateScope("JobResource.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 = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, null, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + else + { + JobResourceData current = Get(cancellationToken: cancellationToken).Value.Data; + JobResourcePatch patch = new JobResourcePatch(); + 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 = _jobResourcesClientDiagnostics.CreateScope("JobResource.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 = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, null, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + else + { + JobResourceData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + JobResourcePatch patch = new JobResourcePatch(); + 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 = _jobResourcesClientDiagnostics.CreateScope("JobResource.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 = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, null, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + else + { + JobResourceData current = Get(cancellationToken: cancellationToken).Value.Data; + JobResourcePatch patch = new JobResourcePatch(); + 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 = _jobResourcesClientDiagnostics.CreateScope("JobResource.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 = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, null, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + else + { + JobResourceData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + JobResourcePatch patch = new JobResourcePatch(); + 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 = _jobResourcesClientDiagnostics.CreateScope("JobResource.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 = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, null, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + else + { + JobResourceData current = Get(cancellationToken: cancellationToken).Value.Data; + JobResourcePatch patch = new JobResourcePatch(); + 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; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceCollection.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceCollection.cs new file mode 100644 index 000000000000..cabe1dd88a54 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceCollection.cs @@ -0,0 +1,252 @@ +// 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; +using Azure.ResourceManager.Resources; + +namespace MgmtTypeSpec +{ + /// + /// 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 GetJobResources method from an instance of the parent resource. + /// + public partial class JobResourceCollection : ArmCollection + { + private readonly ClientDiagnostics _jobResourcesClientDiagnostics; + private readonly JobResources _jobResourcesRestClient; + + /// Initializes a new instance of JobResourceCollection for mocking. + protected JobResourceCollection() + { + } + + /// 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 JobResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(JobResource.ResourceType, out string jobResourceApiVersion); + _jobResourcesClientDiagnostics = new ClientDiagnostics("MgmtTypeSpec", JobResource.ResourceType.Namespace, Diagnostics); + _jobResourcesRestClient = new JobResources(_jobResourcesClientDiagnostics, Pipeline, Endpoint, jobResourceApiVersion ?? "2024-05-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); + } + } + + /// Gets information about the specified job. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResourceCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, jobName, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified job. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResourceCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, jobName, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Checks to see if the resource exists in azure. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResourceCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, jobName, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Checks to see if the resource exists in azure. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResourceCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, jobName, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + 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. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResourceCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, jobName, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Tries to get details for this resource from the service. + /// The name of the JobResource. + /// $expand is supported on details parameter for job, which provides details on the job stages. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string jobName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using DiagnosticScope scope = _jobResourcesClientDiagnostics.CreateScope("JobResourceCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _jobResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, jobName, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(JobResourceData.FromResponse(result), result); + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new JobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceData.Serialization.cs new file mode 100644 index 000000000000..be632a3402a6 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceData.Serialization.cs @@ -0,0 +1,213 @@ +// 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.Models; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// Concrete tracked resource types can be created by aliasing this type using a specific property type. + public partial class JobResourceData : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal JobResourceData() + { + } + + /// 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(JobResourceData)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + JobResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (JobResourceData)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(JobResourceData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobResourceData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static JobResourceData DeserializeJobResourceData(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; + JobProperties 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, MgmtTypeSpecContext.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)) + { + properties = JobProperties.DeserializeJobProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new JobResourceData( + 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(JobResourceData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + JobResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (JobResourceData)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 DeserializeJobResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobResourceData)} 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 JobResourceData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeJobResourceData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceData.cs new file mode 100644 index 000000000000..e4567333712b --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/JobResourceData.cs @@ -0,0 +1,57 @@ +// 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; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// Concrete tracked resource types can be created by aliasing this type using a specific property type. + public partial class JobResourceData : 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. + /// The resource-specific properties for this resource. + internal JobResourceData(AzureLocation location, JobProperties properties) : base(location) + { + Properties = properties; + } + + /// 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 JobResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, JobProperties properties) : base(id, name, resourceType, systemData, tags, location) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// The resource-specific properties for this resource. + internal JobProperties Properties { get; } + + /// Gets or sets the JobName. + public string JobName + { + get + { + return Properties.JobName; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/JobResourceOperationSource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/JobResourceOperationSource.cs new file mode 100644 index 000000000000..f40569b6629e --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/LongRunningOperation/JobResourceOperationSource.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 MgmtTypeSpec +{ + /// + internal partial class JobResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + /// + /// + internal JobResourceOperationSource(ArmClient client) + { + _client = client; + } + + /// The response from the service. + /// The cancellation token to use. + /// + JobResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + JobResourceData data = JobResourceData.DeserializeJobResourceData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new JobResource(_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); + JobResourceData data = JobResourceData.DeserializeJobResourceData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new JobResource(_client, data); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs index e32138e5c6e1..81915b197492 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecModelFactory.cs @@ -37,7 +37,7 @@ public static FooPreviewAction FooPreviewAction(string action = default, string /// The resource-specific properties for this resource. /// /// A new instance for mocking. - public static FooData FooData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, string location = default, FooProperties properties = 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, FooProperties properties = default, ExtendedLocation extendedLocation = default) { tags ??= new ChangeTrackingDictionary(); @@ -89,7 +89,7 @@ public static FooSettingsProperties FooSettingsProperties(bool? accessControlEna /// The geo-location where the resource lives. /// The resource-specific properties for this resource. /// A new instance for mocking. - public static BarData BarData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, string location = default, BarProperties properties = default) + public static BarData BarData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, BarProperties properties = default) { tags ??= new ChangeTrackingDictionary(); @@ -118,9 +118,10 @@ public static BarData BarData(ResourceIdentifier id = default, string name = def /// Gets the MiddleProp2. /// Gets the Prop1. /// Gets or sets the Prop2. + /// Gets the RandomCollectionProp. /// , or is null. /// 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) + 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) { stringArray ??= new ChangeTrackingList(); @@ -141,7 +142,8 @@ public static BarSettingsResourceData BarSettingsResourceData(ResourceIdentifier middleProp1.Value, middleProp2, prop1, - prop2.Value)); + prop2.Value), + optionalFlattenPropertyRandomCollectionProp is null ? default : new OptionalFlattenPropertyType(optionalFlattenPropertyRandomCollectionProp, new Dictionary())); } /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -170,7 +172,7 @@ public static BarQuotaResourceData BarQuotaResourceData(ResourceIdentifier id = /// The geo-location where the resource lives. /// The resource-specific properties for this resource. /// A new instance for mocking. - public static BazData BazData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, string location = default, BazProperties properties = default) + public static BazData BazData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, BazProperties properties = default) { tags ??= new ChangeTrackingDictionary(); @@ -194,7 +196,7 @@ public static BazData BazData(ResourceIdentifier id = default, string name = def /// something. /// /// A new instance for mocking. - public static ZooData ZooData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, string location = default, string zooSomething = default, ExtendedLocation extendedLocation = default) + public static ZooData ZooData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, string zooSomething = default, ExtendedLocation extendedLocation = default) { tags ??= new ChangeTrackingDictionary(); @@ -248,6 +250,83 @@ public static EndpointResourceData EndpointResourceData(ResourceIdentifier id = endpointProp is null ? default : new EndpointProperties(endpointProp, new Dictionary())); } + /// 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. + /// Gets the SelfHelpId. + /// A new instance for mocking. + public static SelfHelpResourceData SelfHelpResourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, string selfHelpId = default) + { + return new SelfHelpResourceData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties: null, + selfHelpId is null ? default : new SelfHelpResourceProperties(selfHelpId, new Dictionary())); + } + + /// Subscription-level location-based Playwright quota 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. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static PlaywrightQuotaData PlaywrightQuotaData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, PlaywrightQuotaProperties properties = default) + { + return new PlaywrightQuotaData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties: null, + properties); + } + + /// Subscription-level location-based Playwright quota resource properties. + /// The subscription-level location-based Playwright quota resource free-trial properties. + /// The status of the last resource operation. + /// A new instance for mocking. + public static PlaywrightQuotaProperties PlaywrightQuotaProperties(string freeTrial = default, string provisioningState = default) + { + return new PlaywrightQuotaProperties(freeTrial, provisioningState, additionalBinaryDataProperties: null); + } + + /// 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. + /// Gets or sets the JobName. + /// A new instance for mocking. + public static JobResourceData JobResourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, string jobName = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new JobResourceData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties: null, + tags, + location, + jobName is null ? default : new JobProperties(jobName, new Dictionary())); + } + + /// Gets or sets the JobName. + /// + /// A new instance for mocking. + public static JobResourcePatch JobResourcePatch(string jobName, IDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new JobResourcePatch(jobName is null ? default : new JobProperties(jobName, new Dictionary()), tags, additionalBinaryDataProperties: null); + } + /// The ZooRecommendation. /// The recommended value. /// The reason for the recommendation. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarMiddleNestedQuotaProperties.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarMiddleNestedQuotaProperties.cs index 51569abf4940..54c98a168ccc 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarMiddleNestedQuotaProperties.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarMiddleNestedQuotaProperties.cs @@ -43,7 +43,7 @@ internal BarMiddleNestedQuotaProperties(int? innerProp1, string innerProp2, IDic /// Gets or sets the MiddleProp1. public int MiddleProp1 { get; set; } - /// Gets or sets the MiddleProp2. - public IDictionary MiddleProp2 { get; internal set; } + /// Gets the MiddleProp2. + public IDictionary MiddleProp2 { get; } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarNestedQuotaProperties.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarNestedQuotaProperties.cs index 61219bb6a0db..721da3528c63 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarNestedQuotaProperties.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/BarNestedQuotaProperties.cs @@ -46,8 +46,8 @@ internal BarNestedQuotaProperties(int? innerProp1, string innerProp2, IDictionar Prop2 = prop2; } - /// Gets or sets the Prop1. - public IList Prop1 { get; internal set; } + /// Gets the Prop1. + public IList Prop1 { get; } /// Gets or sets the Prop2. public int Prop2 { get; set; } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobProperties.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobProperties.Serialization.cs new file mode 100644 index 000000000000..df65b7253116 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobProperties.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 MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The JobProperties. + internal partial class JobProperties : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal JobProperties() + { + } + + /// 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(JobProperties)} does not support writing '{format}' format."); + } + writer.WritePropertyName("jobName"u8); + writer.WriteStringValue(JobName); + 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. + JobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual JobProperties 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(JobProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static JobProperties DeserializeJobProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobName = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("jobName"u8)) + { + jobName = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new JobProperties(jobName, 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(JobProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + JobProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual JobProperties 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 DeserializeJobProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobProperties.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobProperties.cs new file mode 100644 index 000000000000..9c812b6f99be --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The JobProperties. + internal partial class JobProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// + /// is null. + public JobProperties(string jobName) + { + Argument.AssertNotNull(jobName, nameof(jobName)); + + JobName = jobName; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal JobProperties(string jobName, IDictionary additionalBinaryDataProperties) + { + JobName = jobName; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets or sets the JobName. + public string JobName { get; set; } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobResourcePatch.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobResourcePatch.Serialization.cs new file mode 100644 index 000000000000..7aed2315bb51 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobResourcePatch.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 MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The JobResourcePatch. + public partial class JobResourcePatch : 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(JobResourcePatch)} 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. + JobResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual JobResourcePatch 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(JobResourcePatch)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobResourcePatch(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static JobResourcePatch DeserializeJobResourcePatch(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + JobProperties 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 = JobProperties.DeserializeJobProperties(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 JobResourcePatch(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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(JobResourcePatch)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + JobResourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual JobResourcePatch 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 DeserializeJobResourcePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobResourcePatch)} 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(JobResourcePatch patch) + { + if (patch == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobResourcePatch.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobResourcePatch.cs new file mode 100644 index 000000000000..84278d17e384 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/JobResourcePatch.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The JobResourcePatch. + public partial class JobResourcePatch + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public JobResourcePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal JobResourcePatch(JobProperties properties, IDictionary tags, IDictionary additionalBinaryDataProperties) + { + Properties = properties; + Tags = tags; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets or sets the Properties. + internal JobProperties Properties { get; set; } + + /// Gets the Tags. + public IDictionary Tags { get; } + + /// Gets or sets the JobName. + public string JobName + { + get + { + return Properties is null ? default : Properties.JobName; + } + set + { + Properties = new JobProperties(value); + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/MgmtTypeSpecContext.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/MgmtTypeSpecContext.cs index ce6148b56242..d173d03cb268 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/MgmtTypeSpecContext.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/MgmtTypeSpecContext.cs @@ -48,7 +48,19 @@ namespace MgmtTypeSpec [ModelReaderWriterBuildable(typeof(FooSettingsPropertiesMetaData))] [ModelReaderWriterBuildable(typeof(FooSettingsResource))] [ModelReaderWriterBuildable(typeof(FooSettingsUpdateProperties))] + [ModelReaderWriterBuildable(typeof(JobProperties))] + [ModelReaderWriterBuildable(typeof(JobResource))] + [ModelReaderWriterBuildable(typeof(JobResourceData))] + [ModelReaderWriterBuildable(typeof(JobResourcePatch))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] + [ModelReaderWriterBuildable(typeof(OptionalFlattenPropertyType))] + [ModelReaderWriterBuildable(typeof(PlaywrightQuotaData))] + [ModelReaderWriterBuildable(typeof(PlaywrightQuotaListResult))] + [ModelReaderWriterBuildable(typeof(PlaywrightQuotaProperties))] + [ModelReaderWriterBuildable(typeof(PlaywrightQuotaResource))] + [ModelReaderWriterBuildable(typeof(SelfHelpResource))] + [ModelReaderWriterBuildable(typeof(SelfHelpResourceData))] + [ModelReaderWriterBuildable(typeof(SelfHelpResourceProperties))] [ModelReaderWriterBuildable(typeof(SubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/OptionalFlattenPropertyType.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/OptionalFlattenPropertyType.Serialization.cs new file mode 100644 index 000000000000..a6a70f0df899 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/OptionalFlattenPropertyType.Serialization.cs @@ -0,0 +1,165 @@ +// 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 MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The OptionalFlattenPropertyType. + internal partial class OptionalFlattenPropertyType : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal OptionalFlattenPropertyType() + { + } + + /// 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(OptionalFlattenPropertyType)} does not support writing '{format}' format."); + } + writer.WritePropertyName("randomCollectionProp"u8); + writer.WriteStartArray(); + foreach (string item in RandomCollectionProp) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + 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. + OptionalFlattenPropertyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual OptionalFlattenPropertyType 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(OptionalFlattenPropertyType)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOptionalFlattenPropertyType(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static OptionalFlattenPropertyType DeserializeOptionalFlattenPropertyType(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList randomCollectionProp = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("randomCollectionProp"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()); + } + } + randomCollectionProp = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new OptionalFlattenPropertyType(randomCollectionProp, 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(OptionalFlattenPropertyType)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + OptionalFlattenPropertyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual OptionalFlattenPropertyType 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 DeserializeOptionalFlattenPropertyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OptionalFlattenPropertyType)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/OptionalFlattenPropertyType.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/OptionalFlattenPropertyType.cs new file mode 100644 index 000000000000..685b63d3c454 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/OptionalFlattenPropertyType.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 System.Linq; +using MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The OptionalFlattenPropertyType. + internal partial class OptionalFlattenPropertyType + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// + /// is null. + public OptionalFlattenPropertyType(IEnumerable randomCollectionProp) + { + Argument.AssertNotNull(randomCollectionProp, nameof(randomCollectionProp)); + + RandomCollectionProp = randomCollectionProp.ToList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal OptionalFlattenPropertyType(IList randomCollectionProp, IDictionary additionalBinaryDataProperties) + { + RandomCollectionProp = randomCollectionProp; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets the RandomCollectionProp. + public IList RandomCollectionProp { get; } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaListResult.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaListResult.Serialization.cs new file mode 100644 index 000000000000..ef751c2768dd --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaListResult.Serialization.cs @@ -0,0 +1,177 @@ +// 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; +using MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The response of a PlaywrightQuota list operation. + internal partial class PlaywrightQuotaListResult : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal PlaywrightQuotaListResult() + { + } + + /// 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(PlaywrightQuotaListResult)} does not support writing '{format}' format."); + } + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (PlaywrightQuotaData 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" && _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. + PlaywrightQuotaListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual PlaywrightQuotaListResult 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(PlaywrightQuotaListResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightQuotaListResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static PlaywrightQuotaListResult DeserializePlaywrightQuotaListResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList value = default; + Uri nextLink = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(PlaywrightQuotaData.DeserializePlaywrightQuotaData(item, options)); + } + value = array; + continue; + } + if (prop.NameEquals("nextLink"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new PlaywrightQuotaListResult(value, nextLink, 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(PlaywrightQuotaListResult)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + PlaywrightQuotaListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual PlaywrightQuotaListResult 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 DeserializePlaywrightQuotaListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightQuotaListResult)} 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 PlaywrightQuotaListResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializePlaywrightQuotaListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaListResult.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaListResult.cs new file mode 100644 index 000000000000..9bc16ba4462b --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaListResult.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The response of a PlaywrightQuota list operation. + internal partial class PlaywrightQuotaListResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The PlaywrightQuota items on this page. + internal PlaywrightQuotaListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The PlaywrightQuota items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PlaywrightQuotaListResult(IList value, Uri nextLink, IDictionary additionalBinaryDataProperties) + { + Value = value; + NextLink = nextLink; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The PlaywrightQuota items on this page. + public IList Value { get; } + + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaName.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaName.cs new file mode 100644 index 000000000000..3a8b7f2dbca7 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaName.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// Playwright quota names. + public readonly partial struct PlaywrightQuotaName : IEquatable + { + private readonly string _value; + /// Quota for execution duration in minutes. + private const string ExecutionMinutesValue = "ExecutionMinutes"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public PlaywrightQuotaName(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Quota for execution duration in minutes. + public static PlaywrightQuotaName ExecutionMinutes { get; } = new PlaywrightQuotaName(ExecutionMinutesValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(PlaywrightQuotaName left, PlaywrightQuotaName 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 !=(PlaywrightQuotaName left, PlaywrightQuotaName right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator PlaywrightQuotaName(string value) => new PlaywrightQuotaName(value); + + /// Converts a string to a . + /// The value. + public static implicit operator PlaywrightQuotaName?(string value) => value == null ? null : new PlaywrightQuotaName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PlaywrightQuotaName other && Equals(other); + + /// + public bool Equals(PlaywrightQuotaName 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/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.Serialization.cs new file mode 100644 index 000000000000..bd96b71bbeb9 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.Serialization.cs @@ -0,0 +1,152 @@ +// 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 MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// Subscription-level location-based Playwright quota resource properties. + public partial class PlaywrightQuotaProperties : 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(PlaywrightQuotaProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(FreeTrial)) + { + writer.WritePropertyName("freeTrial"u8); + writer.WriteStringValue(FreeTrial); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + 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. + PlaywrightQuotaProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual PlaywrightQuotaProperties 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(PlaywrightQuotaProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightQuotaProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static PlaywrightQuotaProperties DeserializePlaywrightQuotaProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string freeTrial = default; + string provisioningState = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("freeTrial"u8)) + { + freeTrial = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("provisioningState"u8)) + { + provisioningState = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new PlaywrightQuotaProperties(freeTrial, provisioningState, 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(PlaywrightQuotaProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + PlaywrightQuotaProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual PlaywrightQuotaProperties 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 DeserializePlaywrightQuotaProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightQuotaProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} 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 new file mode 100644 index 000000000000..ae865d8e48c9 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.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 MgmtTypeSpec.Models +{ + /// Subscription-level location-based Playwright quota resource properties. + public partial class PlaywrightQuotaProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal PlaywrightQuotaProperties() + { + } + + /// Initializes a new instance of . + /// The subscription-level location-based Playwright quota resource free-trial properties. + /// The status of the last resource operation. + /// Keeps track of any properties unknown to the library. + internal PlaywrightQuotaProperties(string freeTrial, string provisioningState, IDictionary additionalBinaryDataProperties) + { + FreeTrial = freeTrial; + ProvisioningState = provisioningState; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The subscription-level location-based Playwright quota resource free-trial properties. + public string FreeTrial { get; } + + /// The status of the last resource operation. + public string ProvisioningState { get; } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/SelfHelpResourceProperties.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/SelfHelpResourceProperties.Serialization.cs new file mode 100644 index 000000000000..0bf986dae1fc --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/SelfHelpResourceProperties.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 MgmtTypeSpec; + +namespace MgmtTypeSpec.Models +{ + /// The SelfHelpResourceProperties. + internal partial class SelfHelpResourceProperties : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal SelfHelpResourceProperties() + { + } + + /// 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(SelfHelpResourceProperties)} does not support writing '{format}' format."); + } + writer.WritePropertyName("selfHelpId"u8); + writer.WriteStringValue(SelfHelpId); + 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. + SelfHelpResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SelfHelpResourceProperties 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(SelfHelpResourceProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSelfHelpResourceProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SelfHelpResourceProperties DeserializeSelfHelpResourceProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string selfHelpId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("selfHelpId"u8)) + { + selfHelpId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SelfHelpResourceProperties(selfHelpId, 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(SelfHelpResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SelfHelpResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SelfHelpResourceProperties 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 DeserializeSelfHelpResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SelfHelpResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/SelfHelpResourceProperties.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/SelfHelpResourceProperties.cs new file mode 100644 index 000000000000..e20c0f3dc6db --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/SelfHelpResourceProperties.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 MgmtTypeSpec.Models +{ + /// The SelfHelpResourceProperties. + internal partial class SelfHelpResourceProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// + internal SelfHelpResourceProperties(string selfHelpId) + { + SelfHelpId = selfHelpId; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal SelfHelpResourceProperties(string selfHelpId, IDictionary additionalBinaryDataProperties) + { + SelfHelpId = selfHelpId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets the SelfHelpId. + public string SelfHelpId { get; } + } +} 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 new file mode 100644 index 000000000000..15ea7531fea7 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaCollection.cs @@ -0,0 +1,269 @@ +// 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; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// + /// 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 GetPlaywrightQuotas method from an instance of the parent resource. + /// + public partial class PlaywrightQuotaCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _playwrightQuotasClientDiagnostics; + private readonly PlaywrightQuotas _playwrightQuotasRestClient; + /// The location. + private readonly AzureLocation _location; + + /// Initializes a new instance of PlaywrightQuotaCollection for mocking. + protected PlaywrightQuotaCollection() + { + } + + /// 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 location for the resource. + internal PlaywrightQuotaCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + TryGetApiVersion(PlaywrightQuotaResource.ResourceType, out string playwrightQuotaApiVersion); + _location = location; + _playwrightQuotasClientDiagnostics = new ClientDiagnostics("MgmtTypeSpec", PlaywrightQuotaResource.ResourceType.Namespace, Diagnostics); + _playwrightQuotasRestClient = new PlaywrightQuotas(_playwrightQuotasClientDiagnostics, Pipeline, Endpoint, playwrightQuotaApiVersion ?? "2024-05-01"); + ValidateResourceId(id); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), id); + } + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + public virtual async Task> GetAsync(PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + public virtual Response Get(PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List Playwright quota resources for a given subscription Id. + /// 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 PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT(_playwrightQuotasRestClient, Guid.Parse(Id.SubscriptionId), _location, context), data => new PlaywrightQuotaResource(Client, data)); + } + + /// List Playwright quota resources for a given subscription Id. + /// 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 PlaywrightQuotasGetBySubscriptionCollectionResultOfT(_playwrightQuotasRestClient, Guid.Parse(Id.SubscriptionId), _location, context), data => new PlaywrightQuotaResource(Client, data)); + } + + /// Checks to see if the resource exists in azure. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Checks to see if the resource exists in azure. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + public virtual Response Exists(PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + 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. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Tries to get details for this resource from the service. + /// The name of the PlaywrightQuota. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(PlaywrightQuotaName playwrightQuotaName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new PlaywrightQuotaResource(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/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 new file mode 100644 index 000000000000..b6f6ce1e49df --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.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.Text; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Models; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// Subscription-level location-based Playwright quota resource. + public partial class PlaywrightQuotaData : 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(PlaywrightQuotaData)} 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. + PlaywrightQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (PlaywrightQuotaData)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(PlaywrightQuotaData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightQuotaData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static PlaywrightQuotaData DeserializePlaywrightQuotaData(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(); + PlaywrightQuotaProperties 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, MgmtTypeSpecContext.Default); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = PlaywrightQuotaProperties.DeserializePlaywrightQuotaProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new PlaywrightQuotaData( + 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(PlaywrightQuotaData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + PlaywrightQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (PlaywrightQuotaData)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 DeserializePlaywrightQuotaData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightQuotaData)} 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 PlaywrightQuotaData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializePlaywrightQuotaData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} 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 new file mode 100644 index 000000000000..696ccecc9ac3 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.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.Models; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// Subscription-level location-based Playwright quota resource. + public partial class PlaywrightQuotaData : ResourceData + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal PlaywrightQuotaData() + { + } + + /// 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 PlaywrightQuotaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, PlaywrightQuotaProperties properties) : base(id, name, resourceType, systemData) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// The resource-specific properties for this resource. + public PlaywrightQuotaProperties Properties { get; } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.Serialization.cs new file mode 100644 index 000000000000..dfce599cbc19 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.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 MgmtTypeSpec +{ + /// + public partial class PlaywrightQuotaResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new PlaywrightQuotaData(); + + /// 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. + PlaywrightQuotaData 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, MgmtTypeSpecContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + PlaywrightQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, MgmtTypeSpecContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} 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 new file mode 100644 index 000000000000..939b75e6fedd --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.cs @@ -0,0 +1,151 @@ +// 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; +using Azure.ResourceManager.Resources; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// + /// A class representing a PlaywrightQuota 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 GetPlaywrightQuotas method. + /// + public partial class PlaywrightQuotaResource : ArmResource + { + private readonly ClientDiagnostics _playwrightQuotasClientDiagnostics; + private readonly PlaywrightQuotas _playwrightQuotasRestClient; + private readonly PlaywrightQuotaData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "MgmtTypeSpec/locations/playwrightQuotas"; + + /// Initializes a new instance of PlaywrightQuotaResource for mocking. + protected PlaywrightQuotaResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PlaywrightQuotaResource(ArmClient client, PlaywrightQuotaData 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 PlaywrightQuotaResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string playwrightQuotaApiVersion); + _playwrightQuotasClientDiagnostics = new ClientDiagnostics("MgmtTypeSpec", ResourceType.Namespace, Diagnostics); + _playwrightQuotasRestClient = new PlaywrightQuotas(_playwrightQuotasClientDiagnostics, Pipeline, Endpoint, playwrightQuotaApiVersion ?? "2024-05-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 PlaywrightQuotaData 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 location. + /// The playwrightQuotaName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, PlaywrightQuotaName playwrightQuotaName) + { + string resourceId = $"/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}"; + 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 subscription-level location-based Playwright quota resource by name. + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get subscription-level location-based Playwright quota resource by name. + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..0af645835f1b --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT.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 System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + internal partial class PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT : AsyncPageable + { + private readonly PlaywrightQuotas _client; + private readonly Guid _subscriptionId; + private readonly AzureLocation _location; + private readonly RequestContext _context; + + /// Initializes a new instance of PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The PlaywrightQuotas client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT(PlaywrightQuotas client, Guid subscriptionId, AzureLocation location, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _location = location; + _context = context; + } + + /// Gets the pages of PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of PlaywrightQuotasGetBySubscriptionAsyncCollectionResultOfT 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; + } + PlaywrightQuotaListResult result = PlaywrightQuotaListResult.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, _location, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _location, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("PlaywrightQuotaCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotasGetBySubscriptionCollectionResultOfT.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotasGetBySubscriptionCollectionResultOfT.cs new file mode 100644 index 000000000000..291fa9b0f900 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotasGetBySubscriptionCollectionResultOfT.cs @@ -0,0 +1,80 @@ +// 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 MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + internal partial class PlaywrightQuotasGetBySubscriptionCollectionResultOfT : Pageable + { + private readonly PlaywrightQuotas _client; + private readonly Guid _subscriptionId; + private readonly AzureLocation _location; + private readonly RequestContext _context; + + /// Initializes a new instance of PlaywrightQuotasGetBySubscriptionCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The PlaywrightQuotas client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public PlaywrightQuotasGetBySubscriptionCollectionResultOfT(PlaywrightQuotas client, Guid subscriptionId, AzureLocation location, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _location = location; + _context = context; + } + + /// Gets the pages of PlaywrightQuotasGetBySubscriptionCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of PlaywrightQuotasGetBySubscriptionCollectionResultOfT 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; + } + PlaywrightQuotaListResult result = PlaywrightQuotaListResult.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, _location, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _location, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("PlaywrightQuotaCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/JobResourcesRestOperations.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/JobResourcesRestOperations.cs new file mode 100644 index 000000000000..3cccfb8b2b1c --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/JobResourcesRestOperations.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace MgmtTypeSpec +{ + internal partial class JobResources + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of JobResources for mocking. + protected JobResources() + { + } + + /// Initializes a new instance of JobResources. + /// 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 JobResources(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateGetRequest(Guid subscriptionId, string resourceGroupName, string jobName, string expand, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId.ToString(), true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/MgmtTypeSpec/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + 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 CreateUpdateRequest(Guid subscriptionId, string resourceGroupName, string jobName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId.ToString(), true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/MgmtTypeSpec/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Patch; + 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/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs new file mode 100644 index 000000000000..2093eceffad4 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace MgmtTypeSpec +{ + internal partial class PlaywrightQuotas + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PlaywrightQuotas for mocking. + protected PlaywrightQuotas() + { + } + + /// Initializes a new instance of PlaywrightQuotas. + /// 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 PlaywrightQuotas(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateGetRequest(Guid subscriptionId, AzureLocation location, string playwrightQuotaName, 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.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetBySubscriptionRequest(Guid subscriptionId, AzureLocation location, 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.AppendQuery("api-version", _apiVersion, true); + 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 CreateNextGetBySubscriptionRequest(Uri nextPage, Guid subscriptionId, AzureLocation location, RequestContext context) + { + 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; + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/SolutionResourcesRestOperations.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/SolutionResourcesRestOperations.cs new file mode 100644 index 000000000000..7c779866218e --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/SolutionResourcesRestOperations.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace MgmtTypeSpec +{ + internal partial class SolutionResources + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SolutionResources for mocking. + protected SolutionResources() + { + } + + /// Initializes a new instance of SolutionResources. + /// 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 SolutionResources(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateGetRequest(string scope, string selfHelpName, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/MgmtTypeSpec/selfHelps/", false); + uri.AppendPath(selfHelpName, true); + uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResource.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResource.Serialization.cs new file mode 100644 index 000000000000..e564725179f1 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResource.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 MgmtTypeSpec +{ + /// + public partial class SelfHelpResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new SelfHelpResourceData(); + + /// 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. + SelfHelpResourceData 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, MgmtTypeSpecContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + SelfHelpResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, MgmtTypeSpecContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResource.cs new file mode 100644 index 000000000000..295bf5121669 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResource.cs @@ -0,0 +1,148 @@ +// 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 MgmtTypeSpec +{ + /// + /// A class representing a SelfHelpResource 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 GetSelfHelpResources method. + /// + public partial class SelfHelpResource : ArmResource + { + private readonly ClientDiagnostics _solutionResourcesClientDiagnostics; + private readonly SolutionResources _solutionResourcesRestClient; + private readonly SelfHelpResourceData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "MgmtTypeSpec/selfHelps"; + + /// Initializes a new instance of SelfHelpResource for mocking. + protected SelfHelpResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SelfHelpResource(ArmClient client, SelfHelpResourceData 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 SelfHelpResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string selfHelpResourceApiVersion); + _solutionResourcesClientDiagnostics = new ClientDiagnostics("MgmtTypeSpec", ResourceType.Namespace, Diagnostics); + _solutionResourcesRestClient = new SolutionResources(_solutionResourcesClientDiagnostics, Pipeline, Endpoint, selfHelpResourceApiVersion ?? "2024-05-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 SelfHelpResourceData 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 scope. + /// The selfHelpName. + public static ResourceIdentifier CreateResourceIdentifier(string scope, string selfHelpName) + { + string resourceId = $"{scope}/providers/MgmtTypeSpec/selfHelps/{selfHelpName}"; + 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 SelfHelpResource. + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id.Parent, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new SelfHelpResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a SelfHelpResource. + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id.Parent, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new SelfHelpResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceCollection.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceCollection.cs new file mode 100644 index 000000000000..15a8752b89b0 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceCollection.cs @@ -0,0 +1,245 @@ +// 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 MgmtTypeSpec +{ + /// + /// 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 GetSelfHelpResources method from an instance of the parent resource. + /// + public partial class SelfHelpResourceCollection : ArmCollection + { + private readonly ClientDiagnostics _solutionResourcesClientDiagnostics; + private readonly SolutionResources _solutionResourcesRestClient; + + /// Initializes a new instance of SelfHelpResourceCollection for mocking. + protected SelfHelpResourceCollection() + { + } + + /// 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 SelfHelpResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(SelfHelpResource.ResourceType, out string selfHelpResourceApiVersion); + _solutionResourcesClientDiagnostics = new ClientDiagnostics("MgmtTypeSpec", SelfHelpResource.ResourceType.Namespace, Diagnostics); + _solutionResourcesRestClient = new SolutionResources(_solutionResourcesClientDiagnostics, Pipeline, Endpoint, selfHelpResourceApiVersion ?? "2024-05-01"); + ValidateResourceId(id); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SelfHelpResource.ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, SelfHelpResource.ResourceType), id); + } + } + + /// Get a SelfHelpResource. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResourceCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id, selfHelpName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new SelfHelpResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a SelfHelpResource. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResourceCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id, selfHelpName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new SelfHelpResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Checks to see if the resource exists in azure. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResourceCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id, selfHelpName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Checks to see if the resource exists in azure. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResourceCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id, selfHelpName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + 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. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResourceCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id, selfHelpName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new SelfHelpResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Tries to get details for this resource from the service. + /// The name of the SelfHelpResource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string selfHelpName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(selfHelpName, nameof(selfHelpName)); + + using DiagnosticScope scope = _solutionResourcesClientDiagnostics.CreateScope("SelfHelpResourceCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _solutionResourcesRestClient.CreateGetRequest(Id, selfHelpName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SelfHelpResourceData.FromResponse(result), result); + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new SelfHelpResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceData.Serialization.cs new file mode 100644 index 000000000000..7b4260ec275f --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceData.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.Text; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Models; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// Concrete extension resource types can be created by aliasing this type using a specific property type. + public partial class SelfHelpResourceData : 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(SelfHelpResourceData)} 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. + SelfHelpResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (SelfHelpResourceData)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(SelfHelpResourceData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSelfHelpResourceData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SelfHelpResourceData DeserializeSelfHelpResourceData(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(); + SelfHelpResourceProperties 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, MgmtTypeSpecContext.Default); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SelfHelpResourceProperties.DeserializeSelfHelpResourceProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SelfHelpResourceData( + 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, MgmtTypeSpecContext.Default); + default: + throw new FormatException($"The model {nameof(SelfHelpResourceData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SelfHelpResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (SelfHelpResourceData)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 DeserializeSelfHelpResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SelfHelpResourceData)} 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 SelfHelpResourceData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeSelfHelpResourceData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceData.cs new file mode 100644 index 000000000000..5a2d070fd835 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/SelfHelpResourceData.cs @@ -0,0 +1,52 @@ +// 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; +using MgmtTypeSpec.Models; + +namespace MgmtTypeSpec +{ + /// Concrete extension resource types can be created by aliasing this type using a specific property type. + public partial class SelfHelpResourceData : ResourceData + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal SelfHelpResourceData() + { + } + + /// 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 SelfHelpResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, SelfHelpResourceProperties properties) : base(id, name, resourceType, systemData) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// The resource-specific properties for this resource. + internal SelfHelpResourceProperties Properties { get; } + + /// Gets the SelfHelpId. + public string SelfHelpId + { + get + { + return Properties.SelfHelpId; + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.Serialization.cs index 0565d6d803ff..5e021c401ea8 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.Serialization.cs @@ -88,7 +88,7 @@ internal static ZooData DeserializeZooData(JsonElement element, ModelReaderWrite SystemData systemData = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); IDictionary tags = default; - string location = default; + AzureLocation location = default; ZooProperties properties = default; ExtendedLocation extendedLocation = default; foreach (var prop in element.EnumerateObject()) @@ -148,7 +148,7 @@ internal static ZooData DeserializeZooData(JsonElement element, ModelReaderWrite } if (prop.NameEquals("location"u8)) { - location = prop.Value.GetString(); + location = new AzureLocation(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.cs index d930d58c1ccd..adb43e3a2284 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooData.cs @@ -22,11 +22,8 @@ public partial class ZooData : TrackedResourceData /// Initializes a new instance of . /// The geo-location where the resource lives. - /// is null. - public ZooData(string location) : base(location) + public ZooData(AzureLocation location) : base(location) { - Argument.AssertNotNull(location, nameof(location)); - } /// Initializes a new instance of . @@ -39,7 +36,7 @@ public ZooData(string location) : base(location) /// The geo-location where the resource lives. /// The resource-specific properties for this resource. /// - internal ZooData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, string location, ZooProperties properties, ExtendedLocation extendedLocation) : base(id, name, resourceType, systemData, tags, location) + internal ZooData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, ZooProperties properties, ExtendedLocation extendedLocation) : base(id, name, resourceType, systemData, tags, location) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooResource.cs index 9e923bd436dc..eb0733bd1cc6 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/ZooResource.cs @@ -433,7 +433,7 @@ public virtual async Task> AddTagAsync(string key, string } else { - ZooData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + ZooData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; ZooPatch patch = new ZooPatch(); foreach (KeyValuePair tag in current.Tags) { @@ -481,7 +481,7 @@ public virtual Response AddTag(string key, string value, Cancellati } else { - ZooData current = Get(cancellationToken).Value.Data; + ZooData current = Get(cancellationToken: cancellationToken).Value.Data; ZooPatch patch = new ZooPatch(); foreach (KeyValuePair tag in current.Tags) { @@ -528,7 +528,7 @@ public virtual async Task> SetTagsAsync(IDictionary result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); @@ -571,7 +571,7 @@ public virtual Response SetTags(IDictionary tags, C } else { - ZooData current = Get(cancellationToken).Value.Data; + ZooData current = Get(cancellationToken: cancellationToken).Value.Data; ZooPatch patch = new ZooPatch(); patch.Tags.ReplaceWith(tags); ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); @@ -613,7 +613,7 @@ public virtual async Task> RemoveTagAsync(string key, Canc } else { - ZooData current = (await GetAsync(cancellationToken).ConfigureAwait(false)).Value.Data; + ZooData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; ZooPatch patch = new ZooPatch(); foreach (KeyValuePair tag in current.Tags) { @@ -659,7 +659,7 @@ public virtual Response RemoveTag(string key, CancellationToken can } else { - ZooData current = Get(cancellationToken).Value.Data; + ZooData current = Get(cancellationToken: cancellationToken).Value.Data; ZooPatch patch = new ZooPatch(); foreach (KeyValuePair tag in current.Tags) { 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 1a9a6ea18433..8121084b81f7 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 @@ -406,8 +406,8 @@ { "$id": "33", "kind": "enum", - "name": "Versions", - "crossLanguageDefinitionId": "MgmtTypeSpec.Versions", + "name": "PlaywrightQuotaName", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotaName", "valueType": { "$id": "34", "kind": "string", @@ -419,14 +419,49 @@ { "$id": "35", "kind": "enumvalue", - "name": "v2024_05_01", - "value": "2024-05-01", + "name": "ExecutionMinutes", + "value": "ExecutionMinutes", "valueType": { "$ref": "34" }, "enumType": { "$ref": "33" }, + "doc": "Quota for execution duration in minutes.", + "decorators": [] + } + ], + "namespace": "MgmtTypeSpec", + "doc": "Playwright quota names.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "36", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "MgmtTypeSpec.Versions", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "38", + "kind": "enumvalue", + "name": "v2024_05_01", + "value": "2024-05-01", + "valueType": { + "$ref": "37" + }, + "enumType": { + "$ref": "36" + }, "doc": "Azure Cosmos DB for Mongo vCore clusters api version 2024-03-01-preview.", "decorators": [] } @@ -441,13 +476,13 @@ ], "constants": [ { - "$id": "36", + "$id": "39", "kind": "constant", "name": "previewActionsContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "37", + "$id": "40", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -457,13 +492,13 @@ "decorators": [] }, { - "$id": "38", + "$id": "41", "kind": "constant", "name": "previewActionsContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "39", + "$id": "42", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -473,13 +508,13 @@ "decorators": [] }, { - "$id": "40", + "$id": "43", "kind": "constant", "name": "listContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "41", + "$id": "44", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -489,13 +524,13 @@ "decorators": [] }, { - "$id": "42", + "$id": "45", "kind": "constant", "name": "listByMongoClusterContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "43", + "$id": "46", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -505,13 +540,13 @@ "decorators": [] }, { - "$id": "44", + "$id": "47", "kind": "constant", "name": "startContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "45", + "$id": "48", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -521,13 +556,13 @@ "decorators": [] }, { - "$id": "46", + "$id": "49", "kind": "constant", "name": "startContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "47", + "$id": "50", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -537,13 +572,13 @@ "decorators": [] }, { - "$id": "48", + "$id": "51", "kind": "constant", "name": "startContentType2", "namespace": "", "usage": "None", "valueType": { - "$id": "49", + "$id": "52", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -553,13 +588,13 @@ "decorators": [] }, { - "$id": "50", + "$id": "53", "kind": "constant", "name": "startContentType3", "namespace": "", "usage": "None", "valueType": { - "$id": "51", + "$id": "54", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -569,13 +604,13 @@ "decorators": [] }, { - "$id": "52", + "$id": "55", "kind": "constant", "name": "createOrUpdateContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "53", + "$id": "56", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -585,13 +620,13 @@ "decorators": [] }, { - "$id": "54", + "$id": "57", "kind": "constant", "name": "createOrUpdateContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "55", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -601,13 +636,13 @@ "decorators": [] }, { - "$id": "56", + "$id": "59", "kind": "constant", "name": "createOrUpdateContentType2", "namespace": "", "usage": "None", "valueType": { - "$id": "57", + "$id": "60", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -617,13 +652,13 @@ "decorators": [] }, { - "$id": "58", + "$id": "61", "kind": "constant", "name": "createOrUpdateContentType3", "namespace": "", "usage": "None", "valueType": { - "$id": "59", + "$id": "62", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -633,13 +668,13 @@ "decorators": [] }, { - "$id": "60", + "$id": "63", "kind": "constant", "name": "getContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "61", + "$id": "64", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -649,13 +684,13 @@ "decorators": [] }, { - "$id": "62", + "$id": "65", "kind": "constant", "name": "updateContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "63", + "$id": "66", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -665,13 +700,13 @@ "decorators": [] }, { - "$id": "64", + "$id": "67", "kind": "constant", "name": "updateContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "65", + "$id": "68", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -681,13 +716,13 @@ "decorators": [] }, { - "$id": "66", + "$id": "69", "kind": "constant", "name": "updateContentType2", "namespace": "", "usage": "None", "valueType": { - "$id": "67", + "$id": "70", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -697,13 +732,13 @@ "decorators": [] }, { - "$id": "68", + "$id": "71", "kind": "constant", "name": "updateContentType3", "namespace": "", "usage": "None", "valueType": { - "$id": "69", + "$id": "72", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -713,13 +748,13 @@ "decorators": [] }, { - "$id": "70", + "$id": "73", "kind": "constant", "name": "listContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "71", + "$id": "74", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -729,13 +764,13 @@ "decorators": [] }, { - "$id": "72", + "$id": "75", "kind": "constant", "name": "listBySubscriptionContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "73", + "$id": "76", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -745,13 +780,13 @@ "decorators": [] }, { - "$id": "74", + "$id": "77", "kind": "constant", "name": "getContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "75", + "$id": "78", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -761,13 +796,13 @@ "decorators": [] }, { - "$id": "76", + "$id": "79", "kind": "constant", "name": "createOrUpdateContentType4", "namespace": "", "usage": "None", "valueType": { - "$id": "77", + "$id": "80", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -777,13 +812,13 @@ "decorators": [] }, { - "$id": "78", + "$id": "81", "kind": "constant", "name": "createOrUpdateContentType5", "namespace": "", "usage": "None", "valueType": { - "$id": "79", + "$id": "82", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -793,13 +828,13 @@ "decorators": [] }, { - "$id": "80", + "$id": "83", "kind": "constant", "name": "updateContentType4", "namespace": "", "usage": "None", "valueType": { - "$id": "81", + "$id": "84", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -809,13 +844,13 @@ "decorators": [] }, { - "$id": "82", + "$id": "85", "kind": "constant", "name": "updateContentType5", "namespace": "", "usage": "None", "valueType": { - "$id": "83", + "$id": "86", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -825,13 +860,13 @@ "decorators": [] }, { - "$id": "84", + "$id": "87", "kind": "constant", "name": "createOrUpdateContentType6", "namespace": "", "usage": "None", "valueType": { - "$id": "85", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -841,13 +876,13 @@ "decorators": [] }, { - "$id": "86", + "$id": "89", "kind": "constant", "name": "createOrUpdateContentType7", "namespace": "", "usage": "None", "valueType": { - "$id": "87", + "$id": "90", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -857,13 +892,13 @@ "decorators": [] }, { - "$id": "88", + "$id": "91", "kind": "constant", "name": "createOrUpdateContentType8", "namespace": "", "usage": "None", "valueType": { - "$id": "89", + "$id": "92", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -873,13 +908,13 @@ "decorators": [] }, { - "$id": "90", + "$id": "93", "kind": "constant", "name": "createOrUpdateContentType9", "namespace": "", "usage": "None", "valueType": { - "$id": "91", + "$id": "94", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -889,13 +924,13 @@ "decorators": [] }, { - "$id": "92", + "$id": "95", "kind": "constant", "name": "listContentType2", "namespace": "", "usage": "None", "valueType": { - "$id": "93", + "$id": "96", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -905,13 +940,13 @@ "decorators": [] }, { - "$id": "94", + "$id": "97", "kind": "constant", "name": "createOrUpdateContentType10", "namespace": "", "usage": "None", "valueType": { - "$id": "95", + "$id": "98", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -921,13 +956,13 @@ "decorators": [] }, { - "$id": "96", + "$id": "99", "kind": "constant", "name": "createOrUpdateContentType11", "namespace": "", "usage": "None", "valueType": { - "$id": "97", + "$id": "100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -937,13 +972,13 @@ "decorators": [] }, { - "$id": "98", + "$id": "101", "kind": "constant", "name": "createOrUpdateContentType12", "namespace": "", "usage": "None", "valueType": { - "$id": "99", + "$id": "102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -953,13 +988,13 @@ "decorators": [] }, { - "$id": "100", + "$id": "103", "kind": "constant", "name": "createOrUpdateContentType13", "namespace": "", "usage": "None", "valueType": { - "$id": "101", + "$id": "104", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -969,13 +1004,13 @@ "decorators": [] }, { - "$id": "102", + "$id": "105", "kind": "constant", "name": "getContentType2", "namespace": "", "usage": "None", "valueType": { - "$id": "103", + "$id": "106", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -985,13 +1020,13 @@ "decorators": [] }, { - "$id": "104", + "$id": "107", "kind": "constant", "name": "getContentType3", "namespace": "", "usage": "None", "valueType": { - "$id": "105", + "$id": "108", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1001,13 +1036,13 @@ "decorators": [] }, { - "$id": "106", + "$id": "109", "kind": "constant", "name": "updateContentType6", "namespace": "", "usage": "None", "valueType": { - "$id": "107", + "$id": "110", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1017,13 +1052,13 @@ "decorators": [] }, { - "$id": "108", + "$id": "111", "kind": "constant", "name": "updateContentType7", "namespace": "", "usage": "None", "valueType": { - "$id": "109", + "$id": "112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1033,13 +1068,13 @@ "decorators": [] }, { - "$id": "110", + "$id": "113", "kind": "constant", "name": "updateContentType8", "namespace": "", "usage": "None", "valueType": { - "$id": "111", + "$id": "114", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1049,13 +1084,13 @@ "decorators": [] }, { - "$id": "112", + "$id": "115", "kind": "constant", "name": "updateContentType9", "namespace": "", "usage": "None", "valueType": { - "$id": "113", + "$id": "116", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1065,13 +1100,13 @@ "decorators": [] }, { - "$id": "114", + "$id": "117", "kind": "constant", "name": "createOrUpdateContentType14", "namespace": "", "usage": "None", "valueType": { - "$id": "115", + "$id": "118", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1081,13 +1116,13 @@ "decorators": [] }, { - "$id": "116", + "$id": "119", "kind": "constant", "name": "createOrUpdateContentType15", "namespace": "", "usage": "None", "valueType": { - "$id": "117", + "$id": "120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1097,13 +1132,13 @@ "decorators": [] }, { - "$id": "118", + "$id": "121", "kind": "constant", "name": "createOrUpdateContentType16", "namespace": "", "usage": "None", "valueType": { - "$id": "119", + "$id": "122", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1113,13 +1148,13 @@ "decorators": [] }, { - "$id": "120", + "$id": "123", "kind": "constant", "name": "createOrUpdateContentType17", "namespace": "", "usage": "None", "valueType": { - "$id": "121", + "$id": "124", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1129,13 +1164,13 @@ "decorators": [] }, { - "$id": "122", + "$id": "125", "kind": "constant", "name": "getContentType4", "namespace": "", "usage": "None", "valueType": { - "$id": "123", + "$id": "126", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1145,13 +1180,13 @@ "decorators": [] }, { - "$id": "124", + "$id": "127", "kind": "constant", "name": "updateContentType10", "namespace": "", "usage": "None", "valueType": { - "$id": "125", + "$id": "128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1161,13 +1196,13 @@ "decorators": [] }, { - "$id": "126", + "$id": "129", "kind": "constant", "name": "updateContentType11", "namespace": "", "usage": "None", "valueType": { - "$id": "127", + "$id": "130", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1177,13 +1212,13 @@ "decorators": [] }, { - "$id": "128", + "$id": "131", "kind": "constant", "name": "updateContentType12", "namespace": "", "usage": "None", "valueType": { - "$id": "129", + "$id": "132", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1193,13 +1228,13 @@ "decorators": [] }, { - "$id": "130", + "$id": "133", "kind": "constant", "name": "updateContentType13", "namespace": "", "usage": "None", "valueType": { - "$id": "131", + "$id": "134", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1209,13 +1244,13 @@ "decorators": [] }, { - "$id": "132", + "$id": "135", "kind": "constant", "name": "listContentType3", "namespace": "", "usage": "None", "valueType": { - "$id": "133", + "$id": "136", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1225,13 +1260,13 @@ "decorators": [] }, { - "$id": "134", + "$id": "137", "kind": "constant", "name": "listBySubscriptionContentType1", "namespace": "", "usage": "None", "valueType": { - "$id": "135", + "$id": "138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1241,13 +1276,13 @@ "decorators": [] }, { - "$id": "136", + "$id": "139", "kind": "constant", "name": "createOrUpdateContentType18", "namespace": "", "usage": "None", "valueType": { - "$id": "137", + "$id": "140", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1257,13 +1292,13 @@ "decorators": [] }, { - "$id": "138", + "$id": "141", "kind": "constant", "name": "createOrUpdateContentType19", "namespace": "", "usage": "None", "valueType": { - "$id": "139", + "$id": "142", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1273,13 +1308,13 @@ "decorators": [] }, { - "$id": "140", + "$id": "143", "kind": "constant", "name": "createOrUpdateContentType20", "namespace": "", "usage": "None", "valueType": { - "$id": "141", + "$id": "144", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1289,13 +1324,13 @@ "decorators": [] }, { - "$id": "142", + "$id": "145", "kind": "constant", "name": "createOrUpdateContentType21", "namespace": "", "usage": "None", "valueType": { - "$id": "143", + "$id": "146", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1305,13 +1340,13 @@ "decorators": [] }, { - "$id": "144", + "$id": "147", "kind": "constant", "name": "getContentType5", "namespace": "", "usage": "None", "valueType": { - "$id": "145", + "$id": "148", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1321,13 +1356,13 @@ "decorators": [] }, { - "$id": "146", + "$id": "149", "kind": "constant", "name": "updateContentType14", "namespace": "", "usage": "None", "valueType": { - "$id": "147", + "$id": "150", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1337,13 +1372,13 @@ "decorators": [] }, { - "$id": "148", + "$id": "151", "kind": "constant", "name": "updateContentType15", "namespace": "", "usage": "None", "valueType": { - "$id": "149", + "$id": "152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1353,13 +1388,13 @@ "decorators": [] }, { - "$id": "150", + "$id": "153", "kind": "constant", "name": "updateContentType16", "namespace": "", "usage": "None", "valueType": { - "$id": "151", + "$id": "154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1369,13 +1404,13 @@ "decorators": [] }, { - "$id": "152", + "$id": "155", "kind": "constant", "name": "updateContentType17", "namespace": "", "usage": "None", "valueType": { - "$id": "153", + "$id": "156", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1385,13 +1420,13 @@ "decorators": [] }, { - "$id": "154", + "$id": "157", "kind": "constant", "name": "listContentType4", "namespace": "", "usage": "None", "valueType": { - "$id": "155", + "$id": "158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1401,13 +1436,13 @@ "decorators": [] }, { - "$id": "156", + "$id": "159", "kind": "constant", "name": "listBySubscriptionContentType2", "namespace": "", "usage": "None", "valueType": { - "$id": "157", + "$id": "160", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1417,13 +1452,13 @@ "decorators": [] }, { - "$id": "158", + "$id": "161", "kind": "constant", "name": "zooAddressListContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "159", + "$id": "162", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1433,13 +1468,13 @@ "decorators": [] }, { - "$id": "160", + "$id": "163", "kind": "constant", "name": "getContentType6", "namespace": "", "usage": "None", "valueType": { - "$id": "161", + "$id": "164", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1449,13 +1484,13 @@ "decorators": [] }, { - "$id": "162", + "$id": "165", "kind": "constant", "name": "createOrUpdateContentType22", "namespace": "", "usage": "None", "valueType": { - "$id": "163", + "$id": "166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1465,13 +1500,13 @@ "decorators": [] }, { - "$id": "164", + "$id": "167", "kind": "constant", "name": "createOrUpdateContentType23", "namespace": "", "usage": "None", "valueType": { - "$id": "165", + "$id": "168", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1481,13 +1516,13 @@ "decorators": [] }, { - "$id": "166", + "$id": "169", "kind": "constant", "name": "updateContentType18", "namespace": "", "usage": "None", "valueType": { - "$id": "167", + "$id": "170", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1497,13 +1532,13 @@ "decorators": [] }, { - "$id": "168", + "$id": "171", "kind": "constant", "name": "updateContentType19", "namespace": "", "usage": "None", "valueType": { - "$id": "169", + "$id": "172", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1513,13 +1548,61 @@ "decorators": [] }, { - "$id": "170", + "$id": "173", "kind": "constant", "name": "getContentType7", "namespace": "", "usage": "None", "valueType": { - "$id": "171", + "$id": "174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "175", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "177", + "kind": "constant", + "name": "listBySubscriptionContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "179", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "180", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1529,13 +1612,13 @@ "decorators": [] }, { - "$id": "172", + "$id": "181", "kind": "constant", "name": "updateContentType20", "namespace": "", "usage": "None", "valueType": { - "$id": "173", + "$id": "182", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1545,13 +1628,93 @@ "decorators": [] }, { - "$id": "174", + "$id": "183", "kind": "constant", "name": "updateContentType21", "namespace": "", "usage": "None", "valueType": { - "$id": "175", + "$id": "184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "185", + "kind": "constant", + "name": "updateContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "187", + "kind": "constant", + "name": "updateContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "189", + "kind": "constant", + "name": "getContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "191", + "kind": "constant", + "name": "updateContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "193", + "kind": "constant", + "name": "updateContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "194", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1561,13 +1724,13 @@ "decorators": [] }, { - "$id": "176", + "$id": "195", "kind": "constant", "name": "recommendContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "177", + "$id": "196", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1579,22 +1742,27 @@ ], "models": [ { - "$id": "178", + "$id": "197", "kind": "model", "name": "FooPreviewAction", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.FooPreviewAction", "usage": "Input,Output,Json", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "179", + "$id": "198", "kind": "property", "name": "action", "serializedName": "action", "doc": "The action to be performed.", "type": { - "$id": "180", + "$id": "199", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1614,12 +1782,12 @@ "isHttpMetadata": false }, { - "$id": "181", + "$id": "200", "kind": "property", "name": "result", "serializedName": "result", "type": { - "$id": "182", + "$id": "201", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1641,7 +1809,7 @@ ] }, { - "$id": "183", + "$id": "202", "kind": "model", "name": "ErrorResponse", "namespace": "MgmtTypeSpec", @@ -1649,32 +1817,42 @@ "usage": "Json,Exception", "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", "summary": "Error response", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "184", + "$id": "203", "kind": "property", "name": "error", "serializedName": "error", "doc": "The error object.", "type": { - "$id": "185", + "$id": "204", "kind": "model", "name": "ErrorDetail", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", "usage": "Output,Json,Exception,LroInitial,LroPolling,LroFinalEnvelope", "doc": "The error detail.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "186", + "$id": "205", "kind": "property", "name": "code", "serializedName": "code", "doc": "The error code.", "type": { - "$id": "187", + "$id": "206", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1694,13 +1872,13 @@ "isHttpMetadata": false }, { - "$id": "188", + "$id": "207", "kind": "property", "name": "message", "serializedName": "message", "doc": "The error message.", "type": { - "$id": "189", + "$id": "208", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1720,13 +1898,13 @@ "isHttpMetadata": false }, { - "$id": "190", + "$id": "209", "kind": "property", "name": "target", "serializedName": "target", "doc": "The error target.", "type": { - "$id": "191", + "$id": "210", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1746,17 +1924,17 @@ "isHttpMetadata": false }, { - "$id": "192", + "$id": "211", "kind": "property", "name": "details", "serializedName": "details", "doc": "The error details.", "type": { - "$id": "193", + "$id": "212", "kind": "array", "name": "ArrayErrorDetail", "valueType": { - "$ref": "185" + "$ref": "204" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1775,33 +1953,38 @@ "isHttpMetadata": false }, { - "$id": "194", + "$id": "213", "kind": "property", "name": "additionalInfo", "serializedName": "additionalInfo", "doc": "The error additional info.", "type": { - "$id": "195", + "$id": "214", "kind": "array", "name": "ArrayErrorAdditionalInfo", "valueType": { - "$id": "196", + "$id": "215", "kind": "model", "name": "ErrorAdditionalInfo", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", "usage": "Output,Json,Exception,LroInitial,LroPolling,LroFinalEnvelope", "doc": "The resource management error additional info.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "197", + "$id": "216", "kind": "property", "name": "type", "serializedName": "type", "doc": "The additional info type.", "type": { - "$id": "198", + "$id": "217", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1821,13 +2004,13 @@ "isHttpMetadata": false }, { - "$id": "199", + "$id": "218", "kind": "property", "name": "info", "serializedName": "info", "doc": "The additional info.", "type": { - "$id": "200", + "$id": "219", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1882,33 +2065,38 @@ ] }, { - "$ref": "185" + "$ref": "204" }, { - "$ref": "196" + "$ref": "215" }, { - "$id": "201", + "$id": "220", "kind": "model", "name": "OperationListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", "usage": "Output,Json", "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "202", + "$id": "221", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Operation items on this page", "type": { - "$id": "203", + "$id": "222", "kind": "array", "name": "ArrayOperation", "valueType": { - "$id": "204", + "$id": "223", "kind": "model", "name": "Operation", "namespace": "MgmtTypeSpec", @@ -1916,16 +2104,21 @@ "usage": "Output,Json", "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", "summary": "REST API Operation", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "205", + "$id": "224", "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": "206", + "$id": "225", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1945,13 +2138,13 @@ "isHttpMetadata": false }, { - "$id": "207", + "$id": "226", "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": "208", + "$id": "227", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1971,29 +2164,34 @@ "isHttpMetadata": false }, { - "$id": "209", + "$id": "228", "kind": "property", "name": "display", "serializedName": "display", "doc": "Localized display information for this particular operation.", "type": { - "$id": "210", + "$id": "229", "kind": "model", "name": "OperationDisplay", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", "usage": "Output,Json", "doc": "Localized display information for and operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "211", + "$id": "230", "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": "212", + "$id": "231", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2013,13 +2211,13 @@ "isHttpMetadata": false }, { - "$id": "213", + "$id": "232", "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": "214", + "$id": "233", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2039,13 +2237,13 @@ "isHttpMetadata": false }, { - "$id": "215", + "$id": "234", "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": "216", + "$id": "235", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2065,13 +2263,13 @@ "isHttpMetadata": false }, { - "$id": "217", + "$id": "236", "kind": "property", "name": "description", "serializedName": "description", "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", "type": { - "$id": "218", + "$id": "237", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2106,7 +2304,7 @@ "isHttpMetadata": false }, { - "$id": "219", + "$id": "238", "kind": "property", "name": "origin", "serializedName": "origin", @@ -2128,7 +2326,7 @@ "isHttpMetadata": false }, { - "$id": "220", + "$id": "239", "kind": "property", "name": "actionType", "serializedName": "actionType", @@ -2168,18 +2366,18 @@ "isHttpMetadata": false }, { - "$id": "221", + "$id": "240", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "222", + "$id": "241", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "223", + "$id": "242", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2203,33 +2401,38 @@ ] }, { - "$ref": "204" + "$ref": "223" }, { - "$ref": "210" + "$ref": "229" }, { - "$id": "224", + "$id": "243", "kind": "model", "name": "PrivateLinkListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", "usage": "Output,Json", "doc": "The response of a PrivateLink list operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "225", + "$id": "244", "kind": "property", "name": "value", "serializedName": "value", "doc": "The PrivateLink items on this page", "type": { - "$id": "226", + "$id": "245", "kind": "array", "name": "ArrayPrivateLink", "valueType": { - "$id": "227", + "$id": "246", "kind": "model", "name": "PrivateLink", "namespace": "MgmtTypeSpec", @@ -2237,13 +2440,17 @@ "usage": "Output,Json", "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} } ], "baseModel": { - "$id": "228", + "$id": "247", "kind": "model", "name": "ProxyResource", "namespace": "MgmtTypeSpec", @@ -2251,9 +2458,14 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", "summary": "Proxy Resource", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "baseModel": { - "$id": "229", + "$id": "248", "kind": "model", "name": "Resource", "namespace": "MgmtTypeSpec", @@ -2261,21 +2473,26 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", "summary": "Resource", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "230", + "$id": "249", "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": "231", + "$id": "250", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "232", + "$id": "251", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2297,13 +2514,13 @@ "isHttpMetadata": false }, { - "$id": "233", + "$id": "252", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the resource", "type": { - "$id": "234", + "$id": "253", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2323,18 +2540,18 @@ "isHttpMetadata": false }, { - "$id": "235", + "$id": "254", "kind": "property", "name": "type", "serializedName": "type", "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", "type": { - "$id": "236", + "$id": "255", "kind": "string", "name": "armResourceType", "crossLanguageDefinitionId": "Azure.Core.armResourceType", "baseType": { - "$id": "237", + "$id": "256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2356,29 +2573,34 @@ "isHttpMetadata": false }, { - "$id": "238", + "$id": "257", "kind": "property", "name": "systemData", "serializedName": "systemData", "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "type": { - "$id": "239", + "$id": "258", "kind": "model", "name": "SystemData", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", "usage": "Output,Json,LroInitial,LroFinalEnvelope", "doc": "Metadata pertaining to creation and last modification of the resource.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "240", + "$id": "259", "kind": "property", "name": "createdBy", "serializedName": "createdBy", "doc": "The identity that created the resource.", "type": { - "$id": "241", + "$id": "260", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2398,7 +2620,7 @@ "isHttpMetadata": false }, { - "$id": "242", + "$id": "261", "kind": "property", "name": "createdByType", "serializedName": "createdByType", @@ -2420,18 +2642,18 @@ "isHttpMetadata": false }, { - "$id": "243", + "$id": "262", "kind": "property", "name": "createdAt", "serializedName": "createdAt", "doc": "The timestamp of resource creation (UTC).", "type": { - "$id": "244", + "$id": "263", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "245", + "$id": "264", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2454,13 +2676,13 @@ "isHttpMetadata": false }, { - "$id": "246", + "$id": "265", "kind": "property", "name": "lastModifiedBy", "serializedName": "lastModifiedBy", "doc": "The identity that last modified the resource.", "type": { - "$id": "247", + "$id": "266", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2480,7 +2702,7 @@ "isHttpMetadata": false }, { - "$id": "248", + "$id": "267", "kind": "property", "name": "lastModifiedByType", "serializedName": "lastModifiedByType", @@ -2502,18 +2724,18 @@ "isHttpMetadata": false }, { - "$id": "249", + "$id": "268", "kind": "property", "name": "lastModifiedAt", "serializedName": "lastModifiedAt", "doc": "The timestamp of resource last modification (UTC)", "type": { - "$id": "250", + "$id": "269", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "251", + "$id": "270", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2556,29 +2778,34 @@ }, "properties": [ { - "$id": "252", + "$id": "271", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "253", + "$id": "272", "kind": "model", "name": "PrivateLinkResourceProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", "usage": "Output,Json", "doc": "Properties of a private link resource.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "254", + "$id": "273", "kind": "property", "name": "groupId", "serializedName": "groupId", "doc": "The private link resource group id.", "type": { - "$id": "255", + "$id": "274", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2598,17 +2825,17 @@ "isHttpMetadata": false }, { - "$id": "256", + "$id": "275", "kind": "property", "name": "requiredMembers", "serializedName": "requiredMembers", "doc": "The private link resource required member names.", "type": { - "$id": "257", + "$id": "276", "kind": "array", "name": "Array", "valueType": { - "$id": "258", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2631,13 +2858,13 @@ "isHttpMetadata": false }, { - "$id": "259", + "$id": "278", "kind": "property", "name": "requiredZoneNames", "serializedName": "requiredZoneNames", "doc": "The private link resource private link DNS zone name.", "type": { - "$ref": "257" + "$ref": "276" }, "optional": true, "readOnly": false, @@ -2668,13 +2895,13 @@ "isHttpMetadata": false }, { - "$id": "260", + "$id": "279", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "261", + "$id": "280", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2694,34 +2921,39 @@ "isHttpMetadata": true }, { - "$id": "262", + "$id": "281", "kind": "property", "name": "identity", "serializedName": "identity", "doc": "The managed service identities assigned to this resource.", "type": { - "$id": "263", + "$id": "282", "kind": "model", "name": "ManagedServiceIdentity", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", "usage": "Output,Json", "doc": "Managed service identity (system assigned and/or user assigned identities)", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "264", + "$id": "283", "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": "265", + "$id": "284", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "266", + "$id": "285", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2743,18 +2975,18 @@ "isHttpMetadata": false }, { - "$id": "267", + "$id": "286", "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": "268", + "$id": "287", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "269", + "$id": "288", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2776,7 +3008,7 @@ "isHttpMetadata": false }, { - "$id": "270", + "$id": "289", "kind": "property", "name": "type", "serializedName": "type", @@ -2798,47 +3030,52 @@ "isHttpMetadata": false }, { - "$id": "271", + "$id": "290", "kind": "property", "name": "userAssignedIdentities", "serializedName": "userAssignedIdentities", "doc": "The identities assigned to this resource by the user.", "type": { - "$id": "272", + "$id": "291", "kind": "dict", "keyType": { - "$id": "273", + "$id": "292", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "274", + "$id": "293", "kind": "nullable", "type": { - "$id": "275", + "$id": "294", "kind": "model", "name": "UserAssignedIdentity", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", "usage": "Output,Json", "doc": "User assigned identity properties", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "276", + "$id": "295", "kind": "property", "name": "principalId", "serializedName": "principalId", "doc": "The principal ID of the assigned identity.", "type": { - "$id": "277", + "$id": "296", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "278", + "$id": "297", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2860,18 +3097,18 @@ "isHttpMetadata": false }, { - "$id": "279", + "$id": "298", "kind": "property", "name": "clientId", "serializedName": "clientId", "doc": "The client ID of the assigned identity.", "type": { - "$id": "280", + "$id": "299", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "281", + "$id": "300", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2945,18 +3182,18 @@ "isHttpMetadata": false }, { - "$id": "282", + "$id": "301", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "283", + "$id": "302", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "284", + "$id": "303", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2980,58 +3217,68 @@ ] }, { - "$ref": "227" + "$ref": "246" }, { - "$ref": "253" + "$ref": "272" }, { - "$ref": "263" + "$ref": "282" }, { - "$ref": "275" + "$ref": "294" }, { - "$ref": "228" + "$ref": "247" }, { - "$ref": "229" + "$ref": "248" }, { - "$ref": "239" + "$ref": "258" }, { - "$id": "285", + "$id": "304", "kind": "model", "name": "StartParameterBody", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.start.Parameter.body.anonymous", "usage": "Input", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "286", + "$id": "305", "kind": "property", "name": "body", "doc": "SAP Application server instance start request body.", "type": { - "$id": "287", + "$id": "306", "kind": "model", "name": "StartRequest", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.StartRequest", "usage": "Input,Json", "doc": "Start SAP instance(s) request body.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "288", + "$id": "307", "kind": "property", "name": "startVm", "serializedName": "startVm", "doc": "The boolean value indicates whether to start the virtual machines before starting the SAP instances.", "type": { - "$id": "289", + "$id": "308", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3064,31 +3311,36 @@ ] }, { - "$ref": "287" + "$ref": "306" }, { - "$id": "290", + "$id": "309", "kind": "model", "name": "OperationStatusResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult", "usage": "Output,Json,LroInitial,LroFinalEnvelope", "doc": "The current status of an async operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "291", + "$id": "310", "kind": "property", "name": "id", "serializedName": "id", "doc": "Fully qualified ID for the async operation.", "type": { - "$id": "292", + "$id": "311", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "293", + "$id": "312", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3110,13 +3362,13 @@ "isHttpMetadata": false }, { - "$id": "294", + "$id": "313", "kind": "property", "name": "name", "serializedName": "name", "doc": "Name of the async operation.", "type": { - "$id": "295", + "$id": "314", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3136,13 +3388,13 @@ "isHttpMetadata": false }, { - "$id": "296", + "$id": "315", "kind": "property", "name": "status", "serializedName": "status", "doc": "Operation status.", "type": { - "$id": "297", + "$id": "316", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3162,13 +3414,13 @@ "isHttpMetadata": false }, { - "$id": "298", + "$id": "317", "kind": "property", "name": "percentComplete", "serializedName": "percentComplete", "doc": "Percent of the operation that is complete.", "type": { - "$id": "299", + "$id": "318", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -3188,18 +3440,18 @@ "isHttpMetadata": false }, { - "$id": "300", + "$id": "319", "kind": "property", "name": "startTime", "serializedName": "startTime", "doc": "The start time of the operation.", "type": { - "$id": "301", + "$id": "320", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "302", + "$id": "321", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3222,18 +3474,18 @@ "isHttpMetadata": false }, { - "$id": "303", + "$id": "322", "kind": "property", "name": "endTime", "serializedName": "endTime", "doc": "The end time of the operation.", "type": { - "$id": "304", + "$id": "323", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "305", + "$id": "324", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3256,17 +3508,17 @@ "isHttpMetadata": false }, { - "$id": "306", + "$id": "325", "kind": "property", "name": "operations", "serializedName": "operations", "doc": "The operations list.", "type": { - "$id": "307", + "$id": "326", "kind": "array", "name": "ArrayOperationStatusResult", "valueType": { - "$ref": "290" + "$ref": "309" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3285,13 +3537,13 @@ "isHttpMetadata": false }, { - "$id": "308", + "$id": "327", "kind": "property", "name": "error", "serializedName": "error", "doc": "If present, details of the operation error.", "type": { - "$ref": "185" + "$ref": "204" }, "optional": true, "readOnly": false, @@ -3307,18 +3559,18 @@ "isHttpMetadata": false }, { - "$id": "309", + "$id": "328", "kind": "property", "name": "resourceId", "serializedName": "resourceId", "doc": "Fully qualified ID of the resource against which the original async operation was started.", "type": { - "$id": "310", + "$id": "329", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "311", + "$id": "330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3342,17 +3594,22 @@ ] }, { - "$id": "312", + "$id": "331", "kind": "model", "name": "ArmOperationStatusResourceProvisioningState", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", "usage": "LroPolling", "doc": "Standard Azure Resource Manager operation status response", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "313", + "$id": "332", "kind": "property", "name": "status", "serializedName": "status", @@ -3374,13 +3631,13 @@ "isHttpMetadata": false }, { - "$id": "314", + "$id": "333", "kind": "property", "name": "id", "serializedName": "id", "doc": "The unique identifier for the operationStatus resource", "type": { - "$id": "315", + "$id": "334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3400,13 +3657,13 @@ "isHttpMetadata": true }, { - "$id": "316", + "$id": "335", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the operationStatus resource", "type": { - "$id": "317", + "$id": "336", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3426,18 +3683,18 @@ "isHttpMetadata": false }, { - "$id": "318", + "$id": "337", "kind": "property", "name": "startTime", "serializedName": "startTime", "doc": "Operation start time", "type": { - "$id": "319", + "$id": "338", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "320", + "$id": "339", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3460,18 +3717,18 @@ "isHttpMetadata": false }, { - "$id": "321", + "$id": "340", "kind": "property", "name": "endTime", "serializedName": "endTime", "doc": "Operation complete time", "type": { - "$id": "322", + "$id": "341", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "323", + "$id": "342", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3494,13 +3751,13 @@ "isHttpMetadata": false }, { - "$id": "324", + "$id": "343", "kind": "property", "name": "percentComplete", "serializedName": "percentComplete", "doc": "The progress made toward completing the operation", "type": { - "$id": "325", + "$id": "344", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -3520,13 +3777,13 @@ "isHttpMetadata": false }, { - "$id": "326", + "$id": "345", "kind": "property", "name": "error", "serializedName": "error", "doc": "Errors that occurred if the operation ended with Canceled or Failed status", "type": { - "$ref": "185" + "$ref": "204" }, "optional": true, "readOnly": true, @@ -3544,7 +3801,7 @@ ] }, { - "$id": "327", + "$id": "346", "kind": "model", "name": "Foo", "namespace": "MgmtTypeSpec", @@ -3553,7 +3810,11 @@ "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", "decorators": [ { - "name": "Azure.ResourceManager.Private.@armResourceInternal", + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} }, { @@ -3563,7 +3824,7 @@ "resourceType": "MgmtTypeSpec/foos", "methods": [ { - "$id": "328", + "$id": "347", "methodId": "MgmtTypeSpec.Foos.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -3571,7 +3832,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "329", + "$id": "348", "methodId": "MgmtTypeSpec.Foos.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -3579,7 +3840,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "330", + "$id": "349", "methodId": "MgmtTypeSpec.Foos.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -3587,7 +3848,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "331", + "$id": "350", "methodId": "MgmtTypeSpec.Foos.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -3595,14 +3856,14 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "332", + "$id": "351", "methodId": "MgmtTypeSpec.Foos.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos", "operationScope": "ResourceGroup" }, { - "$id": "333", + "$id": "352", "methodId": "MgmtTypeSpec.Foos.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/foos", @@ -3615,7 +3876,7 @@ } ], "baseModel": { - "$id": "334", + "$id": "353", "kind": "model", "name": "TrackedResource", "namespace": "MgmtTypeSpec", @@ -3623,29 +3884,34 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", "summary": "Tracked Resource", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "baseModel": { - "$ref": "229" + "$ref": "248" }, "properties": [ { - "$id": "335", + "$id": "354", "kind": "property", "name": "tags", "serializedName": "tags", "doc": "Resource tags.", "type": { - "$id": "336", + "$id": "355", "kind": "dict", "keyType": { - "$id": "337", + "$id": "356", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "338", + "$id": "357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3667,16 +3933,23 @@ "isHttpMetadata": false }, { - "$id": "339", + "$id": "358", "kind": "property", "name": "location", "serializedName": "location", "doc": "The geo-location where the resource lives", "type": { - "$id": "340", + "$id": "359", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "optional": false, @@ -3696,19 +3969,23 @@ }, "properties": [ { - "$id": "341", + "$id": "361", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "342", + "$id": "362", "kind": "model", "name": "FooProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.FooProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ClientGenerator.Core.@useSystemTextJsonConverter", "arguments": { @@ -3718,13 +3995,13 @@ ], "properties": [ { - "$id": "343", + "$id": "363", "kind": "property", "name": "serviceUrl", "serializedName": "serviceUrl", "doc": "the service url", "type": { - "$id": "344", + "$id": "364", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -3744,13 +4021,13 @@ "isHttpMetadata": false }, { - "$id": "345", + "$id": "365", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "346", + "$id": "366", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3770,13 +4047,13 @@ "isHttpMetadata": false }, { - "$id": "347", + "$id": "367", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "348", + "$id": "368", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3796,13 +4073,13 @@ "isHttpMetadata": false }, { - "$id": "349", + "$id": "369", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "doc": "float value", "type": { - "$id": "350", + "$id": "370", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -3822,13 +4099,13 @@ "isHttpMetadata": false }, { - "$id": "351", + "$id": "371", "kind": "property", "name": "doubleValue", "serializedName": "doubleValue", "doc": "double value", "type": { - "$id": "352", + "$id": "372", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -3863,13 +4140,13 @@ "isHttpMetadata": false }, { - "$id": "353", + "$id": "373", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Foo", "type": { - "$id": "354", + "$id": "374", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3889,28 +4166,33 @@ "isHttpMetadata": true }, { - "$id": "355", + "$id": "375", "kind": "property", "name": "extendedLocation", "serializedName": "extendedLocation", "type": { - "$id": "356", + "$id": "376", "kind": "model", "name": "ExtendedLocation", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ExtendedLocation", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "The complex type of the extended location.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "357", + "$id": "377", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the extended location.", "type": { - "$id": "358", + "$id": "378", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3930,7 +4212,7 @@ "isHttpMetadata": false }, { - "$id": "359", + "$id": "379", "kind": "property", "name": "type", "serializedName": "type", @@ -3969,36 +4251,41 @@ ] }, { - "$ref": "342" + "$ref": "362" }, { - "$ref": "356" + "$ref": "376" }, { - "$ref": "334" + "$ref": "353" }, { - "$id": "360", + "$id": "380", "kind": "model", "name": "FooListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", "usage": "Output,Json", "doc": "The response of a Foo list operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "361", + "$id": "381", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Foo items on this page", "type": { - "$id": "362", + "$id": "382", "kind": "array", "name": "ArrayFoo", "valueType": { - "$ref": "327" + "$ref": "346" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4017,18 +4304,18 @@ "isHttpMetadata": false }, { - "$id": "363", + "$id": "383", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "364", + "$id": "384", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "365", + "$id": "385", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -4052,7 +4339,7 @@ ] }, { - "$id": "366", + "$id": "386", "kind": "model", "name": "FooSettings", "namespace": "MgmtTypeSpec", @@ -4060,6 +4347,10 @@ "usage": "Input,Output,Json", "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -4075,7 +4366,7 @@ "resourceType": "MgmtTypeSpec/FooSettings", "methods": [ { - "$id": "367", + "$id": "387", "methodId": "MgmtTypeSpec.FooSettingsOperations.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4083,7 +4374,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default" }, { - "$id": "368", + "$id": "388", "methodId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4091,7 +4382,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default" }, { - "$id": "369", + "$id": "389", "methodId": "MgmtTypeSpec.FooSettingsOperations.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4099,7 +4390,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default" }, { - "$id": "370", + "$id": "390", "methodId": "MgmtTypeSpec.FooSettingsOperations.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4114,31 +4405,36 @@ } ], "baseModel": { - "$ref": "228" + "$ref": "247" }, "properties": [ { - "$id": "371", + "$id": "391", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "372", + "$id": "392", "kind": "model", "name": "FooSettingsProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsProperties", "usage": "Input,Output,Json", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "373", + "$id": "393", "kind": "property", "name": "accessControlEnabled", "serializedName": "accessControlEnabled", "type": { - "$id": "374", + "$id": "394", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4158,7 +4454,7 @@ "isHttpMetadata": false }, { - "$id": "375", + "$id": "395", "kind": "property", "name": "provisioningState", "serializedName": "provisioningState", @@ -4179,26 +4475,31 @@ "isHttpMetadata": false }, { - "$id": "376", + "$id": "396", "kind": "property", "name": "metaData", "serializedName": "metaData", "type": { - "$id": "377", + "$id": "397", "kind": "model", "name": "FooSettingsPropertiesMetaData", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsPropertiesMetaData", "usage": "Output,Json", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "378", + "$id": "398", "kind": "property", "name": "metaDatas", "serializedName": "metaDatas", "type": { - "$ref": "257" + "$ref": "276" }, "optional": true, "readOnly": false, @@ -4244,13 +4545,13 @@ "isHttpMetadata": false }, { - "$id": "379", + "$id": "399", "kind": "property", "name": "name", "serializedName": "name", "doc": "The default Foo settings.", "type": { - "$id": "380", + "$id": "400", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4272,44 +4573,54 @@ ] }, { - "$ref": "372" + "$ref": "392" }, { - "$ref": "377" + "$ref": "397" }, { - "$id": "381", + "$id": "401", "kind": "model", "name": "FooSettingsUpdate", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", "usage": "Input,Json", "doc": "The type used for update operations of the FooSettings.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "382", + "$id": "402", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "383", + "$id": "403", "kind": "model", "name": "FooSettingsUpdateProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "usage": "Input,Json", "doc": "The updatable properties of the FooSettings.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "384", + "$id": "404", "kind": "property", "name": "accessControlEnabled", "serializedName": "accessControlEnabled", "type": { - "$id": "385", + "$id": "405", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4346,10 +4657,10 @@ ] }, { - "$ref": "383" + "$ref": "403" }, { - "$id": "386", + "$id": "406", "kind": "model", "name": "Bar", "namespace": "MgmtTypeSpec", @@ -4357,6 +4668,10 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -4372,7 +4687,7 @@ "resourceType": "MgmtTypeSpec/foos/bars", "methods": [ { - "$id": "387", + "$id": "407", "methodId": "MgmtTypeSpec.Bars.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -4380,7 +4695,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "388", + "$id": "408", "methodId": "MgmtTypeSpec.Bars.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -4388,7 +4703,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "389", + "$id": "409", "methodId": "MgmtTypeSpec.Bars.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars", @@ -4396,7 +4711,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "390", + "$id": "410", "methodId": "MgmtTypeSpec.Bars.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -4404,7 +4719,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "391", + "$id": "411", "methodId": "MgmtTypeSpec.Bars.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -4419,32 +4734,37 @@ } ], "baseModel": { - "$ref": "334" + "$ref": "353" }, "properties": [ { - "$id": "392", + "$id": "412", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "393", + "$id": "413", "kind": "model", "name": "BarProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BarProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "394", + "$id": "414", "kind": "property", "name": "serviceUrl", "serializedName": "serviceUrl", "doc": "the service url", "type": { - "$id": "395", + "$id": "415", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -4464,13 +4784,13 @@ "isHttpMetadata": false }, { - "$id": "396", + "$id": "416", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "397", + "$id": "417", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4490,13 +4810,13 @@ "isHttpMetadata": false }, { - "$id": "398", + "$id": "418", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "399", + "$id": "419", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4516,13 +4836,13 @@ "isHttpMetadata": false }, { - "$id": "400", + "$id": "420", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "doc": "float value", "type": { - "$id": "401", + "$id": "421", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -4542,13 +4862,13 @@ "isHttpMetadata": false }, { - "$id": "402", + "$id": "422", "kind": "property", "name": "doubleValue", "serializedName": "doubleValue", "doc": "double value", "type": { - "$id": "403", + "$id": "423", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -4583,13 +4903,13 @@ "isHttpMetadata": false }, { - "$id": "404", + "$id": "424", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Bar", "type": { - "$id": "405", + "$id": "425", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4611,30 +4931,35 @@ ] }, { - "$ref": "393" + "$ref": "413" }, { - "$id": "406", + "$id": "426", "kind": "model", "name": "BarListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", "usage": "Output,Json", "doc": "The response of a Bar list operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "407", + "$id": "427", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Bar items on this page", "type": { - "$id": "408", + "$id": "428", "kind": "array", "name": "ArrayBar", "valueType": { - "$ref": "386" + "$ref": "406" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4653,18 +4978,18 @@ "isHttpMetadata": false }, { - "$id": "409", + "$id": "429", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "410", + "$id": "430", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "411", + "$id": "431", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -4688,7 +5013,7 @@ ] }, { - "$id": "412", + "$id": "432", "kind": "model", "name": "BarSettingsResource", "namespace": "MgmtTypeSpec", @@ -4696,6 +5021,10 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -4717,7 +5046,7 @@ "resourceType": "MgmtTypeSpec/foos/bars/settings", "methods": [ { - "$id": "413", + "$id": "433", "methodId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", @@ -4725,7 +5054,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current" }, { - "$id": "414", + "$id": "434", "methodId": "MgmtTypeSpec.BarSettingsOperations.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", @@ -4741,32 +5070,37 @@ } ], "baseModel": { - "$ref": "228" + "$ref": "247" }, "properties": [ { - "$id": "415", + "$id": "435", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "416", + "$id": "436", "kind": "model", "name": "BarSettingsProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "417", + "$id": "437", "kind": "property", "name": "isEnabled", "serializedName": "isEnabled", "doc": "enabled", "type": { - "$id": "418", + "$id": "438", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4801,13 +5135,13 @@ "isHttpMetadata": false }, { - "$id": "419", + "$id": "439", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the BarSettingsResource", "type": { - "$id": "420", + "$id": "440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4827,12 +5161,12 @@ "isHttpMetadata": true }, { - "$id": "421", + "$id": "441", "kind": "property", "name": "stringArray", "serializedName": "stringArray", "type": { - "$ref": "257" + "$ref": "276" }, "optional": true, "readOnly": false, @@ -4848,27 +5182,32 @@ "isHttpMetadata": false }, { - "$id": "422", + "$id": "442", "kind": "property", "name": "property", "serializedName": "property", "type": { - "$id": "423", + "$id": "443", "kind": "model", "name": "BarQuotaProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "424", + "$id": "444", "kind": "property", "name": "left", "serializedName": "left", "doc": "enabled", "type": { - "$id": "425", + "$id": "445", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4903,12 +5242,12 @@ "isHttpMetadata": false }, { - "$id": "426", + "$id": "446", "kind": "property", "name": "anotherProperty", "serializedName": "anotherProperty", "type": { - "$ref": "423" + "$ref": "443" }, "optional": false, "readOnly": false, @@ -4924,42 +5263,57 @@ "isHttpMetadata": false }, { - "$id": "427", + "$id": "447", "kind": "property", "name": "flattenedNestedProperty", "serializedName": "flattenedNestedProperty", "type": { - "$id": "428", + "$id": "448", "kind": "model", "name": "BarNestedQuotaProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BarNestedQuotaProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "baseModel": { - "$id": "429", + "$id": "449", "kind": "model", "name": "BarMiddleNestedQuotaProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BarMiddleNestedQuotaProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "baseModel": { - "$id": "430", + "$id": "450", "kind": "model", "name": "BarDeeplyNestedQuotaProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BarDeeplyNestedQuotaProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "431", + "$id": "451", "kind": "property", "name": "innerProp1", "serializedName": "innerProp1", "type": { - "$id": "432", + "$id": "452", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4979,12 +5333,12 @@ "isHttpMetadata": false }, { - "$id": "433", + "$id": "453", "kind": "property", "name": "innerProp2", "serializedName": "innerProp2", "type": { - "$id": "434", + "$id": "454", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5007,12 +5361,12 @@ }, "properties": [ { - "$id": "435", + "$id": "455", "kind": "property", "name": "middleProp1", "serializedName": "middleProp1", "type": { - "$id": "436", + "$id": "456", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5032,12 +5386,12 @@ "isHttpMetadata": false }, { - "$id": "437", + "$id": "457", "kind": "property", "name": "middleProp2", "serializedName": "middleProp2", "type": { - "$ref": "336" + "$ref": "355" }, "optional": false, "readOnly": false, @@ -5056,12 +5410,12 @@ }, "properties": [ { - "$id": "438", + "$id": "458", "kind": "property", "name": "prop1", "serializedName": "prop1", "type": { - "$ref": "257" + "$ref": "276" }, "optional": false, "readOnly": false, @@ -5077,12 +5431,12 @@ "isHttpMetadata": false }, { - "$id": "439", + "$id": "459", "kind": "property", "name": "prop2", "serializedName": "prop2", "type": { - "$id": "440", + "$id": "460", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5109,7 +5463,7 @@ "flatten": true, "decorators": [ { - "name": "Azure.ClientGenerator.Core.@flattenProperty", + "name": "Azure.ResourceManager.@flattenProperty", "arguments": {} } ], @@ -5120,26 +5474,84 @@ } }, "isHttpMetadata": false + }, + { + "$id": "461", + "kind": "property", + "name": "optionalFlattenProperty", + "serializedName": "optionalFlattenProperty", + "type": { + "$id": "462", + "kind": "model", + "name": "optionalFlattenPropertyType", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.optionalFlattenPropertyType", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "463", + "kind": "property", + "name": "randomCollectionProp", + "serializedName": "randomCollectionProp", + "type": { + "$ref": "276" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.optionalFlattenPropertyType.randomCollectionProp", + "serializationOptions": { + "json": { + "name": "randomCollectionProp" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsResource.optionalFlattenProperty", + "serializationOptions": { + "json": { + "name": "optionalFlattenProperty" + } + }, + "isHttpMetadata": false } ] }, { - "$ref": "416" + "$ref": "436" }, { - "$ref": "423" + "$ref": "443" }, { - "$ref": "428" + "$ref": "448" }, { - "$ref": "429" + "$ref": "449" }, { - "$ref": "430" + "$ref": "450" }, { - "$id": "441", + "$ref": "462" + }, + { + "$id": "464", "kind": "model", "name": "BarQuotaResource", "namespace": "MgmtTypeSpec", @@ -5147,6 +5559,10 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -5162,7 +5578,7 @@ "resourceType": "MgmtTypeSpec/foos/bars/quotas", "methods": [ { - "$id": "442", + "$id": "465", "methodId": "MgmtTypeSpec.BarQuotaOperations.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", @@ -5170,7 +5586,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}" }, { - "$id": "443", + "$id": "466", "methodId": "MgmtTypeSpec.BarQuotaOperations.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", @@ -5185,17 +5601,17 @@ } ], "baseModel": { - "$ref": "228" + "$ref": "247" }, "properties": [ { - "$id": "444", + "$id": "467", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$ref": "423" + "$ref": "443" }, "optional": true, "readOnly": false, @@ -5211,7 +5627,7 @@ "isHttpMetadata": false }, { - "$id": "445", + "$id": "468", "kind": "property", "name": "name", "serializedName": "name", @@ -5235,7 +5651,7 @@ ] }, { - "$id": "446", + "$id": "469", "kind": "model", "name": "Baz", "namespace": "MgmtTypeSpec", @@ -5243,6 +5659,10 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -5254,7 +5674,7 @@ "resourceType": "MgmtTypeSpec/bazs", "methods": [ { - "$id": "447", + "$id": "470", "methodId": "MgmtTypeSpec.Bazs.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -5262,7 +5682,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "448", + "$id": "471", "methodId": "MgmtTypeSpec.Bazs.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -5270,7 +5690,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "449", + "$id": "472", "methodId": "MgmtTypeSpec.Bazs.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -5278,7 +5698,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "450", + "$id": "473", "methodId": "MgmtTypeSpec.Bazs.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -5286,14 +5706,14 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "451", + "$id": "474", "methodId": "MgmtTypeSpec.Bazs.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs", "operationScope": "ResourceGroup" }, { - "$id": "452", + "$id": "475", "methodId": "MgmtTypeSpec.Bazs.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/bazs", @@ -5306,32 +5726,37 @@ } ], "baseModel": { - "$ref": "334" + "$ref": "353" }, "properties": [ { - "$id": "453", + "$id": "476", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "454", + "$id": "477", "kind": "model", "name": "BazProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.BazProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "455", + "$id": "478", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "456", + "$id": "479", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5351,13 +5776,13 @@ "isHttpMetadata": false }, { - "$id": "457", + "$id": "480", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "458", + "$id": "481", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -5392,13 +5817,13 @@ "isHttpMetadata": false }, { - "$id": "459", + "$id": "482", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Baz", "type": { - "$id": "460", + "$id": "483", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5420,30 +5845,35 @@ ] }, { - "$ref": "454" + "$ref": "477" }, { - "$id": "461", + "$id": "484", "kind": "model", "name": "BazListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", "usage": "Output,Json", "doc": "The response of a Baz list operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "462", + "$id": "485", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Baz items on this page", "type": { - "$id": "463", + "$id": "486", "kind": "array", "name": "ArrayBaz", "valueType": { - "$ref": "446" + "$ref": "469" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -5462,18 +5892,18 @@ "isHttpMetadata": false }, { - "$id": "464", + "$id": "487", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "465", + "$id": "488", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "466", + "$id": "489", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -5497,7 +5927,7 @@ ] }, { - "$id": "467", + "$id": "490", "kind": "model", "name": "Zoo", "namespace": "MgmtTypeSpec", @@ -5505,6 +5935,10 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -5516,7 +5950,7 @@ "resourceType": "MgmtTypeSpec/zoos", "methods": [ { - "$id": "468", + "$id": "491", "methodId": "MgmtTypeSpec.Zoos.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -5524,7 +5958,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "469", + "$id": "492", "methodId": "MgmtTypeSpec.Zoos.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -5532,7 +5966,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "470", + "$id": "493", "methodId": "MgmtTypeSpec.Zoos.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -5540,7 +5974,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "471", + "$id": "494", "methodId": "MgmtTypeSpec.Zoos.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -5548,21 +5982,21 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "472", + "$id": "495", "methodId": "MgmtTypeSpec.Zoos.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos", "operationScope": "ResourceGroup" }, { - "$id": "473", + "$id": "496", "methodId": "MgmtTypeSpec.Zoos.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/zoos", "operationScope": "Subscription" }, { - "$id": "474", + "$id": "497", "methodId": "MgmtTypeSpec.Zoos.zooAddressList", "kind": "Action", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}/zooAddressList", @@ -5570,7 +6004,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "475", + "$id": "498", "methodId": "MgmtTypeSpec.Zoos.recommend", "kind": "Action", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}/recommend", @@ -5584,23 +6018,27 @@ } ], "baseModel": { - "$ref": "334" + "$ref": "353" }, "properties": [ { - "$id": "476", + "$id": "499", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "477", + "$id": "500", "kind": "model", "name": "ZooProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.ZooProperties", "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ClientGenerator.Core.@useSystemTextJsonConverter", "arguments": { @@ -5610,13 +6048,13 @@ ], "properties": [ { - "$id": "478", + "$id": "501", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "479", + "$id": "502", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5651,13 +6089,13 @@ "isHttpMetadata": false }, { - "$id": "480", + "$id": "503", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Zoo", "type": { - "$id": "481", + "$id": "504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5677,12 +6115,12 @@ "isHttpMetadata": true }, { - "$id": "482", + "$id": "505", "kind": "property", "name": "extendedLocation", "serializedName": "extendedLocation", "type": { - "$ref": "356" + "$ref": "376" }, "optional": true, "readOnly": false, @@ -5700,26 +6138,31 @@ ] }, { - "$ref": "477" + "$ref": "500" }, { - "$id": "483", + "$id": "506", "kind": "model", "name": "ZooUpdate", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", "usage": "Input,Json", "doc": "The type used for update operations of the Zoo.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "484", + "$id": "507", "kind": "property", "name": "tags", "serializedName": "tags", "doc": "Resource tags.", "type": { - "$ref": "336" + "$ref": "355" }, "optional": true, "readOnly": false, @@ -5735,29 +6178,34 @@ "isHttpMetadata": false }, { - "$id": "485", + "$id": "508", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "486", + "$id": "509", "kind": "model", "name": "ZooUpdateProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "usage": "Input,Json", "doc": "The updatable properties of the Zoo.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "487", + "$id": "510", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "488", + "$id": "511", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5794,30 +6242,35 @@ ] }, { - "$ref": "486" + "$ref": "509" }, { - "$id": "489", + "$id": "512", "kind": "model", "name": "ZooListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", "usage": "Output,Json", "doc": "The response of a Zoo list operation.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "490", + "$id": "513", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Zoo items on this page", "type": { - "$id": "491", + "$id": "514", "kind": "array", "name": "ArrayZoo", "valueType": { - "$ref": "467" + "$ref": "490" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -5836,18 +6289,18 @@ "isHttpMetadata": false }, { - "$id": "492", + "$id": "515", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "493", + "$id": "516", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "494", + "$id": "517", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -5871,33 +6324,43 @@ ] }, { - "$id": "495", + "$id": "518", "kind": "model", "name": "ZooAddressListListResult", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.ZooAddressListListResult", "usage": "Output,Json", "doc": "Paged collection of ZooAddress items", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "496", + "$id": "519", "kind": "property", "name": "value", "serializedName": "value", "doc": "The ZooAddress items on this page", "type": { - "$id": "497", + "$id": "520", "kind": "array", "name": "ArraySubResource", "valueType": { - "$id": "498", + "$id": "521", "kind": "model", "name": "SubResource", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.Models.SubResource", "usage": "Output,Json", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [] }, "crossLanguageDefinitionId": "TypeSpec.Array", @@ -5917,18 +6380,18 @@ "isHttpMetadata": false }, { - "$id": "499", + "$id": "522", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "500", + "$id": "523", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "501", + "$id": "524", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -5952,10 +6415,10 @@ ] }, { - "$ref": "498" + "$ref": "521" }, { - "$id": "502", + "$id": "525", "kind": "model", "name": "EndpointResource", "namespace": "MgmtTypeSpec", @@ -5963,6 +6426,10 @@ "usage": "Input,Output,Json", "doc": "Concrete extension resource types can be created by aliasing this type using a specific property type.", "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, { "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": {} @@ -5974,7 +6441,7 @@ "resourceType": "MgmtTypeSpec/endpoints", "methods": [ { - "$id": "503", + "$id": "526", "methodId": "MgmtTypeSpec.EndpointResources.get", "kind": "Get", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -5982,7 +6449,7 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" }, { - "$id": "504", + "$id": "527", "methodId": "MgmtTypeSpec.EndpointResources.createOrUpdate", "kind": "Create", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -5990,7 +6457,7 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" }, { - "$id": "505", + "$id": "528", "methodId": "MgmtTypeSpec.EndpointResources.update", "kind": "Update", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -5998,7 +6465,7 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" }, { - "$id": "506", + "$id": "529", "methodId": "MgmtTypeSpec.EndpointResources.delete", "kind": "Delete", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -6006,48 +6473,58 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" } ], - "resourceScope": "ResourceGroup", + "resourceScope": "Tenant", "resourceName": "EndpointResource" } } ], "baseModel": { - "$id": "507", + "$id": "530", "kind": "model", "name": "ExtensionResource", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ExtensionResource", "usage": "Input,Output,Json", "doc": "The base extension resource.", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "baseModel": { - "$ref": "229" + "$ref": "248" }, "properties": [] }, "properties": [ { - "$id": "508", + "$id": "531", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "509", + "$id": "532", "kind": "model", "name": "EndpointProperties", "namespace": "MgmtTypeSpec", "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointProperties", "usage": "Input,Output,Json", - "decorators": [], + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], "properties": [ { - "$id": "510", + "$id": "533", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "511", + "$id": "534", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6082,13 +6559,13 @@ "isHttpMetadata": false }, { - "$id": "512", + "$id": "535", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the EndpointResource", "type": { - "$id": "513", + "$id": "536", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6110,454 +6587,3058 @@ ] }, { - "$ref": "509" + "$ref": "532" }, { - "$ref": "507" + "$ref": "530" }, { - "$id": "514", + "$id": "537", "kind": "model", - "name": "ZooRecommendation", + "name": "SelfHelpResource", "namespace": "MgmtTypeSpec", - "crossLanguageDefinitionId": "MgmtTypeSpec.ZooRecommendation", + "crossLanguageDefinitionId": "MgmtTypeSpec.SelfHelpResource", "usage": "Output,Json", - "decorators": [], + "doc": "Concrete extension resource types can be created by aliasing this type using a specific property type.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", + "arguments": {} + }, + { + "name": "Azure.ClientGenerator.Core.@resourceSchema", + "arguments": { + "resourceIdPattern": "/{scope}/providers/MgmtTypeSpec/selfHelps/{selfHelpName}", + "resourceType": "MgmtTypeSpec/selfHelps", + "methods": [ + { + "$id": "538", + "methodId": "MgmtTypeSpec.SolutionResources.get", + "kind": "Get", + "operationPath": "/{scope}/providers/MgmtTypeSpec/selfHelps/{selfHelpName}", + "operationScope": "Tenant", + "resourceScope": "/{scope}/providers/MgmtTypeSpec/selfHelps/{selfHelpName}" + } + ], + "resourceScope": "Tenant", + "resourceName": "SelfHelpResource" + } + } + ], + "baseModel": { + "$ref": "530" + }, "properties": [ { - "$id": "515", + "$id": "539", "kind": "property", - "name": "recommendedValue", - "serializedName": "recommendedValue", - "doc": "The recommended value", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", "type": { - "$id": "516", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$id": "540", + "kind": "model", + "name": "SelfHelpResourceProperties", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.SelfHelpResourceProperties", + "usage": "Output,Json", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "541", + "kind": "property", + "name": "selfHelpId", + "serializedName": "selfHelpId", + "type": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.SelfHelpResourceProperties.selfHelpId", + "serializationOptions": { + "json": { + "name": "selfHelpId" + } + }, + "isHttpMetadata": false + } + ] }, - "optional": false, + "optional": true, "readOnly": false, "discriminator": false, "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.ZooRecommendation.recommendedValue", + "crossLanguageDefinitionId": "MgmtTypeSpec.SelfHelpResource.properties", "serializationOptions": { "json": { - "name": "recommendedValue" + "name": "properties" } }, "isHttpMetadata": false }, { - "$id": "517", + "$id": "543", "kind": "property", - "name": "reason", - "serializedName": "reason", - "doc": "The reason for the recommendation", + "name": "name", + "serializedName": "name", + "doc": "The name of the SelfHelpResource", "type": { - "$id": "518", + "$id": "544", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "optional": false, - "readOnly": false, + "readOnly": true, "discriminator": false, "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.ZooRecommendation.reason", + "crossLanguageDefinitionId": "MgmtTypeSpec.SelfHelpResource.name", "serializationOptions": { "json": { - "name": "reason" + "name": "name" } }, - "isHttpMetadata": false + "isHttpMetadata": true } ] - } - ], - "clients": [ + }, { - "$id": "519", - "kind": "client", - "name": "MgmtTypeSpecClient", + "$ref": "540" + }, + { + "$id": "545", + "kind": "model", + "name": "PlaywrightQuota", "namespace": "MgmtTypeSpec", - "methods": [ + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuota", + "usage": "Output,Json", + "doc": "Subscription-level location-based Playwright quota resource.", + "decorators": [ { - "$id": "520", - "kind": "basic", - "name": "previewActions", - "accessibility": "public", - "apiVersions": [ - "2024-05-01" - ], - "doc": "Runs the input conditions against input object metadata properties and designates matched objects in response.", - "operation": { - "$id": "521", - "name": "previewActions", - "resourceName": "MgmtTypeSpec", - "doc": "Runs the input conditions against input object metadata properties and designates matched objects in response.", - "accessibility": "public", - "parameters": [ + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", + "arguments": {} + }, + { + "name": "TypeSpec.Rest.@parentResource", + "arguments": {} + }, + { + "name": "Azure.ClientGenerator.Core.@resourceSchema", + "arguments": { + "resourceIdPattern": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}", + "resourceType": "MgmtTypeSpec/locations/playwrightQuotas", + "methods": [ { - "$id": "522", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", + "$id": "546", + "methodId": "MgmtTypeSpec.PlaywrightQuotas.get", + "kind": "Get", + "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}", + "operationScope": "Subscription", + "resourceScope": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}" + }, + { + "$id": "547", + "methodId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription", + "kind": "List", + "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas", + "operationScope": "Subscription" + } + ], + "resourceScope": "Subscription", + "resourceName": "PlaywrightQuota" + } + } + ], + "baseModel": { + "$ref": "247" + }, + "properties": [ + { + "$id": "548", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "549", + "kind": "model", + "name": "PlaywrightQuotaProperties", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotaProperties", + "usage": "Output,Json", + "doc": "Subscription-level location-based Playwright quota resource properties.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "550", + "kind": "property", + "name": "freeTrial", + "serializedName": "freeTrial", + "doc": "The subscription-level location-based Playwright quota resource free-trial properties.", "type": { - "$id": "523", + "$id": "551", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "524", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2024-05-01" - }, - "optional": false, - "scope": "Client", + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.apiVersion", - "readOnly": false + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotaProperties.freeTrial", + "serializationOptions": { + "json": { + "name": "freeTrial" + } + }, + "isHttpMetadata": false }, { - "$id": "525", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", + "$id": "552", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last resource operation.", "type": { - "$id": "526", + "$id": "553", "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "527", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.subscriptionId" - }, - { - "$id": "528", - "kind": "path", - "name": "location", - "serializedName": "location", - "type": { - "$id": "529", - "kind": "string", - "name": "azureLocation", - "crossLanguageDefinitionId": "Azure.Core.azureLocation", - "baseType": { - "$id": "530", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.location" - }, - { - "$id": "531", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "36" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.contentType" - }, - { - "$id": "532", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "38" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.accept" - }, - { - "$id": "533", - "kind": "body", - "name": "body", - "serializedName": "body", - "doc": "The request body", - "type": { - "$ref": "178" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.body" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "178" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotaProperties.provisioningState", + "serializationOptions": { + "json": { + "name": "provisioningState" + } }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] + "isHttpMetadata": false } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/previewActions", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions", - "decorators": [] + ] }, - "parameters": [ - { - "$id": "534", - "kind": "method", - "name": "location", - "serializedName": "location", - "type": { - "$id": "535", - "kind": "string", - "name": "azureLocation", - "crossLanguageDefinitionId": "Azure.Core.azureLocation", - "baseType": { - "$id": "536", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.location", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "537", - "kind": "method", - "name": "body", - "serializedName": "body", - "doc": "The request body", - "type": { - "$ref": "178" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.body", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "538", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "36" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "539", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "38" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "178" + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuota.properties", + "serializationOptions": { + "json": { + "name": "properties" } }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions" - } - ], - "parameters": [ + "isHttpMetadata": false + }, { - "$id": "540", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", + "$id": "554", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the PlaywrightQuota", "type": { - "$id": "541", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" + "$ref": "33" }, - "isApiVersion": false, "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuota.name", + "serializationOptions": { + "json": { + "name": "name" + } }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" + "isHttpMetadata": true } - ], + ] + }, + { + "$ref": "549" + }, + { + "$id": "555", + "kind": "model", + "name": "PlaywrightQuotaListResult", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PlaywrightQuota list operation.", "decorators": [ { "name": "Azure.ResourceManager.@armProviderNamespace", "arguments": {} - }, - { - "name": "Azure.ClientGenerator.Core.@nonResourceMethodSchema", - "arguments": { - "nonResourceMethods": [ - { - "methodId": "MgmtTypeSpec.previewActions", - "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/previewActions", - "operationScope": "Subscription" - }, - { - "methodId": "Azure.ResourceManager.Operations.list", - "operationPath": "/providers/MgmtTypeSpec/operations", - "operationScope": "Tenant" - } - ] - } } ], - "crossLanguageDefinitionId": "MgmtTypeSpec", - "apiVersions": [ - "2024-05-01" - ], - "children": [ + "properties": [ { - "$id": "543", + "$id": "556", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PlaywrightQuota items on this page", + "type": { + "$id": "557", + "kind": "array", + "name": "ArrayPlaywrightQuota", + "valueType": { + "$ref": "545" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "json": { + "name": "value" + } + }, + "isHttpMetadata": false + }, + { + "$id": "558", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "559", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "560", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "json": { + "name": "nextLink" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "561", + "kind": "model", + "name": "JobResource", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResource", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", + "arguments": {} + }, + { + "name": "Azure.ClientGenerator.Core.@resourceSchema", + "arguments": { + "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", + "resourceType": "MgmtTypeSpec/jobs", + "methods": [ + { + "$id": "562", + "methodId": "MgmtTypeSpec.JobResources.get", + "kind": "Get", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}" + }, + { + "$id": "563", + "methodId": "MgmtTypeSpec.JobResources.update", + "kind": "Update", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}" + } + ], + "resourceScope": "ResourceGroup", + "resourceName": "JobResource" + } + } + ], + "baseModel": { + "$ref": "353" + }, + "properties": [ + { + "$id": "564", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "565", + "kind": "model", + "name": "JobProperties", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "566", + "kind": "property", + "name": "jobName", + "serializedName": "jobName", + "type": { + "$id": "567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.JobProperties.jobName", + "serializationOptions": { + "json": { + "name": "jobName" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResource.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + }, + { + "$id": "568", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the JobResource", + "type": { + "$id": "569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResource.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": true + } + ] + }, + { + "$ref": "565" + }, + { + "$id": "570", + "kind": "model", + "name": "JobResourceUpdateParameter", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResourceUpdateParameter", + "usage": "Input,Json", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "571", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "type": { + "$ref": "565" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResourceUpdateParameter.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + }, + { + "$id": "572", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "type": { + "$ref": "355" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResourceUpdateParameter.tags", + "serializationOptions": { + "json": { + "name": "tags" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "573", + "kind": "model", + "name": "ZooRecommendation", + "namespace": "MgmtTypeSpec", + "crossLanguageDefinitionId": "MgmtTypeSpec.ZooRecommendation", + "usage": "Output,Json", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "574", + "kind": "property", + "name": "recommendedValue", + "serializedName": "recommendedValue", + "doc": "The recommended value", + "type": { + "$id": "575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.ZooRecommendation.recommendedValue", + "serializationOptions": { + "json": { + "name": "recommendedValue" + } + }, + "isHttpMetadata": false + }, + { + "$id": "576", + "kind": "property", + "name": "reason", + "serializedName": "reason", + "doc": "The reason for the recommendation", + "type": { + "$id": "577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.ZooRecommendation.reason", + "serializationOptions": { + "json": { + "name": "reason" + } + }, + "isHttpMetadata": false + } + ] + } + ], + "clients": [ + { + "$id": "578", + "kind": "client", + "name": "MgmtTypeSpecClient", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "579", + "kind": "basic", + "name": "previewActions", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Runs the input conditions against input object metadata properties and designates matched objects in response.", + "operation": { + "$id": "580", + "name": "previewActions", + "resourceName": "MgmtTypeSpec", + "doc": "Runs the input conditions against input object metadata properties and designates matched objects in response.", + "accessibility": "public", + "parameters": [ + { + "$id": "581", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.apiVersion", + "readOnly": false + }, + { + "$id": "584", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "585", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "586", + "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.previewActions.subscriptionId" + }, + { + "$id": "587", + "kind": "path", + "name": "location", + "serializedName": "location", + "type": { + "$id": "588", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.location" + }, + { + "$id": "590", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "39" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.contentType" + }, + { + "$id": "591", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "41" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.accept" + }, + { + "$id": "592", + "kind": "body", + "name": "body", + "serializedName": "body", + "doc": "The request body", + "type": { + "$ref": "197" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.body" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "197" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/previewActions", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions", + "decorators": [] + }, + "parameters": [ + { + "$id": "593", + "kind": "method", + "name": "location", + "serializedName": "location", + "type": { + "$id": "594", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.location", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "596", + "kind": "method", + "name": "body", + "serializedName": "body", + "doc": "The request body", + "type": { + "$ref": "197" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.body", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "597", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "39" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "598", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "41" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "197" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions" + } + ], + "parameters": [ + { + "$id": "599", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "600", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "601", + "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.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ClientGenerator.Core.@nonResourceMethodSchema", + "arguments": { + "nonResourceMethods": [ + { + "methodId": "MgmtTypeSpec.previewActions", + "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/previewActions", + "operationScope": "Subscription" + }, + { + "methodId": "Azure.ResourceManager.Operations.list", + "operationPath": "/providers/MgmtTypeSpec/operations", + "operationScope": "Tenant" + } + ] + } + } + ], + "crossLanguageDefinitionId": "MgmtTypeSpec", + "apiVersions": [ + "2024-05-01" + ], + "children": [ + { + "$id": "602", + "kind": "client", + "name": "Operations", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "603", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "604", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "605", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list.apiVersion", + "readOnly": false + }, + { + "$id": "608", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "43" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "220" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/MgmtTypeSpec/operations", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [] + }, + "parameters": [ + { + "$id": "609", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "43" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "222" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "610", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "611", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" + } + ], + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Operations", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "613", + "kind": "client", + "name": "PrivateLinks", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "614", + "kind": "paging", + "name": "GetAllPrivateLinkResources", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "list private links on the given resource", + "operation": { + "$id": "615", + "name": "GetAllPrivateLinkResources", + "resourceName": "PrivateLink", + "doc": "list private links on the given resource", + "accessibility": "public", + "parameters": [ + { + "$id": "616", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.apiVersion", + "readOnly": false + }, + { + "$id": "619", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "620", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "621", + "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.PrivateLinks.listByMongoCluster.subscriptionId" + }, + { + "$id": "622", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "623", + "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.PrivateLinks.listByMongoCluster.resourceGroupName" + }, + { + "$id": "624", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "45" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "243" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/privateLinkResources", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "625", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "627", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "45" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "245" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "628", + "kind": "lro", + "name": "start", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Starts the SAP Application Server Instance.", + "operation": { + "$id": "629", + "name": "start", + "resourceName": "PrivateLinks", + "doc": "Starts the SAP Application Server Instance.", + "accessibility": "public", + "parameters": [ + { + "$id": "630", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.apiVersion", + "readOnly": false + }, + { + "$id": "633", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "634", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "635", + "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.PrivateLinks.start.subscriptionId" + }, + { + "$id": "636", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "637", + "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.PrivateLinks.start.resourceGroupName" + }, + { + "$id": "638", + "kind": "path", + "name": "privateLinkResourceName", + "serializedName": "privateLinkResourceName", + "doc": "The name of the private link associated with the Azure resource.", + "type": { + "$id": "639", + "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.PrivateLinks.start.privateLinkResourceName" + }, + { + "$id": "640", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "47" + }, + "isApiVersion": false, + "optional": true, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.contentType" + }, + { + "$id": "641", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "49" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.accept" + }, + { + "$id": "642", + "kind": "body", + "name": "body", + "serializedName": "body", + "doc": "SAP Application server instance start request body.", + "type": { + "$ref": "306" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": true, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.start.Parameter.body.anonymous.body" + } + ], + "responses": [ + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "644", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "309" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/privateLinkResources/{privateLinkResourceName}/start", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceAction", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "645", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "647", + "kind": "method", + "name": "privateLinkResourceName", + "serializedName": "privateLinkResourceName", + "doc": "The name of the private link associated with the Azure resource.", + "type": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.privateLinkResourceName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "649", + "kind": "method", + "name": "body", + "serializedName": "body", + "doc": "The content of the action request", + "type": { + "$ref": "304" + }, + "location": "", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.body", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "650", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "51" + }, + "location": "Header", + "isApiVersion": false, + "optional": true, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "651", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "53" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "309" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "309" + } + } + } + } + ], + "parameters": [ + { + "$id": "652", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "653", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "654", + "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.PrivateLinks", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "655", "kind": "client", - "name": "Operations", + "name": "Foos", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "544", + "$id": "656", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Create a Foo", + "operation": { + "$id": "657", + "name": "createOrUpdate", + "resourceName": "Foo", + "doc": "Create a Foo", + "accessibility": "public", + "parameters": [ + { + "$id": "658", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.apiVersion", + "readOnly": false + }, + { + "$id": "661", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "662", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "663", + "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.Foos.createOrUpdate.subscriptionId" + }, + { + "$id": "664", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "665", + "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.Foos.createOrUpdate.resourceGroupName" + }, + { + "$id": "666", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "667", + "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.Foos.createOrUpdate.fooName" + }, + { + "$id": "668", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "55" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.contentType" + }, + { + "$id": "669", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "57" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.accept" + }, + { + "$id": "670", + "kind": "body", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "346" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resource" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "346" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "346" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "672", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "673", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "675", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "677", + "kind": "method", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "346" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "678", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "59" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "679", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "61" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "346" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "346" + } + } + } + }, + { + "$id": "680", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Get a Foo", + "operation": { + "$id": "681", + "name": "get", + "resourceName": "Foo", + "doc": "Get a Foo", + "accessibility": "public", + "parameters": [ + { + "$id": "682", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.apiVersion", + "readOnly": false + }, + { + "$id": "685", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "686", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "687", + "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.Foos.get.subscriptionId" + }, + { + "$id": "688", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "689", + "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.Foos.get.resourceGroupName" + }, + { + "$id": "690", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "691", + "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.Foos.get.fooName" + }, + { + "$id": "692", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "63" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "346" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceRead", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "693", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "695", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "697", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "63" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "346" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get" + }, + { + "$id": "698", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Delete a Foo", + "operation": { + "$id": "699", + "name": "delete", + "resourceName": "Foo", + "doc": "Delete a Foo", + "accessibility": "public", + "parameters": [ + { + "$id": "700", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.apiVersion", + "readOnly": false + }, + { + "$id": "703", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "704", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "705", + "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.Foos.delete.subscriptionId" + }, + { + "$id": "706", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "707", + "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.Foos.delete.resourceGroupName" + }, + { + "$id": "708", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "709", + "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.Foos.delete.fooName" + } + ], + "responses": [ + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "711", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceDelete", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "712", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "714", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "716", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Update a Foo", + "operation": { + "$id": "717", + "name": "update", + "resourceName": "Foo", + "doc": "Update a Foo", + "accessibility": "public", + "parameters": [ + { + "$id": "718", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.apiVersion", + "readOnly": false + }, + { + "$id": "721", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "722", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "723", + "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.Foos.update.subscriptionId" + }, + { + "$id": "724", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "725", + "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.Foos.update.resourceGroupName" + }, + { + "$id": "726", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "727", + "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.Foos.update.fooName" + }, + { + "$id": "728", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "65" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.contentType" + }, + { + "$id": "729", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "67" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.accept" + }, + { + "$id": "730", + "kind": "body", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "346" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.properties" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "346" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "732", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceUpdate", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "733", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "735", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "737", + "kind": "method", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "346" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.properties", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "738", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "69" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "739", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "71" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "346" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "346" + } + } + } + }, + { + "$id": "740", "kind": "paging", "name": "list", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List the operations for the provider", + "doc": "List Foo resources by resource group", "operation": { - "$id": "545", + "$id": "741", "name": "list", - "resourceName": "Operations", - "doc": "List the operations for the provider", + "resourceName": "Foo", + "doc": "List Foo resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "546", + "$id": "742", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "547", + "$id": "743", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6567,7 +9648,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "548", + "$id": "744", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6577,16 +9658,71 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.apiVersion", "readOnly": false }, { - "$id": "549", + "$id": "745", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "746", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "747", + "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.Foos.list.subscriptionId" + }, + { + "$id": "748", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "749", + "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.Foos.list.resourceGroupName" + }, + { + "$id": "750", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "40" + "$ref": "73" }, "isApiVersion": false, "optional": false, @@ -6594,7 +9730,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.accept" } ], "responses": [ @@ -6603,7 +9739,7 @@ 200 ], "bodyType": { - "$ref": "201" + "$ref": "380" }, "headers": [], "isErrorResponse": false, @@ -6614,27 +9750,54 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/providers/MgmtTypeSpec/operations", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", - "decorators": [] + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ] }, "parameters": [ { - "$id": "550", + "$id": "751", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "753", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "40" + "$ref": "73" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.accept", "readOnly": false, "access": "public", "decorators": [] @@ -6642,7 +9805,7 @@ ], "response": { "type": { - "$ref": "203" + "$ref": "382" }, "resultSegments": [ "value" @@ -6651,7 +9814,7 @@ "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list", "pagingMetadata": { "itemPropertySegments": [ "value" @@ -6663,79 +9826,31 @@ "responseLocation": "Body" } } - } - ], - "parameters": [ - { - "$id": "551", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "552", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "553", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" - } - ], - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Operations", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "554", - "kind": "client", - "name": "PrivateLinks", - "namespace": "MgmtTypeSpec", - "methods": [ + }, { - "$id": "555", + "$id": "754", "kind": "paging", - "name": "GetAllPrivateLinkResources", + "name": "listBySubscription", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "list private links on the given resource", + "doc": "List Foo resources by subscription ID", "operation": { - "$id": "556", - "name": "GetAllPrivateLinkResources", - "resourceName": "PrivateLink", - "doc": "list private links on the given resource", + "$id": "755", + "name": "listBySubscription", + "resourceName": "Foo", + "doc": "List Foo resources by subscription ID", "accessibility": "public", "parameters": [ { - "$id": "557", + "$id": "756", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "558", + "$id": "757", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6745,7 +9860,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "559", + "$id": "758", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6755,22 +9870,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.apiVersion", "readOnly": false }, { - "$id": "560", + "$id": "759", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "561", + "$id": "760", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "562", + "$id": "761", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6787,39 +9902,15 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.subscriptionId" - }, - { - "$id": "563", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "564", - "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.PrivateLinks.listByMongoCluster.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.subscriptionId" }, { - "$id": "565", + "$id": "762", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "42" + "$ref": "75" }, "isApiVersion": false, "optional": false, @@ -6827,7 +9918,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.accept" } ], "responses": [ @@ -6836,7 +9927,7 @@ 200 ], "bodyType": { - "$ref": "224" + "$ref": "380" }, "headers": [], "isErrorResponse": false, @@ -6847,11 +9938,11 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/privateLinkResources", + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/foos", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription", "decorators": [ { "name": "Azure.ResourceManager.@armResourceList", @@ -6861,40 +9952,18 @@ }, "parameters": [ { - "$id": "566", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "567", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "568", + "$id": "763", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "42" + "$ref": "75" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.accept", "readOnly": false, "access": "public", "decorators": [] @@ -6902,7 +9971,7 @@ ], "response": { "type": { - "$ref": "226" + "$ref": "382" }, "resultSegments": [ "value" @@ -6911,7 +9980,7 @@ "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster", + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription", "pagingMetadata": { "itemPropertySegments": [ "value" @@ -6923,31 +9992,84 @@ "responseLocation": "Body" } } - }, + } + ], + "parameters": [ + { + "$id": "764", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "765", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" + } + ], + "decorators": [ { - "$id": "569", - "kind": "lro", - "name": "start", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "MgmtTypeSpec.Foos", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "767", + "kind": "client", + "name": "FooSettingsOperations", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "768", + "kind": "basic", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Starts the SAP Application Server Instance.", + "doc": "Get a FooSettings", "operation": { - "$id": "570", - "name": "start", - "resourceName": "PrivateLinks", - "doc": "Starts the SAP Application Server Instance.", + "$id": "769", + "name": "get", + "resourceName": "FooSettings", + "doc": "Get a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "571", + "$id": "770", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "572", + "$id": "771", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6957,7 +10079,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "573", + "$id": "772", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6967,22 +10089,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.apiVersion", "readOnly": false }, { - "$id": "574", + "$id": "773", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "575", + "$id": "774", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "576", + "$id": "775", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6999,40 +10121,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.subscriptionId" }, { - "$id": "577", + "$id": "776", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "578", - "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.PrivateLinks.start.resourceGroupName" - }, - { - "$id": "579", - "kind": "path", - "name": "privateLinkResourceName", - "serializedName": "privateLinkResourceName", - "doc": "The name of the private link associated with the Azure resource.", - "type": { - "$id": "580", + "$id": "777", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7047,32 +10145,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.privateLinkResourceName" - }, - { - "$id": "581", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "44" - }, - "isApiVersion": false, - "optional": true, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.resourceGroupName" }, { - "$id": "582", + "$id": "778", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "46" + "$ref": "77" }, "isApiVersion": false, "optional": false, @@ -7080,68 +10161,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.accept" - }, - { - "$id": "583", - "kind": "body", - "name": "body", - "serializedName": "body", - "doc": "SAP Application server instance start request body.", - "type": { - "$ref": "287" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": true, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.start.Parameter.body.anonymous.body" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.accept" } ], "responses": [ - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "584", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "585", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, { "statusCodes": [ 200 ], "bodyType": { - "$ref": "290" + "$ref": "386" }, "headers": [], "isErrorResponse": false, @@ -7150,54 +10179,29 @@ ] } ], - "httpMethod": "POST", + "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/privateLinkResources/{privateLinkResourceName}/start", - "requestMediaTypes": [ - "application/json" - ], + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceAction", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "586", + "$id": "779", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "587", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "588", - "kind": "method", - "name": "privateLinkResourceName", - "serializedName": "privateLinkResourceName", - "doc": "The name of the private link associated with the Azure resource.", - "type": { - "$id": "589", + "$id": "780", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7207,163 +10211,63 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.privateLinkResourceName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "590", - "kind": "method", - "name": "body", - "serializedName": "body", - "doc": "The content of the action request", - "type": { - "$ref": "285" - }, - "location": "", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.body", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "591", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "48" - }, - "location": "Header", - "isApiVersion": false, - "optional": true, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "592", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "50" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "290" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "290" - } - } - } - } - ], - "parameters": [ - { - "$id": "593", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "594", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "595", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] }, - "value": "https://management.azure.com" + { + "$id": "781", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "77" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "386" + } }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" - } - ], - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceOperations", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "596", - "kind": "client", - "name": "Foos", - "namespace": "MgmtTypeSpec", - "methods": [ + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get" + }, { - "$id": "597", - "kind": "lro", + "$id": "782", + "kind": "basic", "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create a Foo", + "doc": "Create a FooSettings", "operation": { - "$id": "598", + "$id": "783", "name": "createOrUpdate", - "resourceName": "Foo", - "doc": "Create a Foo", + "resourceName": "FooSettings", + "doc": "Create a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "599", + "$id": "784", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "600", + "$id": "785", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7373,7 +10277,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "601", + "$id": "786", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7383,22 +10287,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "602", + "$id": "787", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "603", + "$id": "788", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "604", + "$id": "789", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7415,40 +10319,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.subscriptionId" }, { - "$id": "605", + "$id": "790", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "606", - "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.Foos.createOrUpdate.resourceGroupName" - }, - { - "$id": "607", - "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "608", + "$id": "791", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7463,16 +10343,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resourceGroupName" }, { - "$id": "609", + "$id": "792", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "52" + "$ref": "79" }, "isApiVersion": false, "optional": false, @@ -7480,15 +10360,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.contentType" }, { - "$id": "610", + "$id": "793", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "54" + "$ref": "81" }, "isApiVersion": false, "optional": false, @@ -7496,16 +10376,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.accept" }, { - "$id": "611", + "$id": "794", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "327" + "$ref": "386" }, "isApiVersion": false, "contentTypes": [ @@ -7516,7 +10396,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resource" } ], "responses": [ @@ -7525,7 +10405,7 @@ 200 ], "bodyType": { - "$ref": "327" + "$ref": "386" }, "headers": [], "isErrorResponse": false, @@ -7538,34 +10418,9 @@ 201 ], "bodyType": { - "$ref": "327" + "$ref": "386" }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "613", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], + "headers": [], "isErrorResponse": false, "contentTypes": [ "application/json" @@ -7574,14 +10429,14 @@ ], "httpMethod": "PUT", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate", "decorators": [ { "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", @@ -7591,35 +10446,13 @@ }, "parameters": [ { - "$id": "614", + "$id": "795", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "615", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "616", - "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "617", + "$id": "796", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7629,60 +10462,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "618", + "$id": "797", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "327" + "$ref": "386" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resource", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resource", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "619", + "$id": "798", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "56" + "$ref": "79" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "620", + "$id": "799", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "58" + "$ref": "81" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.accept", "readOnly": false, "access": "public", "decorators": [] @@ -7690,49 +10523,38 @@ ], "response": { "type": { - "$ref": "327" + "$ref": "386" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "327" - } - } - } + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate" }, { - "$id": "621", + "$id": "800", "kind": "basic", - "name": "get", + "name": "update", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Get a Foo", + "doc": "Update a FooSettings", "operation": { - "$id": "622", - "name": "get", - "resourceName": "Foo", - "doc": "Get a Foo", + "$id": "801", + "name": "update", + "resourceName": "FooSettings", + "doc": "Update a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "623", + "$id": "802", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "624", + "$id": "803", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7742,7 +10564,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "625", + "$id": "804", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7752,22 +10574,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.apiVersion", "readOnly": false }, { - "$id": "626", + "$id": "805", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "627", + "$id": "806", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "628", + "$id": "807", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7784,16 +10606,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.subscriptionId" }, { - "$id": "629", + "$id": "808", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "630", + "$id": "809", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7808,39 +10630,32 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.resourceGroupName" }, { - "$id": "631", - "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "$id": "810", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "83" }, "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, "optional": false, - "scope": "Method", - "decorators": [], + "isContentType": true, + "scope": "Constant", "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.fooName" + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.contentType" }, { - "$id": "633", + "$id": "811", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "60" + "$ref": "85" }, "isApiVersion": false, "optional": false, @@ -7848,7 +10663,27 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.accept" + }, + { + "$id": "812", + "kind": "body", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "401" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.properties" } ], "responses": [ @@ -7857,7 +10692,7 @@ 200 ], "bodyType": { - "$ref": "327" + "$ref": "386" }, "headers": [], "isErrorResponse": false, @@ -7866,29 +10701,32 @@ ] } ], - "httpMethod": "GET", + "httpMethod": "PATCH", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", + "requestMediaTypes": [ + "application/json" + ], "bufferResponse": true, "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get", + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceRead", + "name": "Azure.ResourceManager.@armResourceUpdate", "arguments": {} } ] }, "parameters": [ { - "$id": "634", + "$id": "813", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "635", + "$id": "814", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7898,46 +10736,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "636", + "$id": "815", "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", "type": { - "$id": "637", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "401" }, - "location": "Path", + "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.properties", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "816", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "83" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "638", + "$id": "817", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "60" + "$ref": "85" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.accept", "readOnly": false, "access": "public", "decorators": [] @@ -7945,38 +10797,38 @@ ], "response": { "type": { - "$ref": "327" + "$ref": "386" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update" }, { - "$id": "639", - "kind": "lro", + "$id": "818", + "kind": "basic", "name": "delete", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Delete a Foo", + "doc": "Delete a FooSettings", "operation": { - "$id": "640", + "$id": "819", "name": "delete", - "resourceName": "Foo", - "doc": "Delete a Foo", + "resourceName": "FooSettings", + "doc": "Delete a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "641", + "$id": "820", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "642", + "$id": "821", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7986,7 +10838,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "643", + "$id": "822", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7996,22 +10848,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.apiVersion", "readOnly": false }, { - "$id": "644", + "$id": "823", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "645", + "$id": "824", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "646", + "$id": "825", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8028,40 +10880,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.subscriptionId" }, { - "$id": "647", + "$id": "826", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "648", - "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.Foos.delete.resourceGroupName" - }, - { - "$id": "649", - "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "650", + "$id": "827", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8076,40 +10904,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.resourceGroupName" } ], "responses": [ { "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "651", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "652", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } + 200 ], + "headers": [], "isErrorResponse": false }, { @@ -8122,11 +10925,11 @@ ], "httpMethod": "DELETE", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete", "decorators": [ { "name": "Azure.ResourceManager.@armResourceDelete", @@ -8136,35 +10939,13 @@ }, "parameters": [ { - "$id": "653", + "$id": "828", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "654", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "655", - "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "656", + "$id": "829", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8174,7 +10955,7 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] @@ -8184,40 +10965,85 @@ "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 204 - ] - } - } - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete" + } + ], + "parameters": [ + { + "$id": "830", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "831", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "832", + "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.FooSettingsOperations", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "833", + "kind": "client", + "name": "Bars", + "namespace": "MgmtTypeSpec", + "methods": [ { - "$id": "657", + "$id": "834", "kind": "lro", - "name": "update", + "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Update a Foo", + "doc": "Create a Bar", "operation": { - "$id": "658", - "name": "update", - "resourceName": "Foo", - "doc": "Update a Foo", + "$id": "835", + "name": "createOrUpdate", + "resourceName": "Bar", + "doc": "Create a Bar", "accessibility": "public", "parameters": [ { - "$id": "659", + "$id": "836", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "660", + "$id": "837", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8227,7 +11053,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "661", + "$id": "838", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8237,22 +11063,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "662", + "$id": "839", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "663", + "$id": "840", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "664", + "$id": "841", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8269,16 +11095,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.subscriptionId" }, { - "$id": "665", + "$id": "842", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "666", + "$id": "843", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8293,16 +11119,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resourceGroupName" }, { - "$id": "667", + "$id": "844", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "668", + "$id": "845", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8317,16 +11143,40 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.fooName" }, { - "$id": "669", + "$id": "846", + "kind": "path", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "847", + "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.Bars.createOrUpdate.barName" + }, + { + "$id": "848", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "62" + "$ref": "87" }, "isApiVersion": false, "optional": false, @@ -8334,15 +11184,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.contentType" }, { - "$id": "670", + "$id": "849", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "64" + "$ref": "89" }, "isApiVersion": false, "optional": false, @@ -8350,16 +11200,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.accept" }, { - "$id": "671", + "$id": "850", "kind": "body", - "name": "properties", - "serializedName": "properties", - "doc": "The resource properties to be updated.", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", "type": { - "$ref": "327" + "$ref": "406" }, "isApiVersion": false, "contentTypes": [ @@ -8370,7 +11220,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.properties" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resource" } ], "responses": [ @@ -8379,7 +11229,7 @@ 200 ], "bodyType": { - "$ref": "327" + "$ref": "406" }, "headers": [], "isErrorResponse": false, @@ -8389,15 +11239,18 @@ }, { "statusCodes": [ - 202 + 201 ], + "bodyType": { + "$ref": "406" + }, "headers": [ { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", "type": { - "$id": "672", + "$id": "851", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8409,7 +11262,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "673", + "$id": "852", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8417,35 +11270,38 @@ } } ], - "isErrorResponse": false + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] } ], - "httpMethod": "PATCH", + "httpMethod": "PUT", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, - "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update", + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceUpdate", + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", "arguments": {} } ] }, "parameters": [ { - "$id": "674", + "$id": "853", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "675", + "$id": "854", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8455,19 +11311,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "676", + "$id": "855", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "677", + "$id": "856", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8477,60 +11333,82 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.fooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "678", + "$id": "857", "kind": "method", - "name": "properties", - "serializedName": "properties", - "doc": "The resource properties to be updated.", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.barName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "859", + "kind": "method", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", "type": { - "$ref": "327" + "$ref": "406" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.properties", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resource", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "679", + "$id": "860", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "66" + "$ref": "91" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "680", + "$id": "861", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "68" + "$ref": "93" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.accept", "readOnly": false, "access": "public", "decorators": [] @@ -8538,49 +11416,49 @@ ], "response": { "type": { - "$ref": "327" + "$ref": "406" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.update", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate", "lroMetadata": { - "finalStateVia": 1, + "finalStateVia": 0, "finalResponse": { "statusCodes": [ 200 ], "bodyType": { - "$ref": "327" + "$ref": "406" } } } }, { - "$id": "681", - "kind": "paging", - "name": "list", + "$id": "862", + "kind": "lro", + "name": "delete", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List Foo resources by resource group", + "doc": "Delete a Bar", "operation": { - "$id": "682", - "name": "list", - "resourceName": "Foo", - "doc": "List Foo resources by resource group", + "$id": "863", + "name": "delete", + "resourceName": "Bar", + "doc": "Delete a Bar", "accessibility": "public", "parameters": [ { - "$id": "683", + "$id": "864", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "684", + "$id": "865", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8590,7 +11468,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "685", + "$id": "866", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8600,22 +11478,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.apiVersion", "readOnly": false }, { - "$id": "686", + "$id": "867", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "687", + "$id": "868", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "688", + "$id": "869", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8632,16 +11510,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.subscriptionId" }, { - "$id": "689", + "$id": "870", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "690", + "$id": "871", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8656,362 +11534,218 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.resourceGroupName" - }, - { - "$id": "691", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "70" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "360" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceList", - "arguments": {} - } - ] - }, - "parameters": [ - { - "$id": "692", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "694", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "70" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.resourceGroupName" }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "362" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - } - } - }, - { - "$id": "695", - "kind": "paging", - "name": "listBySubscription", - "accessibility": "public", - "apiVersions": [ - "2024-05-01" - ], - "doc": "List Foo resources by subscription ID", - "operation": { - "$id": "696", - "name": "listBySubscription", - "resourceName": "Foo", - "doc": "List Foo resources by subscription ID", - "accessibility": "public", - "parameters": [ { - "$id": "697", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", + "$id": "872", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", "type": { - "$id": "698", + "$id": "873", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "699", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2024-05-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.apiVersion", - "readOnly": false - }, - { - "$id": "700", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "701", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "702", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, "isApiVersion": false, "explode": false, "style": "simple", "allowReserved": false, "skipUrlEncoding": false, "optional": false, - "scope": "Client", + "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.fooName" }, { - "$id": "703", - "kind": "header", - "name": "accept", - "serializedName": "Accept", + "$id": "874", + "kind": "path", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", "type": { - "$ref": "72" + "$id": "875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.accept" + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.barName" } ], "responses": [ { "statusCodes": [ - 200 + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "877", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 ], - "bodyType": { - "$ref": "360" - }, "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] + "isErrorResponse": false } ], - "httpMethod": "GET", + "httpMethod": "DELETE", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/foos", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceList", + "name": "Azure.ResourceManager.@armResourceDelete", "arguments": {} } ] }, "parameters": [ { - "$id": "704", + "$id": "878", "kind": "method", - "name": "accept", - "serializedName": "Accept", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "880", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", "type": { - "$ref": "72" + "$id": "881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "location": "Header", + "location": "Path", "isApiVersion": false, "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.accept", + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "882", + "kind": "method", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.barName", "readOnly": false, "access": "public", "decorators": [] } ], - "response": { - "type": { - "$ref": "362" - }, - "resultSegments": [ - "value" - ] - }, + "response": {}, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 204 + ] } } - } - ], - "parameters": [ - { - "$id": "705", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "706", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "707", - "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.Foos", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "708", - "kind": "client", - "name": "FooSettingsOperations", - "namespace": "MgmtTypeSpec", - "methods": [ + }, { - "$id": "709", - "kind": "basic", - "name": "get", + "$id": "884", + "kind": "paging", + "name": "list", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Get a FooSettings", + "doc": "List Bar resources by Foo", "operation": { - "$id": "710", - "name": "get", - "resourceName": "FooSettings", - "doc": "Get a FooSettings", + "$id": "885", + "name": "list", + "resourceName": "Bar", + "doc": "List Bar resources by Foo", "accessibility": "public", "parameters": [ { - "$id": "711", + "$id": "886", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "712", + "$id": "887", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9021,7 +11755,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "713", + "$id": "888", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9031,22 +11765,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.apiVersion", "readOnly": false }, { - "$id": "714", + "$id": "889", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "715", + "$id": "890", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "716", + "$id": "891", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9063,16 +11797,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.subscriptionId" }, { - "$id": "717", + "$id": "892", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "718", + "$id": "893", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9087,15 +11821,39 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.resourceGroupName" + }, + { + "$id": "894", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "895", + "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.Bars.list.fooName" }, { - "$id": "719", + "$id": "896", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "74" + "$ref": "95" }, "isApiVersion": false, "optional": false, @@ -9103,7 +11861,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.accept" } ], "responses": [ @@ -9112,7 +11870,7 @@ 200 ], "bodyType": { - "$ref": "366" + "$ref": "426" }, "headers": [], "isErrorResponse": false, @@ -9123,27 +11881,49 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceRead", + "name": "Azure.ResourceManager.@armResourceList", "arguments": {} } ] }, "parameters": [ { - "$id": "720", + "$id": "897", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "899", "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", "type": { - "$id": "721", + "$id": "900", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9153,24 +11933,24 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.fooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "722", + "$id": "901", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "74" + "$ref": "95" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.accept", "readOnly": false, "access": "public", "decorators": [] @@ -9178,38 +11958,105 @@ ], "response": { "type": { - "$ref": "366" - } + "$ref": "428" + }, + "resultSegments": [ + "value" + ] }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get" - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ { - "$id": "723", - "kind": "basic", + "$id": "902", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "903", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "904", + "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.Bars", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "905", + "kind": "client", + "name": "BarSettingsOperations", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "906", + "kind": "lro", "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create a FooSettings", + "doc": "Create a BarSettingsResource", "operation": { - "$id": "724", + "$id": "907", "name": "createOrUpdate", - "resourceName": "FooSettings", - "doc": "Create a FooSettings", + "resourceName": "BarSettingsResource", + "doc": "Create a BarSettingsResource", "accessibility": "public", "parameters": [ { - "$id": "725", + "$id": "908", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "726", + "$id": "909", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9219,7 +12066,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "727", + "$id": "910", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9229,22 +12076,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "728", + "$id": "911", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "729", + "$id": "912", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "730", + "$id": "913", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9261,16 +12108,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.subscriptionId" }, { - "$id": "731", + "$id": "914", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "732", + "$id": "915", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9285,16 +12132,64 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resourceGroupName" + }, + { + "$id": "916", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "917", + "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.BarSettingsOperations.createOrUpdate.fooName" + }, + { + "$id": "918", + "kind": "path", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "919", + "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.BarSettingsOperations.createOrUpdate.barName" }, { - "$id": "733", + "$id": "920", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "76" + "$ref": "97" }, "isApiVersion": false, "optional": false, @@ -9302,15 +12197,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.contentType" }, { - "$id": "734", + "$id": "921", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "78" + "$ref": "99" }, "isApiVersion": false, "optional": false, @@ -9318,16 +12213,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.accept" }, { - "$id": "735", + "$id": "922", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "366" + "$ref": "432" }, "isApiVersion": false, "contentTypes": [ @@ -9338,7 +12233,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resource" } ], "responses": [ @@ -9347,7 +12242,7 @@ 200 ], "bodyType": { - "$ref": "366" + "$ref": "432" }, "headers": [], "isErrorResponse": false, @@ -9360,9 +12255,34 @@ 201 ], "bodyType": { - "$ref": "366" + "$ref": "432" }, - "headers": [], + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "924", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], "isErrorResponse": false, "contentTypes": [ "application/json" @@ -9371,14 +12291,14 @@ ], "httpMethod": "PUT", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate", "decorators": [ { "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", @@ -9388,13 +12308,13 @@ }, "parameters": [ { - "$id": "736", + "$id": "925", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "737", + "$id": "926", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9404,60 +12324,104 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "738", + "$id": "927", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "929", + "kind": "method", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.barName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "931", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "366" + "$ref": "432" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resource", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resource", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "739", + "$id": "932", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "76" + "$ref": "101" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "740", + "$id": "933", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "78" + "$ref": "103" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.accept", "readOnly": false, "access": "public", "decorators": [] @@ -9465,38 +12429,49 @@ ], "response": { "type": { - "$ref": "366" + "$ref": "432" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "432" + } + } + } }, { - "$id": "741", + "$id": "934", "kind": "basic", - "name": "update", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Update a FooSettings", + "doc": "Get a BarSettingsResource", "operation": { - "$id": "742", - "name": "update", - "resourceName": "FooSettings", - "doc": "Update a FooSettings", + "$id": "935", + "name": "get", + "resourceName": "BarSettingsResource", + "doc": "Get a BarSettingsResource", "accessibility": "public", "parameters": [ { - "$id": "743", + "$id": "936", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "744", + "$id": "937", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9506,7 +12481,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "745", + "$id": "938", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9516,22 +12491,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.apiVersion", "readOnly": false }, { - "$id": "746", + "$id": "939", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "747", + "$id": "940", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "748", + "$id": "941", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9548,16 +12523,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.subscriptionId" }, { - "$id": "749", + "$id": "942", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "750", + "$id": "943", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9572,60 +12547,71 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.resourceGroupName" }, { - "$id": "751", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", + "$id": "944", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", "type": { - "$ref": "80" + "$id": "945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.contentType" + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.fooName" }, { - "$id": "752", - "kind": "header", - "name": "accept", - "serializedName": "Accept", + "$id": "946", + "kind": "path", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", "type": { - "$ref": "82" + "$id": "947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.accept" + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.barName" }, { - "$id": "753", - "kind": "body", - "name": "properties", - "serializedName": "properties", - "doc": "The resource properties to be updated.", + "$id": "948", + "kind": "header", + "name": "accept", + "serializedName": "Accept", "type": { - "$ref": "381" + "$ref": "105" }, "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", "optional": false, - "scope": "Method", - "decorators": [], + "isContentType": false, + "scope": "Constant", "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.properties" + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.accept" } ], "responses": [ @@ -9634,7 +12620,7 @@ 200 ], "bodyType": { - "$ref": "366" + "$ref": "432" }, "headers": [], "isErrorResponse": false, @@ -9643,32 +12629,29 @@ ] } ], - "httpMethod": "PATCH", + "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", - "requestMediaTypes": [ - "application/json" - ], + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", "bufferResponse": true, "generateProtocolMethod": true, - "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update", + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceUpdate", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "754", + "$id": "949", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "755", + "$id": "950", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9678,60 +12661,68 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "756", + "$id": "951", "kind": "method", - "name": "properties", - "serializedName": "properties", - "doc": "The resource properties to be updated.", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", "type": { - "$ref": "381" + "$id": "952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "location": "Body", + "location": "Path", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.properties", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.fooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "757", + "$id": "953", "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", "type": { - "$ref": "80" + "$id": "954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "location": "Header", + "location": "Path", "isApiVersion": false, "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.contentType", + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.barName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "758", + "$id": "955", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "82" + "$ref": "105" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -9739,38 +12730,91 @@ ], "response": { "type": { - "$ref": "366" + "$ref": "432" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update" - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get" + } + ], + "parameters": [ + { + "$id": "956", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "957", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" + } + ], + "decorators": [ { - "$id": "759", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "959", + "kind": "client", + "name": "BarQuotaOperations", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "960", "kind": "basic", - "name": "delete", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Delete a FooSettings", + "doc": "Get a BarQuotaResource", "operation": { - "$id": "760", - "name": "delete", - "resourceName": "FooSettings", - "doc": "Delete a FooSettings", + "$id": "961", + "name": "get", + "resourceName": "BarQuotaResource", + "doc": "Get a BarQuotaResource", "accessibility": "public", "parameters": [ { - "$id": "761", + "$id": "962", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "762", + "$id": "963", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9780,7 +12824,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "763", + "$id": "964", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9788,29 +12832,101 @@ "value": "2024-05-01" }, "optional": false, - "scope": "Client", + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.apiVersion", + "readOnly": false + }, + { + "$id": "965", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "966", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "967", + "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.BarQuotaOperations.get.subscriptionId" + }, + { + "$id": "968", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "969", + "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.BarQuotaOperations.get.resourceGroupName" + }, + { + "$id": "970", + "kind": "path", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.apiVersion", - "readOnly": false + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.fooName" }, { - "$id": "764", + "$id": "972", "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", "type": { - "$id": "765", + "$id": "973", "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "766", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "isApiVersion": false, @@ -9819,23 +12935,19 @@ "allowReserved": false, "skipUrlEncoding": false, "optional": false, - "scope": "Client", + "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barName" }, { - "$id": "767", + "$id": "974", "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "barQuotaResourceName", + "serializedName": "barQuotaResourceName", + "doc": "The name of the BarQuotaResource", "type": { - "$id": "768", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "30" }, "isApiVersion": false, "explode": false, @@ -9846,7 +12958,23 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barQuotaResourceName" + }, + { + "$id": "975", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "107" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.accept" } ], "responses": [ @@ -9854,40 +12982,39 @@ "statusCodes": [ 200 ], + "bodyType": { + "$ref": "464" + }, "headers": [], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] } ], - "httpMethod": "DELETE", + "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceDelete", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "769", + "$id": "976", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "770", + "$id": "977", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9897,95 +13024,125 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "978", + "kind": "method", + "name": "fooName", + "serializedName": "fooName", + "doc": "The name of the Foo", + "type": { + "$id": "979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.fooName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "980", + "kind": "method", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "982", + "kind": "method", + "name": "barQuotaResourceName", + "serializedName": "barQuotaResourceName", + "doc": "The name of the BarQuotaResource", + "type": { + "$ref": "30" + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barQuotaResourceName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "983", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "107" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.accept", "readOnly": false, "access": "public", "decorators": [] } ], - "response": {}, + "response": { + "type": { + "$ref": "464" + } + }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete" - } - ], - "parameters": [ - { - "$id": "771", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "772", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "773", - "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.FooSettingsOperations", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "774", - "kind": "client", - "name": "Bars", - "namespace": "MgmtTypeSpec", - "methods": [ + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get" + }, { - "$id": "775", + "$id": "984", "kind": "lro", - "name": "createOrUpdate", + "name": "update", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create a Bar", + "doc": "Update a BarQuotaResource", "operation": { - "$id": "776", - "name": "createOrUpdate", - "resourceName": "Bar", - "doc": "Create a Bar", + "$id": "985", + "name": "update", + "resourceName": "BarQuotaResource", + "doc": "Update a BarQuotaResource", "accessibility": "public", "parameters": [ { - "$id": "777", + "$id": "986", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "778", + "$id": "987", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9995,7 +13152,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "779", + "$id": "988", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10005,22 +13162,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.apiVersion", "readOnly": false }, { - "$id": "780", + "$id": "989", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "781", + "$id": "990", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "782", + "$id": "991", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10037,16 +13194,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.subscriptionId" }, { - "$id": "783", + "$id": "992", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "784", + "$id": "993", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10061,16 +13218,40 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.resourceGroupName" }, { - "$id": "785", + "$id": "994", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "786", + "$id": "995", + "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.BarQuotaOperations.update.fooName" + }, + { + "$id": "996", + "kind": "path", + "name": "barName", + "serializedName": "barName", + "doc": "The name of the Bar", + "type": { + "$id": "997", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10085,20 +13266,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barName" }, { - "$id": "787", + "$id": "998", "kind": "path", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "name": "barQuotaResourceName", + "serializedName": "barQuotaResourceName", + "doc": "The name of the BarQuotaResource", "type": { - "$id": "788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "30" }, "isApiVersion": false, "explode": false, @@ -10109,16 +13286,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.barName" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barQuotaResourceName" }, { - "$id": "789", + "$id": "999", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "84" + "$ref": "109" }, "isApiVersion": false, "optional": false, @@ -10126,15 +13303,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.contentType" }, { - "$id": "790", + "$id": "1000", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "86" + "$ref": "111" }, "isApiVersion": false, "optional": false, @@ -10142,16 +13319,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.accept" }, { - "$id": "791", + "$id": "1001", "kind": "body", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", "type": { - "$ref": "386" + "$ref": "464" }, "isApiVersion": false, "contentTypes": [ @@ -10162,7 +13339,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.properties" } ], "responses": [ @@ -10171,7 +13348,7 @@ 200 ], "bodyType": { - "$ref": "386" + "$ref": "464" }, "headers": [], "isErrorResponse": false, @@ -10181,18 +13358,15 @@ }, { "statusCodes": [ - 201 + 202 ], - "bodyType": { - "$ref": "386" - }, "headers": [ { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "792", + "$id": "1002", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10204,7 +13378,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "793", + "$id": "1003", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10212,38 +13386,35 @@ } } ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] + "isErrorResponse": false } ], - "httpMethod": "PUT", + "httpMethod": "PATCH", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate", + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "name": "Azure.ResourceManager.@armResourceUpdate", "arguments": {} } ] }, "parameters": [ { - "$id": "794", + "$id": "1004", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "795", + "$id": "1005", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10253,19 +13424,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "796", + "$id": "1006", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "797", + "$id": "1007", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10275,19 +13446,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.fooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "798", + "$id": "1008", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "799", + "$id": "1009", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10297,60 +13468,78 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.barName", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "800", + "$id": "1010", "kind": "method", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", + "name": "barQuotaResourceName", + "serializedName": "barQuotaResourceName", + "doc": "The name of the BarQuotaResource", "type": { - "$ref": "386" + "$ref": "30" + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barQuotaResourceName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1011", + "kind": "method", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "464" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resource", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.properties", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "801", + "$id": "1012", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "88" + "$ref": "113" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "802", + "$id": "1013", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "90" + "$ref": "115" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.accept", "readOnly": false, "access": "public", "decorators": [] @@ -10358,49 +13547,102 @@ ], "response": { "type": { - "$ref": "386" + "$ref": "464" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update", "lroMetadata": { - "finalStateVia": 0, + "finalStateVia": 1, "finalResponse": { "statusCodes": [ 200 ], "bodyType": { - "$ref": "386" + "$ref": "464" } } } - }, + } + ], + "parameters": [ + { + "$id": "1014", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1015", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1016", + "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.BarQuotaOperations", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "1017", + "kind": "client", + "name": "Bazs", + "namespace": "MgmtTypeSpec", + "methods": [ { - "$id": "803", + "$id": "1018", "kind": "lro", - "name": "delete", + "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Delete a Bar", + "doc": "Create a Baz", "operation": { - "$id": "804", - "name": "delete", - "resourceName": "Bar", - "doc": "Delete a Bar", + "$id": "1019", + "name": "createOrUpdate", + "resourceName": "Baz", + "doc": "Create a Baz", "accessibility": "public", "parameters": [ { - "$id": "805", + "$id": "1020", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "806", + "$id": "1021", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10410,7 +13652,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "807", + "$id": "1022", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10420,22 +13662,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "808", + "$id": "1023", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "809", + "$id": "1024", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "810", + "$id": "1025", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10452,16 +13694,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.subscriptionId" }, { - "$id": "811", + "$id": "1026", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "812", + "$id": "1027", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10476,16 +13718,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resourceGroupName" }, { - "$id": "813", + "$id": "1028", "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "814", + "$id": "1029", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10500,45 +13742,90 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.bazName" }, { - "$id": "815", - "kind": "path", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "$id": "1030", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "816", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "117" }, "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.contentType" + }, + { + "$id": "1031", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "119" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.accept" + }, + { + "$id": "1032", + "kind": "body", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "469" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", "optional": false, "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.barName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resource" } ], "responses": [ { "statusCodes": [ - 202 + 200 + ], + "bodyType": { + "$ref": "469" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 201 ], + "bodyType": { + "$ref": "469" + }, "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", "type": { - "$id": "817", + "$id": "1033", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10550,7 +13837,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "818", + "$id": "1034", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10558,39 +13845,38 @@ } } ], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] } ], - "httpMethod": "DELETE", + "httpMethod": "PUT", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", + "requestMediaTypes": [ + "application/json" + ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceDelete", + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", "arguments": {} } ] }, "parameters": [ { - "$id": "819", + "$id": "1035", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "820", + "$id": "1036", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10600,19 +13886,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "821", + "$id": "1037", "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "822", + "$id": "1038", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10622,72 +13908,110 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.bazName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "823", + "$id": "1039", "kind": "method", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", "type": { - "$id": "824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "469" }, - "location": "Path", + "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.barName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1040", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "121" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1041", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "123" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.accept", "readOnly": false, "access": "public", "decorators": [] } ], - "response": {}, + "response": { + "type": { + "$ref": "469" + } + }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate", "lroMetadata": { - "finalStateVia": 1, + "finalStateVia": 0, "finalResponse": { "statusCodes": [ - 204 - ] + 200 + ], + "bodyType": { + "$ref": "469" + } } } }, { - "$id": "825", - "kind": "paging", - "name": "list", + "$id": "1042", + "kind": "basic", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List Bar resources by Foo", + "doc": "Get a Baz", "operation": { - "$id": "826", - "name": "list", - "resourceName": "Bar", - "doc": "List Bar resources by Foo", + "$id": "1043", + "name": "get", + "resourceName": "Baz", + "doc": "Get a Baz", "accessibility": "public", "parameters": [ { - "$id": "827", + "$id": "1044", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "828", + "$id": "1045", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10697,7 +14021,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "829", + "$id": "1046", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10707,22 +14031,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.apiVersion", "readOnly": false }, { - "$id": "830", + "$id": "1047", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "831", + "$id": "1048", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "832", + "$id": "1049", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10739,16 +14063,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.subscriptionId" }, { - "$id": "833", + "$id": "1050", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "834", + "$id": "1051", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10763,16 +14087,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.resourceGroupName" }, { - "$id": "835", + "$id": "1052", "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "836", + "$id": "1053", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10787,15 +14111,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.bazName" }, { - "$id": "837", + "$id": "1054", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "92" + "$ref": "125" }, "isApiVersion": false, "optional": false, @@ -10803,7 +14127,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.accept" } ], "responses": [ @@ -10812,7 +14136,7 @@ 200 ], "bodyType": { - "$ref": "406" + "$ref": "469" }, "headers": [], "isErrorResponse": false, @@ -10823,27 +14147,27 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceList", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "838", + "$id": "1055", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "839", + "$id": "1056", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10853,19 +14177,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "840", + "$id": "1057", "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "841", + "$id": "1058", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10875,24 +14199,24 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.bazName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "842", + "$id": "1059", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "92" + "$ref": "125" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -10900,105 +14224,38 @@ ], "response": { "type": { - "$ref": "408" - }, - "resultSegments": [ - "value" - ] + "$ref": "469" + } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - } - } - } - ], - "parameters": [ - { - "$id": "843", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "844", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "845", - "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.Bars", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "846", - "kind": "client", - "name": "BarSettingsOperations", - "namespace": "MgmtTypeSpec", - "methods": [ + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get" + }, { - "$id": "847", + "$id": "1060", "kind": "lro", - "name": "createOrUpdate", + "name": "delete", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create a BarSettingsResource", + "doc": "Delete a Baz", "operation": { - "$id": "848", - "name": "createOrUpdate", - "resourceName": "BarSettingsResource", - "doc": "Create a BarSettingsResource", + "$id": "1061", + "name": "delete", + "resourceName": "Baz", + "doc": "Delete a Baz", "accessibility": "public", "parameters": [ { - "$id": "849", + "$id": "1062", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "850", + "$id": "1063", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11008,7 +14265,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "851", + "$id": "1064", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11018,22 +14275,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.apiVersion", "readOnly": false }, { - "$id": "852", + "$id": "1065", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "853", + "$id": "1066", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "854", + "$id": "1067", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11050,40 +14307,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.subscriptionId" - }, - { - "$id": "855", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "856", - "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.BarSettingsOperations.createOrUpdate.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.subscriptionId" }, { - "$id": "857", + "$id": "1068", "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "858", + "$id": "1069", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11098,16 +14331,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.resourceGroupName" }, { - "$id": "859", + "$id": "1070", "kind": "path", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "860", + "$id": "1071", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11122,90 +14355,21 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.barName" - }, - { - "$id": "861", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "94" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.contentType" - }, - { - "$id": "862", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "96" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.accept" - }, - { - "$id": "863", - "kind": "body", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", - "type": { - "$ref": "412" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.bazName" } ], "responses": [ { "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "412" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - { - "statusCodes": [ - 201 + 202 ], - "bodyType": { - "$ref": "412" - }, "headers": [ { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "864", + "$id": "1072", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11217,7 +14381,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "865", + "$id": "1073", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -11225,60 +14389,39 @@ } } ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false } ], - "httpMethod": "PUT", + "httpMethod": "DELETE", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", - "requestMediaTypes": [ - "application/json" - ], + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "name": "Azure.ResourceManager.@armResourceDelete", "arguments": {} } ] }, "parameters": [ { - "$id": "866", + "$id": "1074", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "867", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "868", - "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "869", + "$id": "1075", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11288,19 +14431,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "870", + "$id": "1076", "kind": "method", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "871", + "$id": "1077", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11310,110 +14453,50 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.barName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "872", - "kind": "method", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", - "type": { - "$ref": "412" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resource", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "873", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "98" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "874", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "100" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.bazName", "readOnly": false, "access": "public", "decorators": [] } ], - "response": { - "type": { - "$ref": "412" - } - }, + "response": {}, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete", "lroMetadata": { - "finalStateVia": 0, + "finalStateVia": 1, "finalResponse": { "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "412" - } + 204 + ] } } }, { - "$id": "875", - "kind": "basic", - "name": "get", + "$id": "1078", + "kind": "lro", + "name": "update", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Get a BarSettingsResource", + "doc": "Update a Baz", "operation": { - "$id": "876", - "name": "get", - "resourceName": "BarSettingsResource", - "doc": "Get a BarSettingsResource", + "$id": "1079", + "name": "update", + "resourceName": "Baz", + "doc": "Update a Baz", "accessibility": "public", "parameters": [ { - "$id": "877", + "$id": "1080", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "878", + "$id": "1081", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11423,7 +14506,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "879", + "$id": "1082", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11433,22 +14516,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.apiVersion", "readOnly": false }, { - "$id": "880", + "$id": "1083", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "881", + "$id": "1084", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "882", + "$id": "1085", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11465,16 +14548,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.subscriptionId" }, { - "$id": "883", + "$id": "1086", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "884", + "$id": "1087", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11489,16 +14572,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.resourceGroupName" }, { - "$id": "885", + "$id": "1088", "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "886", + "$id": "1089", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11513,39 +14596,32 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.bazName" }, { - "$id": "887", - "kind": "path", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "$id": "1090", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "888", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "127" }, "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, "optional": false, - "scope": "Method", - "decorators": [], + "isContentType": true, + "scope": "Constant", "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.barName" + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.contentType" }, { - "$id": "889", + "$id": "1091", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "102" + "$ref": "129" }, "isApiVersion": false, "optional": false, @@ -11553,7 +14629,27 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.accept" + }, + { + "$id": "1092", + "kind": "body", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "469" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.properties" } ], "responses": [ @@ -11562,38 +14658,73 @@ 200 ], "bodyType": { - "$ref": "412" + "$ref": "469" }, "headers": [], "isErrorResponse": false, "contentTypes": [ "application/json" ] + }, + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1094", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false } ], - "httpMethod": "GET", + "httpMethod": "PATCH", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", + "requestMediaTypes": [ + "application/json" + ], "bufferResponse": true, "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get", + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceRead", + "name": "Azure.ResourceManager.@armResourceUpdate", "arguments": {} } ] }, "parameters": [ { - "$id": "890", + "$id": "1095", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "891", + "$id": "1096", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11603,19 +14734,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "892", + "$id": "1097", "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", + "name": "bazName", + "serializedName": "bazName", + "doc": "The name of the Baz", "type": { - "$id": "893", + "$id": "1098", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11625,46 +14756,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.fooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.bazName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "894", + "$id": "1099", "kind": "method", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "name": "properties", + "serializedName": "properties", + "doc": "The resource properties to be updated.", "type": { - "$id": "895", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "469" }, - "location": "Path", + "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.barName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.properties", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1100", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "131" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "896", + "$id": "1101", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "102" + "$ref": "133" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.accept", "readOnly": false, "access": "public", "decorators": [] @@ -11672,91 +14817,49 @@ ], "response": { "type": { - "$ref": "412" + "$ref": "469" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get" - } - ], - "parameters": [ - { - "$id": "897", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "898", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "899", - "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.BarSettingsOperations", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "900", - "kind": "client", - "name": "BarQuotaOperations", - "namespace": "MgmtTypeSpec", - "methods": [ + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "469" + } + } + } + }, { - "$id": "901", - "kind": "basic", - "name": "get", + "$id": "1102", + "kind": "paging", + "name": "list", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Get a BarQuotaResource", + "doc": "List Baz resources by resource group", "operation": { - "$id": "902", - "name": "get", - "resourceName": "BarQuotaResource", - "doc": "Get a BarQuotaResource", + "$id": "1103", + "name": "list", + "resourceName": "Baz", + "doc": "List Baz resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "903", + "$id": "1104", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "904", + "$id": "1105", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11766,109 +14869,37 @@ "explode": false, "defaultValue": { "type": { - "$id": "905", + "$id": "1106", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "value": "2024-05-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.apiVersion", - "readOnly": false - }, - { - "$id": "906", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "907", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "908", - "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.BarQuotaOperations.get.subscriptionId" - }, - { - "$id": "909", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "910", - "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.BarQuotaOperations.get.resourceGroupName" - }, - { - "$id": "911", - "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "912", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "value": "2024-05-01" + }, "optional": false, - "scope": "Method", + "scope": "Client", "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.fooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.apiVersion", + "readOnly": false }, { - "$id": "913", + "$id": "1107", "kind": "path", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "914", + "$id": "1108", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "isApiVersion": false, @@ -11877,19 +14908,23 @@ "allowReserved": false, "skipUrlEncoding": false, "optional": false, - "scope": "Method", + "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.subscriptionId" }, { - "$id": "915", + "$id": "1110", "kind": "path", - "name": "barQuotaResourceName", - "serializedName": "barQuotaResourceName", - "doc": "The name of the BarQuotaResource", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$ref": "30" + "$id": "1111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "isApiVersion": false, "explode": false, @@ -11900,15 +14935,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barQuotaResourceName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.resourceGroupName" }, { - "$id": "916", + "$id": "1112", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "104" + "$ref": "135" }, "isApiVersion": false, "optional": false, @@ -11916,7 +14951,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.accept" } ], "responses": [ @@ -11925,7 +14960,7 @@ 200 ], "bodyType": { - "$ref": "441" + "$ref": "484" }, "headers": [], "isErrorResponse": false, @@ -11936,71 +14971,27 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceRead", + "name": "Azure.ResourceManager.@armResourceList", "arguments": {} } ] }, "parameters": [ { - "$id": "917", + "$id": "1113", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "918", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "919", - "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "920", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.fooName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "921", - "kind": "method", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", - "type": { - "$id": "922", + "$id": "1114", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12010,42 +15001,24 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "923", - "kind": "method", - "name": "barQuotaResourceName", - "serializedName": "barQuotaResourceName", - "doc": "The name of the BarQuotaResource", - "type": { - "$ref": "30" - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barQuotaResourceName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "924", + "$id": "1115", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "104" + "$ref": "135" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.accept", "readOnly": false, "access": "public", "decorators": [] @@ -12053,38 +15026,52 @@ ], "response": { "type": { - "$ref": "441" - } + "$ref": "486" + }, + "resultSegments": [ + "value" + ] }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } }, { - "$id": "925", - "kind": "lro", - "name": "update", + "$id": "1116", + "kind": "paging", + "name": "listBySubscription", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Update a BarQuotaResource", + "doc": "List Baz resources by subscription ID", "operation": { - "$id": "926", - "name": "update", - "resourceName": "BarQuotaResource", - "doc": "Update a BarQuotaResource", + "$id": "1117", + "name": "listBySubscription", + "resourceName": "Baz", + "doc": "List Baz resources by subscription ID", "accessibility": "public", "parameters": [ { - "$id": "927", + "$id": "1118", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "928", + "$id": "1119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12094,7 +15081,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "929", + "$id": "1120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12104,22 +15091,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.apiVersion", "readOnly": false }, { - "$id": "930", + "$id": "1121", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "931", + "$id": "1122", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "932", + "$id": "1123", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12136,124 +15123,15 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.subscriptionId" - }, - { - "$id": "933", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "934", - "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.BarQuotaOperations.update.resourceGroupName" - }, - { - "$id": "935", - "kind": "path", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "936", - "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.BarQuotaOperations.update.fooName" - }, - { - "$id": "937", - "kind": "path", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", - "type": { - "$id": "938", - "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.BarQuotaOperations.update.barName" - }, - { - "$id": "939", - "kind": "path", - "name": "barQuotaResourceName", - "serializedName": "barQuotaResourceName", - "doc": "The name of the BarQuotaResource", - "type": { - "$ref": "30" - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barQuotaResourceName" - }, - { - "$id": "940", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "106" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.subscriptionId" }, { - "$id": "941", + "$id": "1124", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "108" + "$ref": "137" }, "isApiVersion": false, "optional": false, @@ -12261,27 +15139,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.accept" - }, - { - "$id": "942", - "kind": "body", - "name": "properties", - "serializedName": "properties", - "doc": "The resource properties to be updated.", - "type": { - "$ref": "441" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.properties" + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.accept" } ], "responses": [ @@ -12290,198 +15148,43 @@ 200 ], "bodyType": { - "$ref": "441" + "$ref": "484" }, "headers": [], "isErrorResponse": false, "contentTypes": [ "application/json" ] - }, - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "943", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "944", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false } ], - "httpMethod": "PATCH", + "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", - "requestMediaTypes": [ - "application/json" - ], + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/bazs", "bufferResponse": true, "generateProtocolMethod": true, - "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update", + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceUpdate", + "name": "Azure.ResourceManager.@armResourceList", "arguments": {} } ] }, "parameters": [ { - "$id": "945", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "946", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "947", - "kind": "method", - "name": "fooName", - "serializedName": "fooName", - "doc": "The name of the Foo", - "type": { - "$id": "948", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.fooName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "949", - "kind": "method", - "name": "barName", - "serializedName": "barName", - "doc": "The name of the Bar", - "type": { - "$id": "950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "951", - "kind": "method", - "name": "barQuotaResourceName", - "serializedName": "barQuotaResourceName", - "doc": "The name of the BarQuotaResource", - "type": { - "$ref": "30" - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barQuotaResourceName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "952", - "kind": "method", - "name": "properties", - "serializedName": "properties", - "doc": "The resource properties to be updated.", - "type": { - "$ref": "441" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.properties", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "953", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "110" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "954", + "$id": "1125", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "112" + "$ref": "137" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.accept", "readOnly": false, "access": "public", "decorators": [] @@ -12489,35 +15192,38 @@ ], "response": { "type": { - "$ref": "441" - } + "$ref": "486" + }, + "resultSegments": [ + "value" + ] }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" ], - "bodyType": { - "$ref": "441" - } + "responseLocation": "Body" } } } ], "parameters": [ { - "$id": "955", + "$id": "1126", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "956", + "$id": "1127", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -12528,7 +15234,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "957", + "$id": "1128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12547,44 +15253,44 @@ "arguments": {} } ], - "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations", + "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs", "apiVersions": [ "2024-05-01" ], "parent": { - "$ref": "519" + "$ref": "578" } }, { - "$id": "958", + "$id": "1129", "kind": "client", - "name": "Bazs", + "name": "Zoos", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "959", + "$id": "1130", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create a Baz", + "doc": "Create a Zoo", "operation": { - "$id": "960", + "$id": "1131", "name": "createOrUpdate", - "resourceName": "Baz", - "doc": "Create a Baz", + "resourceName": "Zoo", + "doc": "Create a Zoo", "accessibility": "public", "parameters": [ { - "$id": "961", + "$id": "1132", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "962", + "$id": "1133", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12594,7 +15300,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "963", + "$id": "1134", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12604,22 +15310,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "964", + "$id": "1135", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "965", + "$id": "1136", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "966", + "$id": "1137", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12636,16 +15342,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.subscriptionId" }, { - "$id": "967", + "$id": "1138", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "968", + "$id": "1139", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12660,16 +15366,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resourceGroupName" }, { - "$id": "969", + "$id": "1140", "kind": "path", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "970", + "$id": "1141", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12684,16 +15390,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.bazName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.zooName" }, { - "$id": "971", + "$id": "1142", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "114" + "$ref": "139" }, "isApiVersion": false, "optional": false, @@ -12701,15 +15407,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.contentType" }, { - "$id": "972", + "$id": "1143", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "116" + "$ref": "141" }, "isApiVersion": false, "optional": false, @@ -12717,16 +15423,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.accept" }, { - "$id": "973", + "$id": "1144", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "446" + "$ref": "490" }, "isApiVersion": false, "contentTypes": [ @@ -12737,7 +15443,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resource" } ], "responses": [ @@ -12746,7 +15452,7 @@ 200 ], "bodyType": { - "$ref": "446" + "$ref": "490" }, "headers": [], "isErrorResponse": false, @@ -12759,7 +15465,7 @@ 201 ], "bodyType": { - "$ref": "446" + "$ref": "490" }, "headers": [ { @@ -12767,7 +15473,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "974", + "$id": "1145", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12779,7 +15485,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "975", + "$id": "1146", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -12795,14 +15501,14 @@ ], "httpMethod": "PUT", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate", "decorators": [ { "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", @@ -12812,13 +15518,13 @@ }, "parameters": [ { - "$id": "976", + "$id": "1147", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "977", + "$id": "1148", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12828,19 +15534,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "978", + "$id": "1149", "kind": "method", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "979", + "$id": "1150", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12850,60 +15556,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.bazName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.zooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "980", + "$id": "1151", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "446" + "$ref": "490" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resource", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resource", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "981", + "$id": "1152", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "118" + "$ref": "143" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "982", + "$id": "1153", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "120" + "$ref": "145" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.accept", "readOnly": false, "access": "public", "decorators": [] @@ -12911,13 +15617,13 @@ ], "response": { "type": { - "$ref": "446" + "$ref": "490" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate", "lroMetadata": { "finalStateVia": 0, "finalResponse": { @@ -12925,35 +15631,35 @@ 200 ], "bodyType": { - "$ref": "446" + "$ref": "490" } } } }, { - "$id": "983", + "$id": "1154", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Get a Baz", + "doc": "Get a Zoo", "operation": { - "$id": "984", + "$id": "1155", "name": "get", - "resourceName": "Baz", - "doc": "Get a Baz", + "resourceName": "Zoo", + "doc": "Get a Zoo", "accessibility": "public", "parameters": [ { - "$id": "985", + "$id": "1156", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "986", + "$id": "1157", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12963,7 +15669,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "987", + "$id": "1158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12973,22 +15679,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.apiVersion", "readOnly": false }, { - "$id": "988", + "$id": "1159", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "989", + "$id": "1160", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "990", + "$id": "1161", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13005,16 +15711,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.subscriptionId" }, { - "$id": "991", + "$id": "1162", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "992", + "$id": "1163", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13029,16 +15735,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.resourceGroupName" }, { - "$id": "993", + "$id": "1164", "kind": "path", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "994", + "$id": "1165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13053,15 +15759,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.bazName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.zooName" }, { - "$id": "995", + "$id": "1166", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "122" + "$ref": "147" }, "isApiVersion": false, "optional": false, @@ -13069,7 +15775,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.accept" } ], "responses": [ @@ -13078,7 +15784,7 @@ 200 ], "bodyType": { - "$ref": "446" + "$ref": "490" }, "headers": [], "isErrorResponse": false, @@ -13089,11 +15795,11 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get", "decorators": [ { "name": "Azure.ResourceManager.@armResourceRead", @@ -13103,13 +15809,13 @@ }, "parameters": [ { - "$id": "996", + "$id": "1167", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "997", + "$id": "1168", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13119,19 +15825,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "998", + "$id": "1169", "kind": "method", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "999", + "$id": "1170", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13141,24 +15847,24 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.bazName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.zooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1000", + "$id": "1171", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "122" + "$ref": "147" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -13166,38 +15872,38 @@ ], "response": { "type": { - "$ref": "446" + "$ref": "490" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get" }, { - "$id": "1001", + "$id": "1172", "kind": "lro", "name": "delete", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Delete a Baz", + "doc": "Delete a Zoo", "operation": { - "$id": "1002", + "$id": "1173", "name": "delete", - "resourceName": "Baz", - "doc": "Delete a Baz", + "resourceName": "Zoo", + "doc": "Delete a Zoo", "accessibility": "public", "parameters": [ { - "$id": "1003", + "$id": "1174", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1004", + "$id": "1175", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13207,7 +15913,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1005", + "$id": "1176", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13217,22 +15923,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.apiVersion", "readOnly": false }, { - "$id": "1006", + "$id": "1177", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1007", + "$id": "1178", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1008", + "$id": "1179", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13249,16 +15955,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.subscriptionId" }, { - "$id": "1009", + "$id": "1180", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1010", + "$id": "1181", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13273,16 +15979,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.resourceGroupName" }, { - "$id": "1011", + "$id": "1182", "kind": "path", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "1012", + "$id": "1183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13297,7 +16003,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.bazName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.zooName" } ], "responses": [ @@ -13311,7 +16017,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1013", + "$id": "1184", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13323,7 +16029,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1014", + "$id": "1185", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -13343,11 +16049,11 @@ ], "httpMethod": "DELETE", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete", "decorators": [ { "name": "Azure.ResourceManager.@armResourceDelete", @@ -13357,13 +16063,13 @@ }, "parameters": [ { - "$id": "1015", + "$id": "1186", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1016", + "$id": "1187", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13373,19 +16079,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1017", + "$id": "1188", "kind": "method", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "1018", + "$id": "1189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13395,7 +16101,7 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.bazName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.zooName", "readOnly": false, "access": "public", "decorators": [] @@ -13405,7 +16111,7 @@ "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete", "lroMetadata": { "finalStateVia": 1, "finalResponse": { @@ -13416,29 +16122,29 @@ } }, { - "$id": "1019", + "$id": "1190", "kind": "lro", "name": "update", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Update a Baz", + "doc": "Update a Zoo", "operation": { - "$id": "1020", + "$id": "1191", "name": "update", - "resourceName": "Baz", - "doc": "Update a Baz", + "resourceName": "Zoo", + "doc": "Update a Zoo", "accessibility": "public", "parameters": [ { - "$id": "1021", + "$id": "1192", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1022", + "$id": "1193", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13448,7 +16154,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1023", + "$id": "1194", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13458,22 +16164,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.apiVersion", "readOnly": false }, { - "$id": "1024", + "$id": "1195", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1025", + "$id": "1196", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1026", + "$id": "1197", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13490,16 +16196,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.subscriptionId" }, { - "$id": "1027", + "$id": "1198", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1028", + "$id": "1199", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13514,16 +16220,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.resourceGroupName" }, { - "$id": "1029", + "$id": "1200", "kind": "path", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "1030", + "$id": "1201", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13538,16 +16244,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.bazName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.zooName" }, { - "$id": "1031", + "$id": "1202", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "124" + "$ref": "149" }, "isApiVersion": false, "optional": false, @@ -13555,15 +16261,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.contentType" }, { - "$id": "1032", + "$id": "1203", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "126" + "$ref": "151" }, "isApiVersion": false, "optional": false, @@ -13571,16 +16277,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.accept" }, { - "$id": "1033", + "$id": "1204", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "446" + "$ref": "506" }, "isApiVersion": false, "contentTypes": [ @@ -13591,7 +16297,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.properties" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.properties" } ], "responses": [ @@ -13600,7 +16306,7 @@ 200 ], "bodyType": { - "$ref": "446" + "$ref": "490" }, "headers": [], "isErrorResponse": false, @@ -13618,7 +16324,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1034", + "$id": "1205", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13630,7 +16336,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1035", + "$id": "1206", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -13643,14 +16349,14 @@ ], "httpMethod": "PATCH", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update", "decorators": [ { "name": "Azure.ResourceManager.@armResourceUpdate", @@ -13660,13 +16366,13 @@ }, "parameters": [ { - "$id": "1036", + "$id": "1207", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1037", + "$id": "1208", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13676,19 +16382,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1038", + "$id": "1209", "kind": "method", - "name": "bazName", - "serializedName": "bazName", - "doc": "The name of the Baz", + "name": "zooName", + "serializedName": "zooName", + "doc": "The name of the Zoo", "type": { - "$id": "1039", + "$id": "1210", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13698,60 +16404,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.bazName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.zooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1040", + "$id": "1211", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "446" + "$ref": "506" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.properties", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.properties", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1041", + "$id": "1212", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "128" + "$ref": "153" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1042", + "$id": "1213", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "130" + "$ref": "155" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.accept", "readOnly": false, "access": "public", "decorators": [] @@ -13759,13 +16465,13 @@ ], "response": { "type": { - "$ref": "446" + "$ref": "490" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update", "lroMetadata": { "finalStateVia": 1, "finalResponse": { @@ -13773,35 +16479,35 @@ 200 ], "bodyType": { - "$ref": "446" + "$ref": "490" } } } }, { - "$id": "1043", + "$id": "1214", "kind": "paging", "name": "list", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List Baz resources by resource group", + "doc": "List Zoo resources by resource group", "operation": { - "$id": "1044", + "$id": "1215", "name": "list", - "resourceName": "Baz", - "doc": "List Baz resources by resource group", + "resourceName": "Zoo", + "doc": "List Zoo resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "1045", + "$id": "1216", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1046", + "$id": "1217", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13811,7 +16517,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1047", + "$id": "1218", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13821,22 +16527,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.apiVersion", "readOnly": false }, { - "$id": "1048", + "$id": "1219", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1049", + "$id": "1220", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1050", + "$id": "1221", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13853,16 +16559,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.subscriptionId" }, { - "$id": "1051", + "$id": "1222", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1052", + "$id": "1223", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13877,15 +16583,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.resourceGroupName" }, { - "$id": "1053", + "$id": "1224", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "132" + "$ref": "157" }, "isApiVersion": false, "optional": false, @@ -13893,7 +16599,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.accept" } ], "responses": [ @@ -13902,7 +16608,7 @@ 200 ], "bodyType": { - "$ref": "461" + "$ref": "512" }, "headers": [], "isErrorResponse": false, @@ -13913,11 +16619,11 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list", "decorators": [ { "name": "Azure.ResourceManager.@armResourceList", @@ -13927,13 +16633,13 @@ }, "parameters": [ { - "$id": "1054", + "$id": "1225", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1055", + "$id": "1226", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13943,24 +16649,24 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1056", + "$id": "1227", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "132" + "$ref": "157" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.accept", "readOnly": false, "access": "public", "decorators": [] @@ -13968,7 +16674,7 @@ ], "response": { "type": { - "$ref": "463" + "$ref": "514" }, "resultSegments": [ "value" @@ -13977,7 +16683,7 @@ "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list", "pagingMetadata": { "itemPropertySegments": [ "value" @@ -13991,29 +16697,29 @@ } }, { - "$id": "1057", + "$id": "1228", "kind": "paging", "name": "listBySubscription", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List Baz resources by subscription ID", + "doc": "List Zoo resources by subscription ID", "operation": { - "$id": "1058", + "$id": "1229", "name": "listBySubscription", - "resourceName": "Baz", - "doc": "List Baz resources by subscription ID", + "resourceName": "Zoo", + "doc": "List Zoo resources by subscription ID", "accessibility": "public", "parameters": [ { - "$id": "1059", + "$id": "1230", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1060", + "$id": "1231", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14023,7 +16729,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1061", + "$id": "1232", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14033,22 +16739,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.apiVersion", "readOnly": false }, { - "$id": "1062", + "$id": "1233", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1063", + "$id": "1234", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1064", + "$id": "1235", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14065,15 +16771,15 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.subscriptionId" }, { - "$id": "1065", + "$id": "1236", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "134" + "$ref": "159" }, "isApiVersion": false, "optional": false, @@ -14081,7 +16787,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.accept" } ], "responses": [ @@ -14090,7 +16796,7 @@ 200 ], "bodyType": { - "$ref": "461" + "$ref": "512" }, "headers": [], "isErrorResponse": false, @@ -14101,11 +16807,11 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/bazs", + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/zoos", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription", "decorators": [ { "name": "Azure.ResourceManager.@armResourceList", @@ -14115,18 +16821,18 @@ }, "parameters": [ { - "$id": "1066", + "$id": "1237", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "134" + "$ref": "159" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.accept", "readOnly": false, "access": "public", "decorators": [] @@ -14134,7 +16840,7 @@ ], "response": { "type": { - "$ref": "463" + "$ref": "514" }, "resultSegments": [ "value" @@ -14143,7 +16849,7 @@ "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription", "pagingMetadata": { "itemPropertySegments": [ "value" @@ -14154,85 +16860,32 @@ ], "responseLocation": "Body" } - } - } - ], - "parameters": [ - { - "$id": "1067", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "1068", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "1069", - "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.Bazs", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "1070", - "kind": "client", - "name": "Zoos", - "namespace": "MgmtTypeSpec", - "methods": [ + } + }, { - "$id": "1071", - "kind": "lro", - "name": "createOrUpdate", + "$id": "1238", + "kind": "basic", + "name": "zooAddressList", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create a Zoo", + "doc": "A synchronous resource action.", "operation": { - "$id": "1072", - "name": "createOrUpdate", - "resourceName": "Zoo", - "doc": "Create a Zoo", + "$id": "1239", + "name": "zooAddressList", + "resourceName": "Zoos", + "doc": "A synchronous resource action.", "accessibility": "public", "parameters": [ { - "$id": "1073", + "$id": "1240", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1074", + "$id": "1241", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14242,7 +16895,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1075", + "$id": "1242", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14252,22 +16905,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.apiVersion", "readOnly": false }, { - "$id": "1076", + "$id": "1243", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1077", + "$id": "1244", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1078", + "$id": "1245", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14284,16 +16937,16 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.subscriptionId" }, { - "$id": "1079", + "$id": "1246", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1080", + "$id": "1247", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14308,16 +16961,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.resourceGroupName" }, { - "$id": "1081", + "$id": "1248", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1082", + "$id": "1249", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14332,32 +16985,35 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.zooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.zooName" }, { - "$id": "1083", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", + "$id": "1250", + "kind": "query", + "name": "$maxpagesize", + "serializedName": "$maxpagesize", "type": { - "$ref": "136" + "$id": "1251", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] }, "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, + "explode": false, + "optional": true, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.$maxpagesize", + "readOnly": false }, { - "$id": "1084", + "$id": "1252", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "138" + "$ref": "161" }, "isApiVersion": false, "optional": false, @@ -14365,27 +17021,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.accept" - }, - { - "$id": "1085", - "kind": "body", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", - "type": { - "$ref": "467" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.accept" } ], "responses": [ @@ -14394,79 +17030,38 @@ 200 ], "bodyType": { - "$ref": "467" + "$ref": "518" }, "headers": [], "isErrorResponse": false, "contentTypes": [ "application/json" ] - }, - { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "467" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "1086", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1087", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] } ], - "httpMethod": "PUT", + "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", - "requestMediaTypes": [ - "application/json" - ], + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}/zooAddressList", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "name": "Azure.ResourceManager.@armResourceAction", "arguments": {} } ] }, "parameters": [ { - "$id": "1088", + "$id": "1253", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1089", + "$id": "1254", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14476,19 +17071,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1090", + "$id": "1255", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1091", + "$id": "1256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14498,60 +17093,45 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.zooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.zooName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1092", + "$id": "1257", "kind": "method", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", + "name": "$maxpagesize", + "serializedName": "$maxpagesize", "type": { - "$ref": "467" + "$id": "1258", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] }, - "location": "Body", + "location": "Query", "isApiVersion": false, - "optional": false, + "optional": true, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resource", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1093", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "140" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.$maxpagesize", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1094", + "$id": "1259", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "142" + "$ref": "161" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.accept", "readOnly": false, "access": "public", "decorators": [] @@ -14559,49 +17139,91 @@ ], "response": { "type": { - "$ref": "467" + "$ref": "518" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "467" - } - } - } - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList" + } + ], + "parameters": [ + { + "$id": "1260", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1261", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1262", + "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.Zoos", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "1263", + "kind": "client", + "name": "EndpointResources", + "namespace": "MgmtTypeSpec", + "methods": [ { - "$id": "1095", + "$id": "1264", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Get a Zoo", + "doc": "Gets the endpoint to the resource.", "operation": { - "$id": "1096", + "$id": "1265", "name": "get", - "resourceName": "Zoo", - "doc": "Get a Zoo", + "resourceName": "EndpointResource", + "doc": "Gets the endpoint to the resource.", "accessibility": "public", "parameters": [ { - "$id": "1097", + "$id": "1266", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1098", + "$id": "1267", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14611,7 +17233,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1099", + "$id": "1268", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14620,49 +17242,18 @@ }, "optional": false, "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.apiVersion", - "readOnly": false - }, - { - "$id": "1100", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1101", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "1102", - "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.Zoos.get.subscriptionId" + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.apiVersion", + "readOnly": false }, { - "$id": "1103", + "$id": "1269", "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1104", + "$id": "1270", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14671,22 +17262,22 @@ "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "allowReserved": true, + "skipUrlEncoding": true, "optional": false, "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.resourceUri" }, { - "$id": "1105", + "$id": "1271", "kind": "path", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$id": "1106", + "$id": "1272", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14701,15 +17292,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.zooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.endpointName" }, { - "$id": "1107", + "$id": "1273", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "144" + "$ref": "163" }, "isApiVersion": false, "optional": false, @@ -14717,7 +17308,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.accept" } ], "responses": [ @@ -14726,7 +17317,7 @@ 200 ], "bodyType": { - "$ref": "467" + "$ref": "525" }, "headers": [], "isErrorResponse": false, @@ -14737,11 +17328,11 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", + "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get", "decorators": [ { "name": "Azure.ResourceManager.@armResourceRead", @@ -14751,13 +17342,13 @@ }, "parameters": [ { - "$id": "1108", + "$id": "1274", "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1109", + "$id": "1275", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14767,19 +17358,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.resourceUri", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1110", + "$id": "1276", "kind": "method", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$id": "1111", + "$id": "1277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14789,24 +17380,24 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.zooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.endpointName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1112", + "$id": "1278", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "144" + "$ref": "163" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -14814,38 +17405,38 @@ ], "response": { "type": { - "$ref": "467" + "$ref": "525" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get" }, { - "$id": "1113", - "kind": "lro", - "name": "delete", + "$id": "1279", + "kind": "basic", + "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Delete a Zoo", + "doc": "Create or update the endpoint to the target resource.", "operation": { - "$id": "1114", - "name": "delete", - "resourceName": "Zoo", - "doc": "Delete a Zoo", + "$id": "1280", + "name": "createOrUpdate", + "resourceName": "EndpointResource", + "doc": "Create or update the endpoint to the target resource.", "accessibility": "public", "parameters": [ { - "$id": "1115", + "$id": "1281", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1116", + "$id": "1282", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14855,7 +17446,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1117", + "$id": "1283", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14865,48 +17456,41 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "1118", + "$id": "1284", "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1119", + "$id": "1285", "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "1120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "allowReserved": true, + "skipUrlEncoding": true, "optional": false, - "scope": "Client", + "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resourceUri" }, { - "$id": "1121", + "$id": "1286", "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$id": "1122", + "$id": "1287", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14921,172 +17505,227 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.endpointName" }, { - "$id": "1123", - "kind": "path", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "$id": "1288", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "1124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "165" }, "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.contentType" + }, + { + "$id": "1289", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "167" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.accept" + }, + { + "$id": "1290", + "kind": "body", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "525" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", "optional": false, "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.zooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resource" } ], "responses": [ { "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1126", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 + 200 ], + "bodyType": { + "$ref": "525" + }, "headers": [], - "isErrorResponse": false + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] } ], - "httpMethod": "DELETE", + "httpMethod": "PUT", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", + "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", + "requestMediaTypes": [ + "application/json" + ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceDelete", + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", "arguments": {} } ] }, "parameters": [ { - "$id": "1127", + "$id": "1291", + "kind": "method", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "type": { + "$id": "1292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resourceUri", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1293", + "kind": "method", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", + "type": { + "$id": "1294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.endpointName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1295", + "kind": "method", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "525" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1296", "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "1128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "165" }, - "location": "Path", + "location": "Header", "isApiVersion": false, "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.resourceGroupName", + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1129", + "$id": "1297", "kind": "method", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "accept", + "serializedName": "Accept", "type": { - "$id": "1130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "167" }, - "location": "Path", + "location": "Header", "isApiVersion": false, "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.zooName", + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.accept", "readOnly": false, "access": "public", "decorators": [] } ], - "response": {}, + "response": { + "type": { + "$ref": "525" + } + }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 204 - ] - } - } + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate" }, { - "$id": "1131", - "kind": "lro", + "$id": "1298", + "kind": "basic", "name": "update", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Update a Zoo", + "doc": "Update the endpoint to the target resource.", "operation": { - "$id": "1132", + "$id": "1299", "name": "update", - "resourceName": "Zoo", - "doc": "Update a Zoo", + "resourceName": "EndpointResource", + "doc": "Update the endpoint to the target resource.", "accessibility": "public", "parameters": [ { - "$id": "1133", + "$id": "1300", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1134", + "$id": "1301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15096,7 +17735,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1135", + "$id": "1302", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15106,48 +17745,17 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.apiVersion", "readOnly": false }, { - "$id": "1136", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1137", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "1138", - "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.Zoos.update.subscriptionId" - }, - { - "$id": "1139", + "$id": "1303", "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1140", + "$id": "1304", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15156,22 +17764,22 @@ "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "allowReserved": true, + "skipUrlEncoding": true, "optional": false, "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.resourceUri" }, { - "$id": "1141", + "$id": "1305", "kind": "path", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$id": "1142", + "$id": "1306", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15186,16 +17794,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.zooName" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.endpointName" }, { - "$id": "1143", + "$id": "1307", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "146" + "$ref": "169" }, "isApiVersion": false, "optional": false, @@ -15203,15 +17811,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.contentType" }, { - "$id": "1144", + "$id": "1308", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "148" + "$ref": "171" }, "isApiVersion": false, "optional": false, @@ -15219,16 +17827,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.accept" }, { - "$id": "1145", + "$id": "1309", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "483" + "$ref": "525" }, "isApiVersion": false, "contentTypes": [ @@ -15239,7 +17847,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.properties" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.properties" } ], "responses": [ @@ -15248,57 +17856,25 @@ 200 ], "bodyType": { - "$ref": "467" + "$ref": "525" }, "headers": [], "isErrorResponse": false, "contentTypes": [ "application/json" ] - }, - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1147", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false } ], "httpMethod": "PATCH", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", + "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update", "decorators": [ { "name": "Azure.ResourceManager.@armResourceUpdate", @@ -15308,13 +17884,13 @@ }, "parameters": [ { - "$id": "1148", + "$id": "1310", "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1149", + "$id": "1311", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15324,19 +17900,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.resourceUri", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1150", + "$id": "1312", "kind": "method", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$id": "1151", + "$id": "1313", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15346,60 +17922,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.zooName", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.endpointName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1152", + "$id": "1314", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "483" + "$ref": "525" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.properties", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.properties", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1153", + "$id": "1315", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "150" + "$ref": "169" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1154", + "$id": "1316", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "152" + "$ref": "171" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.accept", "readOnly": false, "access": "public", "decorators": [] @@ -15407,49 +17983,38 @@ ], "response": { "type": { - "$ref": "467" + "$ref": "525" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "467" - } - } - } + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update" }, { - "$id": "1155", - "kind": "paging", - "name": "list", + "$id": "1317", + "kind": "basic", + "name": "delete", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List Zoo resources by resource group", + "doc": "Deletes the endpoint access to the target resource.", "operation": { - "$id": "1156", - "name": "list", - "resourceName": "Zoo", - "doc": "List Zoo resources by resource group", + "$id": "1318", + "name": "delete", + "resourceName": "EndpointResource", + "doc": "Deletes the endpoint access to the target resource.", "accessibility": "public", "parameters": [ { - "$id": "1157", + "$id": "1319", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1158", + "$id": "1320", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15459,7 +18024,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1159", + "$id": "1321", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15469,48 +18034,41 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.apiVersion", "readOnly": false }, { - "$id": "1160", + "$id": "1322", "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1161", + "$id": "1323", "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "1162", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, + "allowReserved": true, + "skipUrlEncoding": true, "optional": false, - "scope": "Client", + "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.resourceUri" }, { - "$id": "1163", + "$id": "1324", "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$id": "1164", + "$id": "1325", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15519,29 +18077,13 @@ "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.resourceGroupName" - }, - { - "$id": "1165", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "154" - }, - "isApiVersion": false, + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.accept" + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.endpointName" } ], "responses": [ @@ -15549,39 +18091,40 @@ "statusCodes": [ 200 ], - "bodyType": { - "$ref": "489" - }, "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false } ], - "httpMethod": "GET", + "httpMethod": "DELETE", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos", + "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceList", + "name": "Azure.ResourceManager.@armResourceDelete", "arguments": {} } ] }, "parameters": [ { - "$id": "1166", + "$id": "1326", "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1167", + "$id": "1327", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15591,77 +18134,117 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.resourceUri", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1168", + "$id": "1328", "kind": "method", - "name": "accept", - "serializedName": "Accept", + "name": "endpointName", + "serializedName": "endpointName", + "doc": "The name of the EndpointResource", "type": { - "$ref": "154" + "$id": "1329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "location": "Header", + "location": "Path", "isApiVersion": false, "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.accept", + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.endpointName", "readOnly": false, "access": "public", "decorators": [] } ], - "response": { - "type": { - "$ref": "491" - }, - "resultSegments": [ - "value" - ] - }, + "response": {}, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - } - } - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete" + } + ], + "parameters": [ { - "$id": "1169", - "kind": "paging", - "name": "listBySubscription", + "$id": "1330", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1331", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1332", + "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.EndpointResources", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "1333", + "kind": "client", + "name": "SolutionResources", + "namespace": "MgmtTypeSpec", + "methods": [ + { + "$id": "1334", + "kind": "basic", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "List Zoo resources by subscription ID", + "doc": "Get a SelfHelpResource", "operation": { - "$id": "1170", - "name": "listBySubscription", - "resourceName": "Zoo", - "doc": "List Zoo resources by subscription ID", + "$id": "1335", + "name": "get", + "resourceName": "SelfHelpResource", + "doc": "Get a SelfHelpResource", "accessibility": "public", "parameters": [ { - "$id": "1171", + "$id": "1336", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1172", + "$id": "1337", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15671,7 +18254,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1173", + "$id": "1338", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15681,27 +18264,44 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.apiVersion", "readOnly": false }, { - "$id": "1174", + "$id": "1339", "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", + "name": "scope", + "serializedName": "scope", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1175", + "$id": "1340", "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "1176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": true, + "skipUrlEncoding": true, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.scope" + }, + { + "$id": "1341", + "kind": "path", + "name": "selfHelpName", + "serializedName": "selfHelpName", + "doc": "The name of the SelfHelpResource", + "type": { + "$id": "1342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "isApiVersion": false, @@ -15710,18 +18310,18 @@ "allowReserved": false, "skipUrlEncoding": false, "optional": false, - "scope": "Client", + "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.selfHelpName" }, { - "$id": "1177", + "$id": "1343", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "156" + "$ref": "173" }, "isApiVersion": false, "optional": false, @@ -15729,7 +18329,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.accept" } ], "responses": [ @@ -15738,7 +18338,7 @@ 200 ], "bodyType": { - "$ref": "489" + "$ref": "537" }, "headers": [], "isErrorResponse": false, @@ -15749,32 +18349,76 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/zoos", + "path": "/{scope}/providers/MgmtTypeSpec/selfHelps/{selfHelpName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription", + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceList", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "1178", + "$id": "1344", + "kind": "method", + "name": "scope", + "serializedName": "scope", + "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "type": { + "$id": "1345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.scope", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1346", + "kind": "method", + "name": "selfHelpName", + "serializedName": "selfHelpName", + "doc": "The name of the SelfHelpResource", + "type": { + "$id": "1347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.selfHelpName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1348", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "156" + "$ref": "173" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -15782,52 +18426,91 @@ ], "response": { "type": { - "$ref": "491" - }, - "resultSegments": [ - "value" - ] + "$ref": "537" + } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - } - } - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get" + } + ], + "parameters": [ + { + "$id": "1349", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1350", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1351", + "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.SolutionResources", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "578" + } + }, + { + "$id": "1352", + "kind": "client", + "name": "PlaywrightQuotas", + "namespace": "MgmtTypeSpec", + "methods": [ { - "$id": "1179", + "$id": "1353", "kind": "basic", - "name": "zooAddressList", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "A synchronous resource action.", + "doc": "Get subscription-level location-based Playwright quota resource by name.", "operation": { - "$id": "1180", - "name": "zooAddressList", - "resourceName": "Zoos", - "doc": "A synchronous resource action.", + "$id": "1354", + "name": "get", + "resourceName": "PlaywrightQuota", + "doc": "Get subscription-level location-based Playwright quota resource by name.", "accessibility": "public", "parameters": [ { - "$id": "1181", + "$id": "1355", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1182", + "$id": "1356", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15837,7 +18520,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1183", + "$id": "1357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15847,22 +18530,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.apiVersion", "readOnly": false }, { - "$id": "1184", + "$id": "1358", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1185", + "$id": "1359", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1186", + "$id": "1360", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15879,19 +18562,26 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.subscriptionId" }, { - "$id": "1187", + "$id": "1361", "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": "1188", + "$id": "1362", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "isApiVersion": false, @@ -15903,20 +18593,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.location" }, { - "$id": "1189", + "$id": "1364", "kind": "path", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "playwrightQuotaName", + "serializedName": "playwrightQuotaName", + "doc": "The name of the PlaywrightQuota", "type": { - "$id": "1190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "33" }, "isApiVersion": false, "explode": false, @@ -15927,35 +18613,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.zooName" - }, - { - "$id": "1191", - "kind": "query", - "name": "$maxpagesize", - "serializedName": "$maxpagesize", - "type": { - "$id": "1192", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "optional": true, - "scope": "Method", - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.$maxpagesize", - "readOnly": false + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.playwrightQuotaName" }, { - "$id": "1193", + "$id": "1365", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "158" + "$ref": "175" }, "isApiVersion": false, "optional": false, @@ -15963,7 +18629,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.accept" } ], "responses": [ @@ -15972,7 +18638,7 @@ 200 ], "bodyType": { - "$ref": "495" + "$ref": "545" }, "headers": [], "isErrorResponse": false, @@ -15983,97 +18649,79 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}/zooAddressList", + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceAction", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "1194", + "$id": "1366", "kind": "method", - "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": "1195", + "$id": "1367", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "location": "Path", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.resourceGroupName", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.location", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1196", + "$id": "1369", "kind": "method", - "name": "zooName", - "serializedName": "zooName", - "doc": "The name of the Zoo", + "name": "playwrightQuotaName", + "serializedName": "playwrightQuotaName", + "doc": "The name of the PlaywrightQuota", "type": { - "$id": "1197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "33" }, "location": "Path", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.zooName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1198", - "kind": "method", - "name": "$maxpagesize", - "serializedName": "$maxpagesize", - "type": { - "$id": "1199", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "location": "Query", - "isApiVersion": false, - "optional": true, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.$maxpagesize", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.playwrightQuotaName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1200", + "$id": "1370", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "158" + "$ref": "175" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -16081,91 +18729,38 @@ ], "response": { "type": { - "$ref": "495" + "$ref": "545" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList" - } - ], - "parameters": [ - { - "$id": "1201", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "1202", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "1203", - "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.Zoos", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "519" - } - }, - { - "$id": "1204", - "kind": "client", - "name": "EndpointResources", - "namespace": "MgmtTypeSpec", - "methods": [ + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get" + }, { - "$id": "1205", - "kind": "basic", - "name": "get", + "$id": "1371", + "kind": "paging", + "name": "listBySubscription", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Gets the endpoint to the resource.", + "doc": "List Playwright quota resources for a given subscription Id.", "operation": { - "$id": "1206", - "name": "get", - "resourceName": "EndpointResource", - "doc": "Gets the endpoint to the resource.", + "$id": "1372", + "name": "listBySubscription", + "resourceName": "PlaywrightQuota", + "doc": "List Playwright quota resources for a given subscription Id.", "accessibility": "public", "parameters": [ { - "$id": "1207", + "$id": "1373", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1208", + "$id": "1374", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16175,7 +18770,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1209", + "$id": "1375", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -16185,44 +18780,58 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.apiVersion", "readOnly": false }, { - "$id": "1210", + "$id": "1376", "kind": "path", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1211", + "$id": "1377", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": true, - "skipUrlEncoding": true, + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, - "scope": "Method", + "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.resourceUri" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.subscriptionId" }, { - "$id": "1212", + "$id": "1379", "kind": "path", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", + "name": "location", + "serializedName": "location", + "doc": "The name of the Azure region.", "type": { - "$id": "1213", + "$id": "1380", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "isApiVersion": false, @@ -16234,15 +18843,15 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.endpointName" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.location" }, { - "$id": "1214", + "$id": "1382", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "160" + "$ref": "177" }, "isApiVersion": false, "optional": false, @@ -16250,7 +18859,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.accept" } ], "responses": [ @@ -16259,7 +18868,7 @@ 200 ], "bodyType": { - "$ref": "502" + "$ref": "555" }, "headers": [], "isErrorResponse": false, @@ -16270,76 +18879,61 @@ ], "httpMethod": "GET", "uri": "{endpoint}", - "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceRead", + "name": "Azure.ResourceManager.@armResourceList", "arguments": {} } ] }, "parameters": [ { - "$id": "1215", - "kind": "method", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", - "type": { - "$id": "1216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.resourceUri", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1217", + "$id": "1383", "kind": "method", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", + "name": "location", + "serializedName": "location", + "doc": "The name of the Azure region.", "type": { - "$id": "1218", + "$id": "1384", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "location": "Path", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.endpointName", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.location", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1219", + "$id": "1386", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "160" + "$ref": "177" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.accept", "readOnly": false, "access": "public", "decorators": [] @@ -16347,38 +18941,105 @@ ], "response": { "type": { - "$ref": "502" - } + "$ref": "557" + }, + "resultSegments": [ + "value" + ] }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get" - }, + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + } + } + ], + "parameters": [ + { + "$id": "1387", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1388", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1389", + "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": "578" + } + }, + { + "$id": "1390", + "kind": "client", + "name": "JobResources", + "namespace": "MgmtTypeSpec", + "methods": [ { - "$id": "1220", + "$id": "1391", "kind": "basic", - "name": "createOrUpdate", + "name": "get", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Create or update the endpoint to the target resource.", + "doc": "Gets information about the specified job.", "operation": { - "$id": "1221", - "name": "createOrUpdate", - "resourceName": "EndpointResource", - "doc": "Create or update the endpoint to the target resource.", + "$id": "1392", + "name": "get", + "resourceName": "JobResource", + "doc": "Gets information about the specified job.", "accessibility": "public", "parameters": [ { - "$id": "1222", + "$id": "1393", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1223", + "$id": "1394", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16388,7 +19049,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1224", + "$id": "1395", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -16398,17 +19059,48 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.apiVersion", "readOnly": false }, { - "$id": "1225", + "$id": "1396", "kind": "path", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1397", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1398", + "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": "1399", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1226", + "$id": "1400", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16417,22 +19109,22 @@ "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": true, - "skipUrlEncoding": true, + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resourceUri" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.resourceGroupName" }, { - "$id": "1227", + "$id": "1401", "kind": "path", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", + "name": "jobName", + "serializedName": "jobName", + "doc": "The name of the JobResource", "type": { - "$id": "1228", + "$id": "1402", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16447,32 +19139,36 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.endpointName" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.jobName" }, { - "$id": "1229", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", + "$id": "1403", + "kind": "query", + "name": "$expand", + "serializedName": "$expand", + "doc": "$expand is supported on details parameter for job, which provides details on the job stages.", "type": { - "$ref": "162" + "$id": "1404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, + "explode": false, + "optional": true, + "scope": "Method", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.$expand", + "readOnly": false }, { - "$id": "1230", + "$id": "1405", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "164" + "$ref": "179" }, "isApiVersion": false, "optional": false, @@ -16480,27 +19176,7 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.accept" - }, - { - "$id": "1231", - "kind": "body", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", - "type": { - "$ref": "502" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resource" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.accept" } ], "responses": [ @@ -16509,7 +19185,7 @@ 200 ], "bodyType": { - "$ref": "502" + "$ref": "561" }, "headers": [], "isErrorResponse": false, @@ -16518,32 +19194,29 @@ ] } ], - "httpMethod": "PUT", + "httpMethod": "GET", "uri": "{endpoint}", - "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", - "requestMediaTypes": [ - "application/json" - ], + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get", "decorators": [ { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "name": "Azure.ResourceManager.@armResourceRead", "arguments": {} } ] }, "parameters": [ { - "$id": "1232", + "$id": "1406", "kind": "method", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1233", + "$id": "1407", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16553,19 +19226,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resourceUri", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1234", + "$id": "1408", "kind": "method", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", + "name": "jobName", + "serializedName": "jobName", + "doc": "The name of the JobResource", "type": { - "$id": "1235", + "$id": "1409", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16575,60 +19248,46 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.endpointName", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.jobName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1236", + "$id": "1410", "kind": "method", - "name": "resource", - "serializedName": "resource", - "doc": "Resource create parameters.", + "name": "$expand", + "serializedName": "$expand", + "doc": "$expand is supported on details parameter for job, which provides details on the job stages.", "type": { - "$ref": "502" + "$id": "1411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "location": "Body", + "location": "Query", "isApiVersion": false, - "optional": false, + "optional": true, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resource", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1237", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "162" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.$expand", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1238", + "$id": "1412", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "164" + "$ref": "179" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.accept", "readOnly": false, "access": "public", "decorators": [] @@ -16636,38 +19295,38 @@ ], "response": { "type": { - "$ref": "502" + "$ref": "561" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get" }, { - "$id": "1239", - "kind": "basic", + "$id": "1413", + "kind": "lro", "name": "update", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Update the endpoint to the target resource.", + "doc": "Update a JobResource", "operation": { - "$id": "1240", + "$id": "1414", "name": "update", - "resourceName": "EndpointResource", - "doc": "Update the endpoint to the target resource.", + "resourceName": "JobResource", + "doc": "Update a JobResource", "accessibility": "public", "parameters": [ { - "$id": "1241", + "$id": "1415", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1242", + "$id": "1416", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16677,7 +19336,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1243", + "$id": "1417", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -16687,17 +19346,48 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.apiVersion", "readOnly": false }, { - "$id": "1244", + "$id": "1418", "kind": "path", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1419", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1420", + "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.update.subscriptionId" + }, + { + "$id": "1421", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1245", + "$id": "1422", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16706,22 +19396,22 @@ "isApiVersion": false, "explode": false, "style": "simple", - "allowReserved": true, - "skipUrlEncoding": true, + "allowReserved": false, + "skipUrlEncoding": false, "optional": false, "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.resourceUri" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.resourceGroupName" }, { - "$id": "1246", + "$id": "1423", "kind": "path", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", + "name": "jobName", + "serializedName": "jobName", + "doc": "The name of the JobResource", "type": { - "$id": "1247", + "$id": "1424", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16736,16 +19426,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.endpointName" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.jobName" }, { - "$id": "1248", + "$id": "1425", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "166" + "$ref": "181" }, "isApiVersion": false, "optional": false, @@ -16753,15 +19443,15 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.contentType" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.contentType" }, { - "$id": "1249", + "$id": "1426", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "168" + "$ref": "183" }, "isApiVersion": false, "optional": false, @@ -16769,16 +19459,16 @@ "scope": "Constant", "readOnly": false, "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.accept" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.accept" }, { - "$id": "1250", + "$id": "1427", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "502" + "$ref": "570" }, "isApiVersion": false, "contentTypes": [ @@ -16789,7 +19479,7 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.properties" + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.properties" } ], "responses": [ @@ -16798,25 +19488,57 @@ 200 ], "bodyType": { - "$ref": "502" + "$ref": "561" }, "headers": [], "isErrorResponse": false, "contentTypes": [ "application/json" ] + }, + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1428", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1429", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false } ], "httpMethod": "PATCH", "uri": "{endpoint}", - "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", "requestMediaTypes": [ "application/json" ], "bufferResponse": true, "generateProtocolMethod": true, "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update", "decorators": [ { "name": "Azure.ResourceManager.@armResourceUpdate", @@ -16826,13 +19548,13 @@ }, "parameters": [ { - "$id": "1251", + "$id": "1430", "kind": "method", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1252", + "$id": "1431", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16842,19 +19564,19 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.resourceUri", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.resourceGroupName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1253", + "$id": "1432", "kind": "method", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", + "name": "jobName", + "serializedName": "jobName", + "doc": "The name of the JobResource", "type": { - "$id": "1254", + "$id": "1433", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16864,60 +19586,60 @@ "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.endpointName", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.jobName", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1255", + "$id": "1434", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "502" + "$ref": "570" }, "location": "Body", "isApiVersion": false, "optional": false, "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.properties", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.properties", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1256", + "$id": "1435", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "166" + "$ref": "185" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.contentType", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.contentType", "readOnly": false, "access": "public", "decorators": [] }, { - "$id": "1257", + "$id": "1436", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "168" + "$ref": "187" }, "location": "Header", "isApiVersion": false, "optional": false, "scope": "Constant", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.accept", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.accept", "readOnly": false, "access": "public", "decorators": [] @@ -16925,201 +19647,35 @@ ], "response": { "type": { - "$ref": "502" + "$ref": "561" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update" - }, - { - "$id": "1258", - "kind": "basic", - "name": "delete", - "accessibility": "public", - "apiVersions": [ - "2024-05-01" - ], - "doc": "Deletes the endpoint access to the target resource.", - "operation": { - "$id": "1259", - "name": "delete", - "resourceName": "EndpointResource", - "doc": "Deletes the endpoint access to the target resource.", - "accessibility": "public", - "parameters": [ - { - "$id": "1260", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2024-05-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.apiVersion", - "readOnly": false - }, - { - "$id": "1263", - "kind": "path", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", - "type": { - "$id": "1264", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": true, - "skipUrlEncoding": true, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.resourceUri" - }, - { - "$id": "1265", - "kind": "path", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", - "type": { - "$id": "1266", - "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.EndpointResources.delete.endpointName" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "DELETE", - "uri": "{endpoint}", - "path": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceDelete", - "arguments": {} + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "561" } - ] - }, - "parameters": [ - { - "$id": "1267", - "kind": "method", - "name": "resourceUri", - "serializedName": "resourceUri", - "doc": "The fully qualified Azure Resource manager identifier of the resource.", - "type": { - "$id": "1268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.resourceUri", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1269", - "kind": "method", - "name": "endpointName", - "serializedName": "endpointName", - "doc": "The name of the EndpointResource", - "type": { - "$id": "1270", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.endpointName", - "readOnly": false, - "access": "public", - "decorators": [] } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete" + } } ], "parameters": [ { - "$id": "1271", + "$id": "1437", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1272", + "$id": "1438", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -17130,7 +19686,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1273", + "$id": "1439", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17149,22 +19705,22 @@ "arguments": {} } ], - "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources", + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources", "apiVersions": [ "2024-05-01" ], "parent": { - "$ref": "519" + "$ref": "578" } }, { - "$id": "1274", + "$id": "1440", "kind": "client", "name": "Bar", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "1275", + "$id": "1441", "kind": "basic", "name": "get", "accessibility": "public", @@ -17173,20 +19729,20 @@ ], "doc": "Get a Bar", "operation": { - "$id": "1276", + "$id": "1442", "name": "get", "resourceName": "Bar", "doc": "Get a Bar", "accessibility": "public", "parameters": [ { - "$id": "1277", + "$id": "1443", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1278", + "$id": "1444", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17196,7 +19752,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1279", + "$id": "1445", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17210,18 +19766,18 @@ "readOnly": false }, { - "$id": "1280", + "$id": "1446", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1281", + "$id": "1447", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1282", + "$id": "1448", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17241,13 +19797,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.subscriptionId" }, { - "$id": "1283", + "$id": "1449", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1284", + "$id": "1450", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17265,13 +19821,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.resourceGroupName" }, { - "$id": "1285", + "$id": "1451", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1286", + "$id": "1452", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17289,13 +19845,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.fooName" }, { - "$id": "1287", + "$id": "1453", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1288", + "$id": "1454", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17313,12 +19869,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.barName" }, { - "$id": "1289", + "$id": "1455", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "170" + "$ref": "189" }, "isApiVersion": false, "optional": false, @@ -17335,7 +19891,7 @@ 200 ], "bodyType": { - "$ref": "386" + "$ref": "406" }, "headers": [], "isErrorResponse": false, @@ -17360,13 +19916,13 @@ }, "parameters": [ { - "$id": "1290", + "$id": "1456", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1291", + "$id": "1457", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17382,13 +19938,13 @@ "decorators": [] }, { - "$id": "1292", + "$id": "1458", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1293", + "$id": "1459", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17404,13 +19960,13 @@ "decorators": [] }, { - "$id": "1294", + "$id": "1460", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1295", + "$id": "1461", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17426,12 +19982,12 @@ "decorators": [] }, { - "$id": "1296", + "$id": "1462", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "170" + "$ref": "189" }, "location": "Header", "isApiVersion": false, @@ -17445,7 +20001,7 @@ ], "response": { "type": { - "$ref": "386" + "$ref": "406" } }, "isOverride": false, @@ -17454,7 +20010,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get" }, { - "$id": "1297", + "$id": "1463", "kind": "basic", "name": "update", "accessibility": "public", @@ -17463,20 +20019,20 @@ ], "doc": "Update a Bar", "operation": { - "$id": "1298", + "$id": "1464", "name": "update", "resourceName": "Bar", "doc": "Update a Bar", "accessibility": "public", "parameters": [ { - "$id": "1299", + "$id": "1465", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1300", + "$id": "1466", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17486,7 +20042,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1301", + "$id": "1467", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17500,18 +20056,18 @@ "readOnly": false }, { - "$id": "1302", + "$id": "1468", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1303", + "$id": "1469", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1304", + "$id": "1470", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17531,13 +20087,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.subscriptionId" }, { - "$id": "1305", + "$id": "1471", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1306", + "$id": "1472", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17555,13 +20111,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.resourceGroupName" }, { - "$id": "1307", + "$id": "1473", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1308", + "$id": "1474", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17579,13 +20135,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.fooName" }, { - "$id": "1309", + "$id": "1475", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1310", + "$id": "1476", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17603,13 +20159,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.barName" }, { - "$id": "1311", + "$id": "1477", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "172" + "$ref": "191" }, "isApiVersion": false, "optional": false, @@ -17620,12 +20176,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.contentType" }, { - "$id": "1312", + "$id": "1478", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "174" + "$ref": "193" }, "isApiVersion": false, "optional": false, @@ -17636,13 +20192,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.accept" }, { - "$id": "1313", + "$id": "1479", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "386" + "$ref": "406" }, "isApiVersion": false, "contentTypes": [ @@ -17662,7 +20218,7 @@ 200 ], "bodyType": { - "$ref": "386" + "$ref": "406" }, "headers": [], "isErrorResponse": false, @@ -17690,13 +20246,13 @@ }, "parameters": [ { - "$id": "1314", + "$id": "1480", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1315", + "$id": "1481", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17712,13 +20268,13 @@ "decorators": [] }, { - "$id": "1316", + "$id": "1482", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1317", + "$id": "1483", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17734,13 +20290,13 @@ "decorators": [] }, { - "$id": "1318", + "$id": "1484", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1319", + "$id": "1485", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17756,13 +20312,13 @@ "decorators": [] }, { - "$id": "1320", + "$id": "1486", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "386" + "$ref": "406" }, "location": "Body", "isApiVersion": false, @@ -17774,13 +20330,13 @@ "decorators": [] }, { - "$id": "1321", + "$id": "1487", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "172" + "$ref": "191" }, "location": "Header", "isApiVersion": false, @@ -17792,12 +20348,12 @@ "decorators": [] }, { - "$id": "1322", + "$id": "1488", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "174" + "$ref": "193" }, "location": "Header", "isApiVersion": false, @@ -17811,7 +20367,7 @@ ], "response": { "type": { - "$ref": "386" + "$ref": "406" } }, "isOverride": false, @@ -17822,13 +20378,13 @@ ], "parameters": [ { - "$id": "1323", + "$id": "1489", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1324", + "$id": "1490", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -17839,7 +20395,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1325", + "$id": "1491", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17858,17 +20414,17 @@ "2024-05-01" ], "parent": { - "$ref": "519" + "$ref": "578" } }, { - "$id": "1326", + "$id": "1492", "kind": "client", "name": "ZooRecommendation", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "1327", + "$id": "1493", "kind": "basic", "name": "recommend", "accessibility": "public", @@ -17877,20 +20433,20 @@ ], "doc": "A synchronous resource action.", "operation": { - "$id": "1328", + "$id": "1494", "name": "recommend", "resourceName": "Zoos", "doc": "A synchronous resource action.", "accessibility": "public", "parameters": [ { - "$id": "1329", + "$id": "1495", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1330", + "$id": "1496", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17900,7 +20456,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1331", + "$id": "1497", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17914,18 +20470,18 @@ "readOnly": false }, { - "$id": "1332", + "$id": "1498", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1333", + "$id": "1499", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1334", + "$id": "1500", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17945,13 +20501,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.recommend.subscriptionId" }, { - "$id": "1335", + "$id": "1501", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1336", + "$id": "1502", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17969,13 +20525,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.recommend.resourceGroupName" }, { - "$id": "1337", + "$id": "1503", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1338", + "$id": "1504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17993,12 +20549,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.recommend.zooName" }, { - "$id": "1339", + "$id": "1505", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "176" + "$ref": "195" }, "isApiVersion": false, "optional": false, @@ -18015,7 +20571,7 @@ 200 ], "bodyType": { - "$ref": "514" + "$ref": "573" }, "headers": [], "isErrorResponse": false, @@ -18040,13 +20596,13 @@ }, "parameters": [ { - "$id": "1340", + "$id": "1506", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1341", + "$id": "1507", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18062,13 +20618,13 @@ "decorators": [] }, { - "$id": "1342", + "$id": "1508", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1343", + "$id": "1509", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18084,12 +20640,12 @@ "decorators": [] }, { - "$id": "1344", + "$id": "1510", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "176" + "$ref": "195" }, "location": "Header", "isApiVersion": false, @@ -18103,7 +20659,7 @@ ], "response": { "type": { - "$ref": "514" + "$ref": "573" } }, "isOverride": false, @@ -18114,13 +20670,13 @@ ], "parameters": [ { - "$id": "1345", + "$id": "1511", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1346", + "$id": "1512", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -18131,7 +20687,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1347", + "$id": "1513", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -18150,7 +20706,7 @@ "2024-05-01" ], "parent": { - "$ref": "519" + "$ref": "578" } } ] diff --git a/eng/packages/http-client-csharp-mgmt/package-lock.json b/eng/packages/http-client-csharp-mgmt/package-lock.json index 8abe9844cec3..5e887263e511 100644 --- a/eng/packages/http-client-csharp-mgmt/package-lock.json +++ b/eng/packages/http-client-csharp-mgmt/package-lock.json @@ -9,25 +9,25 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250903.2" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250912.2" }, "devDependencies": { - "@azure-tools/azure-http-specs": "0.1.0-alpha.25", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/azure-http-specs": "0.1.0-alpha.28", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@azure-tools/typespec-liftr-base": "0.8.0", "@eslint/js": "^9.2.0", - "@types/node": "~22.7.5", + "@types/node": "~22.12.0", "@types/prettier": "^2.6.3", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/http-specs": "0.1.0-alpha.25", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/tspd": "0.72.2", - "@typespec/versioning": "0.73.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/http-specs": "0.1.0-alpha.26", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/tspd": "0.73.0", + "@typespec/versioning": "0.74.0", "@vitest/coverage-v8": "^3.0.5", "@vitest/ui": "^3.0.5", "c8": "^10.1.2", @@ -42,9 +42,9 @@ } }, "node_modules/@alloy-js/core": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@alloy-js/core/-/core-0.19.0.tgz", - "integrity": "sha512-Od92r7UgX7kRLJWfGD3+lLZBhrRQ5M2pV5Fqm1CuCKhFUV5CrfoW46DQy2gdSDLD4AE+N7oPo6DTkLqrxACHFA==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@alloy-js/core/-/core-0.20.0.tgz", + "integrity": "sha512-ylPf+ayI9MsqUPrNVzND3Oh9rVrfOOcMkyVwtXXaxaobWPkcRq2I4rX09FkG0i/9DoaLE6ZCvUfdgJsM29MYBA==", "dev": true, "license": "MIT", "dependencies": { @@ -52,7 +52,7 @@ "cli-table3": "^0.6.5", "pathe": "^2.0.3", "picocolors": "^1.1.1", - "prettier": "^3.5.3" + "prettier": "^3.6.2" } }, "node_modules/@alloy-js/core/node_modules/prettier": { @@ -72,24 +72,24 @@ } }, "node_modules/@alloy-js/markdown": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@alloy-js/markdown/-/markdown-0.19.0.tgz", - "integrity": "sha512-IKwzO6+ggXtl+bVy33wa5iBJx6KkMD7lzN3RJrKTvBPml7iuP21TwLjhUa1rmRQLekUZlbRuTYWaeWVEyrPYyw==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@alloy-js/markdown/-/markdown-0.20.0.tgz", + "integrity": "sha512-c1Q4dzUvWC4Bdoi6dRT9yAYVoCiqz3ZMClV8CHzEsgZYjjdS0S2ZWWmgxzS87rSDHSjmQIXJ4BcUZfKyfnMrFA==", "dev": true, "license": "MIT", "dependencies": { - "@alloy-js/core": "~0.19.0", + "@alloy-js/core": "~0.20.0", "yaml": "^2.7.1" } }, "node_modules/@alloy-js/typescript": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@alloy-js/typescript/-/typescript-0.19.0.tgz", - "integrity": "sha512-feYhirsNsKADZYWTwN+TrwD88cgdwQP1shDyBJuUgHPX2/LxSR2p5bace6Nw/qYOg44d1VVjf2pe+JFWNkShXw==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@alloy-js/typescript/-/typescript-0.20.0.tgz", + "integrity": "sha512-F1y5QjneE8GVxIq6oYsebu+Fccrn72qFHelNX5GSLfs4Ps2fxpk2+70rsGznZyHe9LIt70StaAciTjH6cxH4bQ==", "dev": true, "license": "MIT", "dependencies": { - "@alloy-js/core": "~0.19.0", + "@alloy-js/core": "~0.20.0", "change-case": "^5.4.4", "pathe": "^2.0.3" } @@ -109,45 +109,45 @@ } }, "node_modules/@azure-tools/azure-http-specs": { - "version": "0.1.0-alpha.25", - "resolved": "https://registry.npmjs.org/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.25.tgz", - "integrity": "sha512-fvexvGbDUUcd6su+RCln/hrOosbWYvl1FaycaifX0NVJub/ne492G2dvHLgp2N8rnUJ9uIenXYjHZHYsrjyGHQ==", + "version": "0.1.0-alpha.28", + "resolved": "https://registry.npmjs.org/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.28.tgz", + "integrity": "sha512-rPd/37FGprH3Hg00r+JJ6a9cG4vadGMrd6Q+Ea8EXWArG5Vqq/FmzghxlafA+U9ByBbELQWnZlEDaRCaGC8fYA==", "dev": true, "license": "MIT", "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.8", - "@typespec/spector": "^0.1.0-alpha.17" + "@typespec/spec-api": "^0.1.0-alpha.9", + "@typespec/spector": "^0.1.0-alpha.18" }, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.59.0.tgz", - "integrity": "sha512-3vTWDTSR+P0qeyFcOKTgXortNOeA3nsyKTPpZqfFZVTtNFiiO17UWAM2Eg3i0IpNQ3qxMMAksIkwt1bqltTDqA==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.59.0.tgz", - "integrity": "sha512-q0UkBnwWE4+9ivAkwAOOrDF9kvSb+qRIvMXJdUlqGfwFqDkOvQFwHSzSDeL/mBNK2fB9NIePKPFjDGP9lpC0vQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", "dev": true, "license": "MIT", "dependencies": { @@ -158,34 +158,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.59.0.tgz", - "integrity": "sha512-+eKYH25ptj6SZHT+/YfxrX+g6HMAQQTphmHmqOoRCbbfPaE8l855OaDrwEgh5NDLV8WXnHpzTNI0dsYipEp10g==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.60.0.tgz", + "integrity": "sha512-4sx9StBWkmnBfLJ9b23RSwCs0TkTElaU9+6a/cS6JS0F7UggP/KLQd6LG59D0u9ByXM2x9pvYPO8l/K7UOXoPg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.59.0.tgz", - "integrity": "sha512-5+pVcOr7Uyq4IaZ3oLjLi8jnBuR+t/B8hQF4CZo+goe/uK+WkmDfw1TlY14G2ve7W7v8m9+Sk2nil6bN1uHWEQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -196,16 +196,16 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/sse": "^0.73.0", - "@typespec/streams": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure-tools/typespec-liftr-base": { @@ -215,12 +215,12 @@ "dev": true }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250903.2", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250903.2.tgz", - "integrity": "sha512-OSOdAii+eOusoSoXksB9cMMGztQAO2W3PDjH5aJyVEVKokn6IVhWs2xWgDnhApdQdrObBcfZ04Xvd1K5Rb/2uw==", + "version": "1.0.0-alpha.20250912.2", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250912.2.tgz", + "integrity": "sha512-RImdae8o0zJRTVo2dOx8tLY7t59IqNjlaYuqSVvSoyJgEH9XT6Fb3MyhCUpKbnNfLUq/qAq2LdHsEeqSwrKWbw==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250903.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250912.2" } }, "node_modules/@azure/abort-controller": { @@ -237,14 +237,14 @@ } }, "node_modules/@azure/core-auth": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.0.tgz", - "integrity": "sha512-88Djs5vBvGbHQHf5ZZcaoNHo6Y8BKZkt3cw2iuJIQzLEgH4Ox6Tm4hjFhbqOxyYsgIG/eJbFEHpxRIfEEWv5Ow==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz", + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.11.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-util": "^1.13.0", "tslib": "^2.6.2" }, "engines": { @@ -252,18 +252,18 @@ } }, "node_modules/@azure/core-client": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.0.tgz", - "integrity": "sha512-O4aP3CLFNodg8eTHXECaH3B3CjicfzkxVtnrfLkOq0XNP7TIECGfHpK/C6vADZkWP75wzmdBnsIA8ksuJMk18g==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.1.tgz", + "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", "dev": true, "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.20.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", - "@azure/logger": "^1.0.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", "tslib": "^2.6.2" }, "engines": { @@ -271,18 +271,18 @@ } }, "node_modules/@azure/core-http-compat": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.3.0.tgz", - "integrity": "sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.3.1.tgz", + "integrity": "sha512-az9BkXND3/d5VgdRRQVkiJb2gOmDU8Qcq4GvjtBmDICNiQ9udFmDk4ZpSB5Qq1OmtDJGlQAfBaS4palFsazQ5g==", "dev": true, "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.20.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-client": "^1.10.0", + "@azure/core-rest-pipeline": "^1.22.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-lro": { @@ -315,17 +315,17 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.0.tgz", - "integrity": "sha512-OKHmb3/Kpm06HypvB3g6Q3zJuvyXcpxDpCS1PnU8OV6AJgSFaee/covXBcPbWc6XDDxtEPlbi3EMQ6nUiPaQtw==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.1.tgz", + "integrity": "sha512-UVZlVLfLyz6g3Hy7GNDpooMQonUygH7ghdiSASOOHy97fKj/mPLqgDX7aidOijn+sCMU+WU8NjlPlNTgnvbcGA==", "dev": true, "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.8.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, @@ -334,9 +334,9 @@ } }, "node_modules/@azure/core-tracing": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.0.tgz", - "integrity": "sha512-+XvmZLLWPe67WXNZo9Oc9CrPj/Tm8QnHR92fFAFdnbzwNdCH1h+7UdpaQgRSBsMY+oW1kHXNUZQLdZ1gHX3ROw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz", + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -347,13 +347,13 @@ } }, "node_modules/@azure/core-util": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.0.tgz", - "integrity": "sha512-o0psW8QWQ58fq3i24Q1K2XfS/jYTxr7O1HRcyUE9bV9NttLU+kYOH82Ixj8DGlMTOWgxm1Sss2QAfKK5UkSPxw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz", + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", "dev": true, "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", + "@azure/abort-controller": "^2.1.2", "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, @@ -376,9 +376,9 @@ } }, "node_modules/@azure/identity": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.10.2.tgz", - "integrity": "sha512-Uth4vz0j+fkXCkbvutChUj03PDCokjbC6Wk9JT8hHEUtpy/EurNKAseb3+gO6Zi9VYBvwt61pgbzn1ovk942Qg==", + "version": "4.11.2", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.11.2.tgz", + "integrity": "sha512-xajUK+qzN28JkVol93Ouleu+aNiETEx/LR2LkRWGb5vi8D2Tv6y5COyQHDZwVQhZW/EJDHNjuxjjv47jF3TntQ==", "dev": true, "license": "MIT", "dependencies": { @@ -413,22 +413,22 @@ } }, "node_modules/@azure/msal-browser": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.19.0.tgz", - "integrity": "sha512-g6Ea+sJmK7l5NUyrPhtD7DNj/tZcsr6VTNNLNuYs8yPvL3HNiIpO/0kzXntF9AqJ/6L+uz9aHmoT1x+RNq6zBQ==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.22.1.tgz", + "integrity": "sha512-/I76rBJpt5ZVfFXk+GkKxD4w1DZEbVpNn0aQjvRgnDnTYo3L/f8Oeo3R1O9eL/ccg5j1537iRLr7UwVhwnHtyg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.10.0" + "@azure/msal-common": "15.12.0" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "15.10.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.10.0.tgz", - "integrity": "sha512-+cGnma71NV3jzl6DdgdHsqriN4ZA7puBIzObSYCvcIVGMULGb2NrcOGV6IJxO06HoVRHFKijkxd9lcBvS063KQ==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.12.0.tgz", + "integrity": "sha512-4ucXbjVw8KJ5QBgnGJUeA07c8iznwlk5ioHIhI4ASXcXgcf2yRFhWzYOyWg/cI49LC9ekpFJeQtO3zjDTbl6TQ==", "dev": true, "license": "MIT", "engines": { @@ -436,13 +436,13 @@ } }, "node_modules/@azure/msal-node": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.7.0.tgz", - "integrity": "sha512-WsL11pT0hnoIr/4NCjG6uJswkmNA/9AgEre4mSQZS2e+ZPKUWwUdA5nCTnr4n1FMT1O5ezSEiJushnPW25Y+dA==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.7.3.tgz", + "integrity": "sha512-MoJxkKM/YpChfq4g2o36tElyzNUMG8mfD6u8NbuaPAsqfGpaw249khAcJYNoIOigUzRw45OjXCOrexE6ImdUxg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.10.0", + "@azure/msal-common": "15.12.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -451,28 +451,50 @@ } }, "node_modules/@azure/storage-blob": { - "version": "12.27.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.27.0.tgz", - "integrity": "sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==", + "version": "12.28.0", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.28.0.tgz", + "integrity": "sha512-VhQHITXXO03SURhDiGuHhvc/k/sD2WvJUS7hqhiVNbErVCuQoLtWql7r97fleBlIRKHJaa9R7DpBjfE0pfLYcA==", "dev": true, "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.4.0", - "@azure/core-client": "^1.6.2", - "@azure/core-http-compat": "^2.0.0", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.3", + "@azure/core-http-compat": "^2.2.0", "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.10.1", - "@azure/core-tracing": "^1.1.2", - "@azure/core-util": "^1.6.1", - "@azure/core-xml": "^1.4.3", - "@azure/logger": "^1.0.0", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/core-xml": "^1.4.5", + "@azure/logger": "^1.1.4", + "@azure/storage-common": "^12.0.0-beta.2", "events": "^3.0.0", - "tslib": "^2.2.0" + "tslib": "^2.8.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" + } + }, + "node_modules/@azure/storage-common": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.0.0.tgz", + "integrity": "sha512-QyEWXgi4kdRo0wc1rHum9/KnaWZKCdQGZK1BjU4fFL6Jtedp7KLbQihgTTVxldFy1z1ZPtuDPx8mQ5l3huPPbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-http-compat": "^2.2.0", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "events": "^3.3.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@babel/code-frame": { @@ -509,13 +531,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.3.tgz", - "integrity": "sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.3" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -525,9 +547,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", - "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -560,9 +582,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", - "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", "cpu": [ "ppc64" ], @@ -577,9 +599,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", - "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", "cpu": [ "arm" ], @@ -594,9 +616,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", - "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", "cpu": [ "arm64" ], @@ -611,9 +633,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", - "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", "cpu": [ "x64" ], @@ -628,9 +650,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", - "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", "cpu": [ "arm64" ], @@ -645,9 +667,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", - "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", "cpu": [ "x64" ], @@ -662,9 +684,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", - "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", "cpu": [ "arm64" ], @@ -679,9 +701,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", - "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", "cpu": [ "x64" ], @@ -696,9 +718,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", - "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", "cpu": [ "arm" ], @@ -713,9 +735,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", - "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", "cpu": [ "arm64" ], @@ -730,9 +752,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", - "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", "cpu": [ "ia32" ], @@ -747,9 +769,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", - "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", "cpu": [ "loong64" ], @@ -764,9 +786,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", - "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", "cpu": [ "mips64el" ], @@ -781,9 +803,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", - "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", "cpu": [ "ppc64" ], @@ -798,9 +820,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", - "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", "cpu": [ "riscv64" ], @@ -815,9 +837,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", - "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", "cpu": [ "s390x" ], @@ -832,9 +854,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", - "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", "cpu": [ "x64" ], @@ -849,9 +871,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", - "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", "cpu": [ "arm64" ], @@ -866,9 +888,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", - "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", "cpu": [ "x64" ], @@ -883,9 +905,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", - "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", "cpu": [ "arm64" ], @@ -900,9 +922,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", - "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", "cpu": [ "x64" ], @@ -916,10 +938,27 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", - "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", "cpu": [ "x64" ], @@ -934,9 +973,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", - "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", "cpu": [ "arm64" ], @@ -951,9 +990,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", - "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", "cpu": [ "ia32" ], @@ -968,9 +1007,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", - "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", "cpu": [ "x64" ], @@ -985,9 +1024,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { @@ -1061,10 +1100,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/js": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", - "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "version": "9.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz", + "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==", "dev": true, "license": "MIT", "engines": { @@ -1075,16 +1127,16 @@ } }, "node_modules/@gerrit0/mini-shiki": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.4.2.tgz", - "integrity": "sha512-3jXo5bNjvvimvdbIhKGfFxSnKCX+MA8wzHv55ptzk/cx8wOzT+BRcYgj8aFN3yTiTs+zvQQiaZFr7Jce1ZG3fw==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.12.2.tgz", + "integrity": "sha512-HKZPmO8OSSAAo20H2B3xgJdxZaLTwtlMwxg0967scnrDlPwe6j5+ULGHyIqwgTbFCn9yv/ff8CmfWZLE9YKBzA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/engine-oniguruma": "^3.4.2", - "@shikijs/langs": "^3.4.2", - "@shikijs/themes": "^3.4.2", - "@shikijs/types": "^3.4.2", + "@shikijs/engine-oniguruma": "^3.12.2", + "@shikijs/langs": "^3.12.2", + "@shikijs/themes": "^3.12.2", + "@shikijs/types": "^3.12.2", "@shikijs/vscode-textmate": "^10.0.2" } }, @@ -1104,6 +1156,19 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1126,16 +1191,25 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@inquirer/ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz", + "integrity": "sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.8.tgz", - "integrity": "sha512-d/QAsnwuHX2OPolxvYcgSj7A9DO9H6gVOy2DvBTx+P2LH2iRTo/RSGV3iwCzW024nP9hw98KIuDmdyhZQj1UQg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz", + "integrity": "sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/figures": "^1.0.12", - "@inquirer/type": "^3.0.7", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1151,13 +1225,13 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.12", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.12.tgz", - "integrity": "sha512-dpq+ielV9/bqgXRUbNH//KsY6WEw9DrGPmipkpmgC1Y46cwuBTNx7PXFWTjc3MQ+urcc0QxoVHcMI0FW4Ok0hg==", + "version": "5.1.18", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.18.tgz", + "integrity": "sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7" + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1172,14 +1246,14 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.13", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.13.tgz", - "integrity": "sha512-1viSxebkYN2nJULlzCxES6G9/stgHSepZ9LqqfdIGPHj5OHhiBUXVS0a6R0bEC2A+VL4D9w6QB66ebCr6HGllA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz", + "integrity": "sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==", "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.12", - "@inquirer/type": "^3.0.7", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", @@ -1199,14 +1273,14 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.13", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.13.tgz", - "integrity": "sha512-WbicD9SUQt/K8O5Vyk9iC2ojq5RHoCLK6itpp2fHsWe44VxxcA9z3GTWlvjSTGmMQpZr+lbVmrxdHcumJoLbMA==", + "version": "4.2.20", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz", + "integrity": "sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7", - "external-editor": "^3.1.0" + "@inquirer/core": "^10.2.2", + "@inquirer/external-editor": "^1.0.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1221,13 +1295,13 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.15.tgz", - "integrity": "sha512-4Y+pbr/U9Qcvf+N/goHzPEXiHH8680lM3Dr3Y9h9FFw4gHS+zVpbj8LfbKWIb/jayIB4aSO4pWiBTrBYWkvi5A==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz", + "integrity": "sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1242,23 +1316,44 @@ } } }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", + "license": "MIT", + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/figures": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.12.tgz", - "integrity": "sha512-MJttijd8rMFcKJC8NYmprWr6hD3r9Gd9qUC0XwPNwoEPWSMVJwA2MlXxF+nhZZNMY+HXsWa+o7KY2emWYIn0jQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@inquirer/input": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.12.tgz", - "integrity": "sha512-xJ6PFZpDjC+tC1P8ImGprgcsrzQRsUh9aH3IZixm1lAZFK49UGHxM3ltFfuInN2kPYNfyoPRh+tU4ftsjPLKqQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz", + "integrity": "sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7" + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1273,13 +1368,13 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.15.tgz", - "integrity": "sha512-xWg+iYfqdhRiM55MvqiTCleHzszpoigUpN5+t1OMcRkJrUrw7va3AzXaxvS+Ak7Gny0j2mFSTv2JJj8sMtbV2g==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz", + "integrity": "sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7" + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1294,14 +1389,14 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.15.tgz", - "integrity": "sha512-75CT2p43DGEnfGTaqFpbDC2p2EEMrq0S+IRrf9iJvYreMy5mAWj087+mdKyLHapUEPLjN10mNvABpGbk8Wdraw==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz", + "integrity": "sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1316,21 +1411,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.3.tgz", - "integrity": "sha512-8YL0WiV7J86hVAxrh3fE5mDCzcTDe1670unmJRz6ArDgN+DBK1a0+rbnNWp4DUB5rPMwqD5ZP6YHl9KK1mbZRg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.6.tgz", + "integrity": "sha512-68JhkiojicX9SBUD8FE/pSKbOKtwoyaVj1kwqLfvjlVXZvOy3iaSWX4dCLsZyYx/5Ur07Fq+yuDNOen+5ce6ig==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.8", - "@inquirer/confirm": "^5.1.12", - "@inquirer/editor": "^4.2.13", - "@inquirer/expand": "^4.0.15", - "@inquirer/input": "^4.1.12", - "@inquirer/number": "^3.0.15", - "@inquirer/password": "^4.0.15", - "@inquirer/rawlist": "^4.1.3", - "@inquirer/search": "^3.0.15", - "@inquirer/select": "^4.2.3" + "@inquirer/checkbox": "^4.2.4", + "@inquirer/confirm": "^5.1.18", + "@inquirer/editor": "^4.2.20", + "@inquirer/expand": "^4.0.20", + "@inquirer/input": "^4.2.4", + "@inquirer/number": "^3.0.20", + "@inquirer/password": "^4.0.20", + "@inquirer/rawlist": "^4.1.8", + "@inquirer/search": "^3.1.3", + "@inquirer/select": "^4.3.4" }, "engines": { "node": ">=18" @@ -1345,13 +1440,13 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.3.tgz", - "integrity": "sha512-7XrV//6kwYumNDSsvJIPeAqa8+p7GJh7H5kRuxirct2cgOcSWwwNGoXDRgpNFbY/MG2vQ4ccIWCi8+IXXyFMZA==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz", + "integrity": "sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/type": "^3.0.7", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1367,14 +1462,14 @@ } }, "node_modules/@inquirer/search": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.15.tgz", - "integrity": "sha512-YBMwPxYBrADqyvP4nNItpwkBnGGglAvCLVW8u4pRmmvOsHUtCAUIMbUrLX5B3tFL1/WsLGdQ2HNzkqswMs5Uaw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz", + "integrity": "sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/figures": "^1.0.12", - "@inquirer/type": "^3.0.7", + "@inquirer/core": "^10.2.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1390,15 +1485,15 @@ } }, "node_modules/@inquirer/select": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.3.tgz", - "integrity": "sha512-OAGhXU0Cvh0PhLz9xTF/kx6g6x+sP+PcyTiLvCrewI99P3BBeexD+VbuwkNDvqGkk3y2h5ZiWLeRP7BFlhkUDg==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz", + "integrity": "sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.13", - "@inquirer/figures": "^1.0.12", - "@inquirer/type": "^3.0.7", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1414,9 +1509,9 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.7.tgz", - "integrity": "sha512-PfunHQcjwnju84L+ycmcMKB/pTPIngjUJvfnRhKY6FKPuYXlM4aQCb/nIdTFR6BEhMjFvngzvng/vBAJMZpLSA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", "license": "MIT", "engines": { "node": ">=18" @@ -1472,9 +1567,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -1485,9 +1580,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -1523,9 +1618,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -1579,18 +1674,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -1603,27 +1694,17 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -1632,9 +1713,9 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.52.10", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.52.10.tgz", - "integrity": "sha512-LhKytJM5ZJkbHQVfW/3o747rZUNs/MGg6j/wt/9qwwqEOfvUDTYXXxIBuMgrRXhJ528p41iyz4zjBVHZU74Odg==", + "version": "7.52.13", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.52.13.tgz", + "integrity": "sha512-K6/bBt8zZfn9yc06gNvA+/NlBGJC/iJlObpdufXHEJtqcD4Dln4ITCLZpwP3DNZ5NyBFeTkKdv596go3V72qlA==", "dev": true, "license": "MIT", "dependencies": { @@ -1643,8 +1724,8 @@ "@microsoft/tsdoc-config": "~0.17.1", "@rushstack/node-core-library": "5.14.0", "@rushstack/rig-package": "0.5.3", - "@rushstack/terminal": "0.15.4", - "@rushstack/ts-command-line": "5.0.2", + "@rushstack/terminal": "0.16.0", + "@rushstack/ts-command-line": "5.0.3", "lodash": "~4.17.15", "minimatch": "10.0.3", "resolve": "~1.22.1", @@ -1681,22 +1762,6 @@ "node": ">=10" } }, - "node_modules/@microsoft/api-extractor/node_modules/minimatch": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", - "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", - "dev": true, - "license": "ISC", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@microsoft/api-extractor/node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -1825,9 +1890,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", - "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.2.tgz", + "integrity": "sha512-uLN8NAiFVIRKX9ZQha8wy6UUs06UNSZ32xj6giK/rmMXAgKahwExvK6SsmgU5/brh4w/nSgj8e0k3c1HBQpa0A==", "cpu": [ "arm" ], @@ -1839,9 +1904,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", - "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.2.tgz", + "integrity": "sha512-oEouqQk2/zxxj22PNcGSskya+3kV0ZKH+nQxuCCOGJ4oTXBdNTbv+f/E3c74cNLeMO1S5wVWacSws10TTSB77g==", "cpu": [ "arm64" ], @@ -1853,9 +1918,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", - "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.2.tgz", + "integrity": "sha512-OZuTVTpj3CDSIxmPgGH8en/XtirV5nfljHZ3wrNwvgkT5DQLhIKAeuFSiwtbMto6oVexV0k1F1zqURPKf5rI1Q==", "cpu": [ "arm64" ], @@ -1867,9 +1932,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", - "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.2.tgz", + "integrity": "sha512-Wa/Wn8RFkIkr1vy1k1PB//VYhLnlnn5eaJkfTQKivirOvzu5uVd2It01ukeQstMursuz7S1bU+8WW+1UPXpa8A==", "cpu": [ "x64" ], @@ -1881,9 +1946,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", - "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.2.tgz", + "integrity": "sha512-QkzxvH3kYN9J1w7D1A+yIMdI1pPekD+pWx7G5rXgnIlQ1TVYVC6hLl7SOV9pi5q9uIDF9AuIGkuzcbF7+fAhow==", "cpu": [ "arm64" ], @@ -1895,9 +1960,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", - "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.2.tgz", + "integrity": "sha512-dkYXB0c2XAS3a3jmyDkX4Jk0m7gWLFzq1C3qUnJJ38AyxIF5G/dyS4N9B30nvFseCfgtCEdbYFhk0ChoCGxPog==", "cpu": [ "x64" ], @@ -1909,9 +1974,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", - "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.2.tgz", + "integrity": "sha512-9VlPY/BN3AgbukfVHAB8zNFWB/lKEuvzRo1NKev0Po8sYFKx0i+AQlCYftgEjcL43F2h9Ui1ZSdVBc4En/sP2w==", "cpu": [ "arm" ], @@ -1923,9 +1988,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", - "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.2.tgz", + "integrity": "sha512-+GdKWOvsifaYNlIVf07QYan1J5F141+vGm5/Y8b9uCZnG/nxoGqgCmR24mv0koIWWuqvFYnbURRqw1lv7IBINw==", "cpu": [ "arm" ], @@ -1937,9 +2002,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", - "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.2.tgz", + "integrity": "sha512-df0Eou14ojtUdLQdPFnymEQteENwSJAdLf5KCDrmZNsy1c3YaCNaJvYsEUHnrg+/DLBH612/R0xd3dD03uz2dg==", "cpu": [ "arm64" ], @@ -1951,9 +2016,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", - "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.2.tgz", + "integrity": "sha512-iPeouV0UIDtz8j1YFR4OJ/zf7evjauqv7jQ/EFs0ClIyL+by++hiaDAfFipjOgyz6y6xbDvJuiU4HwpVMpRFDQ==", "cpu": [ "arm64" ], @@ -1964,10 +2029,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", - "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.50.2.tgz", + "integrity": "sha512-OL6KaNvBopLlj5fTa5D5bau4W82f+1TyTZRr2BdnfsrnQnmdxh4okMxR2DcDkJuh4KeoQZVuvHvzuD/lyLn2Kw==", "cpu": [ "loong64" ], @@ -1978,10 +2043,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", - "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.2.tgz", + "integrity": "sha512-I21VJl1w6z/K5OTRl6aS9DDsqezEZ/yKpbqlvfHbW0CEF5IL8ATBMuUx6/mp683rKTK8thjs/0BaNrZLXetLag==", "cpu": [ "ppc64" ], @@ -1993,9 +2058,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", - "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.2.tgz", + "integrity": "sha512-Hq6aQJT/qFFHrYMjS20nV+9SKrXL2lvFBENZoKfoTH2kKDOJqff5OSJr4x72ZaG/uUn+XmBnGhfr4lwMRrmqCQ==", "cpu": [ "riscv64" ], @@ -2007,9 +2072,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", - "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.2.tgz", + "integrity": "sha512-82rBSEXRv5qtKyr0xZ/YMF531oj2AIpLZkeNYxmKNN6I2sVE9PGegN99tYDLK2fYHJITL1P2Lgb4ZXnv0PjQvw==", "cpu": [ "riscv64" ], @@ -2021,9 +2086,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", - "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.2.tgz", + "integrity": "sha512-4Q3S3Hy7pC6uaRo9gtXUTJ+EKo9AKs3BXKc2jYypEcMQ49gDPFU2P1ariX9SEtBzE5egIX6fSUmbmGazwBVF9w==", "cpu": [ "s390x" ], @@ -2035,9 +2100,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", - "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.2.tgz", + "integrity": "sha512-9Jie/At6qk70dNIcopcL4p+1UirusEtznpNtcq/u/C5cC4HBX7qSGsYIcG6bdxj15EYWhHiu02YvmdPzylIZlA==", "cpu": [ "x64" ], @@ -2049,9 +2114,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", - "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.2.tgz", + "integrity": "sha512-HPNJwxPL3EmhzeAnsWQCM3DcoqOz3/IC6de9rWfGR8ZCuEHETi9km66bH/wG3YH0V3nyzyFEGUZeL5PKyy4xvw==", "cpu": [ "x64" ], @@ -2062,10 +2127,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.2.tgz", + "integrity": "sha512-nMKvq6FRHSzYfKLHZ+cChowlEkR2lj/V0jYj9JnGUVPL2/mIeFGmVM2mLaFeNa5Jev7W7TovXqXIG2d39y1KYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", - "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.2.tgz", + "integrity": "sha512-eFUvvnTYEKeTyHEijQKz81bLrUQOXKZqECeiWH6tb8eXXbZk+CXSG2aFrig2BQ/pjiVRj36zysjgILkqarS2YA==", "cpu": [ "arm64" ], @@ -2077,9 +2156,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", - "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.2.tgz", + "integrity": "sha512-cBaWmXqyfRhH8zmUxK3d3sAhEWLrtMjWBRwdMMHJIXSjvjLKvv49adxiEz+FJ8AP90apSDDBx2Tyd/WylV6ikA==", "cpu": [ "ia32" ], @@ -2091,9 +2170,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", - "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.2.tgz", + "integrity": "sha512-APwKy6YUhvZaEoHyM+9xqmTpviEI+9eL7LoCH+aLcvWYHJ663qG5zx7WzWZY+a9qkg5JtzcMyJ9z0WtQBMDmgA==", "cpu": [ "x64" ], @@ -2194,9 +2273,9 @@ } }, "node_modules/@rushstack/terminal": { - "version": "0.15.4", - "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.15.4.tgz", - "integrity": "sha512-OQSThV0itlwVNHV6thoXiAYZlQh4Fgvie2CzxFABsbO2MWQsI4zOh3LRNigYSTrmS+ba2j0B3EObakPzf/x6Zg==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.16.0.tgz", + "integrity": "sha512-WEvNuKkoR1PXorr9SxO0dqFdSp1BA+xzDrIm/Bwlc5YHg2FFg6oS+uCTYjerOhFuqCW+A3vKBm6EmKWSHfgx/A==", "dev": true, "license": "MIT", "dependencies": { @@ -2212,80 +2291,54 @@ } } }, - "node_modules/@rushstack/terminal/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/@rushstack/ts-command-line": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-5.0.2.tgz", - "integrity": "sha512-+AkJDbu1GFMPIU8Sb7TLVXDv/Q7Mkvx+wAjEl8XiXVVq+p1FmWW6M3LYpJMmoHNckSofeMecgWg5lfMwNAAsEQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-5.0.3.tgz", + "integrity": "sha512-bgPhQEqLVv/2hwKLYv/XvsTWNZ9B/+X1zJ7WgQE9rO5oiLzrOZvkIW4pk13yOQBhHyjcND5qMOa6p83t+Z66iQ==", "dev": true, "license": "MIT", "dependencies": { - "@rushstack/terminal": "0.15.4", + "@rushstack/terminal": "0.16.0", "@types/argparse": "1.0.38", "argparse": "~1.0.9", "string-argv": "~0.3.1" } }, - "node_modules/@rushstack/ts-command-line/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.4.2.tgz", - "integrity": "sha512-zcZKMnNndgRa3ORja6Iemsr3DrLtkX3cAF7lTJkdMB6v9alhlBsX9uNiCpqofNrXOvpA3h6lHcLJxgCIhVOU5Q==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.12.2.tgz", + "integrity": "sha512-hozwnFHsLvujK4/CPVHNo3Bcg2EsnG8krI/ZQ2FlBlCRpPZW4XAEQmEwqegJsypsTAN9ehu2tEYe30lYKSZW/w==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.4.2", + "@shikijs/types": "3.12.2", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.4.2.tgz", - "integrity": "sha512-H6azIAM+OXD98yztIfs/KH5H4PU39t+SREhmM8LaNXyUrqj2mx+zVkr8MWYqjceSjDw9I1jawm1WdFqU806rMA==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.12.2.tgz", + "integrity": "sha512-bVx5PfuZHDSHoBal+KzJZGheFuyH4qwwcwG/n+MsWno5cTlKmaNtTsGzJpHYQ8YPbB5BdEdKU1rga5/6JGY8ww==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.4.2" + "@shikijs/types": "3.12.2" } }, "node_modules/@shikijs/themes": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.4.2.tgz", - "integrity": "sha512-qAEuAQh+brd8Jyej2UDDf+b4V2g1Rm8aBIdvt32XhDPrHvDkEnpb7Kzc9hSuHUxz0Iuflmq7elaDuQAP9bHIhg==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.12.2.tgz", + "integrity": "sha512-fTR3QAgnwYpfGczpIbzPjlRnxyONJOerguQv1iwpyQZ9QXX4qy/XFQqXlf17XTsorxnHoJGbH/LXBvwtqDsF5A==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.4.2" + "@shikijs/types": "3.12.2" } }, "node_modules/@shikijs/types": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.4.2.tgz", - "integrity": "sha512-zHC1l7L+eQlDXLnxvM9R91Efh2V4+rN3oMVS2swCBssbj2U/FBwybD1eeLaq8yl/iwT+zih8iUbTBCgGZOYlVg==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.12.2.tgz", + "integrity": "sha512-K5UIBzxCyv0YoxN3LMrKB9zuhp1bV+LgewxuVwHdl4Gz5oePoUFrr9EfgJlGlDeXCU1b/yhdnXeuRvAnz8HN8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2319,10 +2372,27 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2351,13 +2421,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.7.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.9.tgz", - "integrity": "sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==", + "version": "22.12.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz", + "integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==", "devOptional": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.20.0" } }, "node_modules/@types/prettier": { @@ -2527,9 +2597,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2625,9 +2695,9 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.3.0.tgz", - "integrity": "sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.27.1", @@ -2656,50 +2726,6 @@ "node": ">=20.0.0" } }, - "node_modules/@typespec/compiler/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@typespec/compiler/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@typespec/compiler/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@typespec/compiler/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "license": "MIT" - }, "node_modules/@typespec/compiler/node_modules/prettier": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", @@ -2715,180 +2741,104 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/@typespec/compiler/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "node_modules/@typespec/events": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, + "peer": true, "engines": { - "node": ">=18" + "node": ">=20.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@typespec/compiler": "^1.4.0" } }, - "node_modules/@typespec/compiler/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/@typespec/http": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, "engines": { - "node": ">=12" + "node": ">=20.0.0" }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" + }, + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } + } + }, + "node_modules/@typespec/http-client-csharp": { + "version": "1.0.0-alpha.20250912.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250912.2.tgz", + "integrity": "sha512-N3rMrsOj1jXw8dMBCvcNelLEGw+y3divFUAgYOMLM+1xYYhs34525MS7z2L8k2wLv81crW40BwRC7OzQnDjeDQ==", + "license": "MIT", + "peerDependencies": { + "@azure-tools/typespec-client-generator-core": ">=0.60.0 < 0.61.0 || ~0.61.0-0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/streams": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/versioning": ">=0.74.0 <0.75.0 || ~0.75.0-0" } }, - "node_modules/@typespec/compiler/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "node_modules/@typespec/http-specs": { + "version": "0.1.0-alpha.26", + "resolved": "https://registry.npmjs.org/@typespec/http-specs/-/http-specs-0.1.0-alpha.26.tgz", + "integrity": "sha512-Mhsn6kwj0VU1AMCObuieVDlxGJ49wW8cXTb0E8WNz72CB3R/+ZKKp9Wg/wYrfJurbFEKNBiPu/WWdVJrXWV8Bg==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" + "@typespec/spec-api": "^0.1.0-alpha.9", + "@typespec/spector": "^0.1.0-alpha.18", + "deep-equal": "^2.2.0" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@typespec/compiler/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/compiler/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/events": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.73.0.tgz", - "integrity": "sha512-etlhp86amDaElD/UX27u9I4O58zREov73HkkV3xbdTWpv2RqOKyD3mkyGAWsW3hKaGVIxwHOvKcOZ2j+b07Gpw==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=20.0.0" + "node": ">=16.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" - } - }, - "node_modules/@typespec/http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.3.0.tgz", - "integrity": "sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw==", - "license": "MIT", - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/streams": "^0.73.0" - }, - "peerDependenciesMeta": { - "@typespec/streams": { - "optional": true - } - } - }, - "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250903.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250903.1.tgz", - "integrity": "sha512-W3vbpxUhVJYBSoYPE4seMsDp/nvcqEwxsuYjVxBWMDliOOtO8ED05PYLvY5N4h+vKF2j30iT2d23NqpPo2qxeA==", - "license": "MIT", - "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/streams": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/versioning": ">=0.73.0 <0.74.0 || ~0.74.0-0" - } - }, - "node_modules/@typespec/http-specs": { - "version": "0.1.0-alpha.25", - "resolved": "https://registry.npmjs.org/@typespec/http-specs/-/http-specs-0.1.0-alpha.25.tgz", - "integrity": "sha512-3/3uMaWSLjc5wP0gT5K8O7s0bgW/6dJiFpKhFR1HT7y8/rFguVRVXRn/SC43F00ADjE3VVlxWqeSeYK59uuAHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.8", - "@typespec/spector": "^0.1.0-alpha.17", - "deep-equal": "^2.2.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@typespec/openapi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.3.0.tgz", - "integrity": "sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/rest": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.73.0.tgz", - "integrity": "sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/spec-api": { - "version": "0.1.0-alpha.8", - "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.8.tgz", - "integrity": "sha512-WEnnx/Ts53wruj8WL5oR/aAFxTO2gkb8uzhdjZtiGkEy2iJGTus/bETh+aIIzRcoTJ3+o8JucrTvAUMauCOICQ==", + "version": "0.1.0-alpha.9", + "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.9.tgz", + "integrity": "sha512-EOJYl7z8F8cdZnnJdXOhRSePZ/k4z7q8G7CD/byHB5Esu/gAs1jDh9mSDU837Rszt0ABaYmexRwn8NOlFvusZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2901,52 +2851,52 @@ } }, "node_modules/@typespec/spec-coverage-sdk": { - "version": "0.1.0-alpha.9", - "resolved": "https://registry.npmjs.org/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.9.tgz", - "integrity": "sha512-8L2c2r9Z7wrChaAyuuo9Ix3++urtjoyfLTvxRd8PNWJLL8nPYAmetDngmSg3J4Sfxq4nHP5pxIIVBG0axFiGwA==", + "version": "0.1.0-alpha.10", + "resolved": "https://registry.npmjs.org/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.10.tgz", + "integrity": "sha512-WmXT8FAsWfsBHR5POQ8hpuKqGR1J+hrERl0FypRGFmPmVwrHOH1ATsv6JLeLEVjpbTWfy00Ly/7b7oVJOfCLPw==", "dev": true, "license": "MIT", "dependencies": { - "@azure/identity": "~4.10.1", - "@azure/storage-blob": "~12.27.0", - "@types/node": "~24.1.0" + "@azure/identity": "~4.11.1", + "@azure/storage-blob": "~12.28.0", + "@types/node": "~24.3.0" }, "engines": { "node": ">=16.0.0" } }, "node_modules/@typespec/spec-coverage-sdk/node_modules/@types/node": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", - "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "version": "24.3.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.3.tgz", + "integrity": "sha512-GKBNHjoNw3Kra1Qg5UXttsY5kiWMEfoHq2TmXb+b1rcm6N7B3wTrFYIf/oSZ1xNQ+hVVijgLkiDZh7jRRsh+Gw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.10.0" } }, "node_modules/@typespec/spec-coverage-sdk/node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", "dev": true, "license": "MIT" }, "node_modules/@typespec/spector": { - "version": "0.1.0-alpha.17", - "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.17.tgz", - "integrity": "sha512-N1jfnrOKUlm09cuZ9W54gRVfoti7D36+hs/FaOlgXrFMjpFzBydkHY005CpgsdBJhSZN/ae1rizdZ5dkJpN6Aw==", + "version": "0.1.0-alpha.18", + "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.18.tgz", + "integrity": "sha512-DwKUkqkMwfAnDnycDG6GrS9z+24EI/AqnY+bQX9otcbDa+d21RYacKOG70Epjc5aF1T8D/MN4BDOjl8JIHUtvg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/identity": "~4.10.1", + "@azure/identity": "~4.11.1", "@types/js-yaml": "^4.0.5", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/spec-api": "^0.1.0-alpha.8", - "@typespec/spec-coverage-sdk": "^0.1.0-alpha.9", - "@typespec/versioning": "^0.73.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/spec-api": "^0.1.0-alpha.9", + "@typespec/spec-coverage-sdk": "^0.1.0-alpha.10", + "@typespec/versioning": "^0.74.0", "ajv": "~8.17.1", "body-parser": "^2.2.0", "deep-equal": "^2.2.0", @@ -2968,167 +2918,39 @@ "node": ">=16.0.0" } }, - "node_modules/@typespec/spector/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@typespec/spector/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typespec/spector/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@typespec/spector/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/spector/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, "node_modules/@typespec/sse": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.73.0.tgz", - "integrity": "sha512-WTnRJ1b1M3RPzlHxhnK9sh6+AGKPKWpuA0TSAqzyxb/uRHFYLNeoDKPOnlQ749SJ8lJz71Oh0nUsP3vB0EzO6Q==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" } }, "node_modules/@typespec/streams": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.73.0.tgz", - "integrity": "sha512-pL4xffHXEIhBQKPlB9L4AKuM0bn44WsGKjnz91wa6wBtP/CbsPrGQicof0Z7GPGdddtDi4G8PWGmJtVFw53V9g==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/ts-http-runtime": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.0.tgz", - "integrity": "sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.1.tgz", + "integrity": "sha512-SnbaqayTVFEA6/tYumdF0UmybY0KHyKwGPBXnyckFlrrKdhWFrL3a2HIPXHjht5ZOElKGcXfD2D63P36btb+ww==", "dev": true, "license": "MIT", "dependencies": { @@ -3141,20 +2963,20 @@ } }, "node_modules/@typespec/tspd": { - "version": "0.72.2", - "resolved": "https://registry.npmjs.org/@typespec/tspd/-/tspd-0.72.2.tgz", - "integrity": "sha512-rDj0wVpE4ypHaTCdqbmkxIo5PrDxY80YZ4bBKuGN3gXDMLn5J6mMyHQVeJ+MXGY+p0xBN3VlgpllDiRDHNK9VQ==", + "version": "0.73.0", + "resolved": "https://registry.npmjs.org/@typespec/tspd/-/tspd-0.73.0.tgz", + "integrity": "sha512-2Zk0XHpSrVak06c2JoUMMWLt/6bXMEmTbqVR7i4EPftvWCJepJrA8jw0MokAksX9Q+Qh6fn3oEE2w5huZHyp6Q==", "dev": true, "license": "MIT", "dependencies": { - "@alloy-js/core": "^0.19.0", - "@alloy-js/markdown": "^0.19.0", - "@alloy-js/typescript": "^0.19.0", + "@alloy-js/core": "^0.20.0", + "@alloy-js/markdown": "^0.20.0", + "@alloy-js/typescript": "^0.20.0", "@microsoft/api-extractor": "^7.52.1", "@microsoft/api-extractor-model": "^7.30.6", "@microsoft/tsdoc": "^0.15.1", "@microsoft/tsdoc-config": "^0.17.1", - "@typespec/compiler": "^1.3.0", + "@typespec/compiler": "^1.4.0", "picocolors": "~1.1.1", "prettier": "~3.6.2", "typedoc": "^0.28.1", @@ -3169,54 +2991,6 @@ "node": ">=20.0.0" } }, - "node_modules/@typespec/tspd/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@typespec/tspd/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, - "license": "MIT" - }, "node_modules/@typespec/tspd/node_modules/prettier": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", @@ -3233,109 +3007,29 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/@typespec/tspd/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@typespec/tspd/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/tspd/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, "node_modules/@typespec/versioning": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.73.0.tgz", - "integrity": "sha512-cfFvzTsvsu4VpdwZcRULr3p/fawKZnjiJClQxlLcYW0dLs/5k5jh7l0YyPkYvgkOcncUrIB6hIu82tQhKrMDKQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/xml": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.73.0.tgz", - "integrity": "sha512-vlMM8/L22O/PbI3ovj3qoww/3Z8wNwn7og4jzlGRM93jZBJvrOeDSwZo1Dc4rMJyU6KfjPkP3/l5TLbgW8x0zA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@ungap/structured-clone": { @@ -3346,15 +3040,16 @@ "license": "ISC" }, "node_modules/@vitest/coverage-v8": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.1.4.tgz", - "integrity": "sha512-G4p6OtioySL+hPV7Y6JHlhpsODbJzt1ndwHAFkyk6vVjpK03PFsKnauZIzcd0PrK4zAbc5lc+jeZ+eNGiMA+iw==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.4.tgz", + "integrity": "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^1.0.2", - "debug": "^4.4.0", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", @@ -3369,8 +3064,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "3.1.4", - "vitest": "3.1.4" + "@vitest/browser": "3.2.4", + "vitest": "3.2.4" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -3379,14 +3074,15 @@ } }, "node_modules/@vitest/expect": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.4.tgz", - "integrity": "sha512-xkD/ljeliyaClDYqHPNCiJ0plY5YIcM0OlRiZizLhlPmpXWpxnGMyTZXOHFhFeG7w9P5PBeL4IdtJ/HeQwTbQA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -3395,13 +3091,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.4.tgz", - "integrity": "sha512-8IJ3CvwtSw/EFXqWFL8aCMu+YyYXG2WUSrQbViOZkWTKTVicVwZ/YiEZDSqD00kX+v/+W+OnxhNWoeVKorHygA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.4", + "@vitest/spy": "3.2.4", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -3410,7 +3106,7 @@ }, "peerDependencies": { "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0" + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "peerDependenciesMeta": { "msw": { @@ -3422,9 +3118,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.4.tgz", - "integrity": "sha512-cqv9H9GvAEoTaoq+cYqUTCGscUjKqlJZC7PRwY5FMySVj5J+xOm1KQcCiYHJOEzOKRUhLH4R2pTwvFlWCEScsg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", "dev": true, "license": "MIT", "dependencies": { @@ -3435,27 +3131,28 @@ } }, "node_modules/@vitest/runner": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.4.tgz", - "integrity": "sha512-djTeF1/vt985I/wpKVFBMWUlk/I7mb5hmD5oP8K9ACRmVXgKTae3TUOtXAEBfslNKPzUQvnKhNd34nnRSYgLNQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.4", - "pathe": "^2.0.3" + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.4.tgz", - "integrity": "sha512-JPHf68DvuO7vilmvwdPr9TS0SuuIzHvxeaCkxYcCD4jTk67XwL45ZhEHFKIuCm8CYstgI6LZ4XbwD6ANrwMpFg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.4", + "@vitest/pretty-format": "3.2.4", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -3464,49 +3161,49 @@ } }, "node_modules/@vitest/spy": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.4.tgz", - "integrity": "sha512-Xg1bXhu+vtPXIodYN369M86K8shGLouNjoVI78g8iAq2rFoHFdajNvJJ5A/9bPMFcfQqdaCpOgWKEoMQg/s0Yg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.2" + "tinyspy": "^4.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/ui": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.1.4.tgz", - "integrity": "sha512-CFc2Bpb3sz4Sdt53kdNGq+qZKLftBwX4qZLC03CBUc0N1LJrOoL0ZeK0oq/708mtnpwccL0BZCY9d1WuiBSr7Q==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.2.4.tgz", + "integrity": "sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.4", + "@vitest/utils": "3.2.4", "fflate": "^0.8.2", "flatted": "^3.3.3", "pathe": "^2.0.3", "sirv": "^3.0.1", - "tinyglobby": "^0.2.13", + "tinyglobby": "^0.2.14", "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "3.1.4" + "vitest": "3.2.4" } }, "node_modules/@vitest/utils": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.4.tgz", - "integrity": "sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.4", - "loupe": "^3.1.3", + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" }, "funding": { @@ -3514,19 +3211,19 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.5.18", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.18.tgz", - "integrity": "sha512-x0vPO5Imw+3sChLM5Y+B6G1zPjwdOri9e8V21NnTnlEvkxatHEH5B5KEAJcjuzQ7BsjGrKtfzuQ5eQwXh8HXBg==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.21.tgz", + "integrity": "sha512-3ah7sa+Cwr9iiYEERt9JfZKPw4A2UlbY8RbbnH2mGCE8NwHkhmlZt2VsH0oDA3P08X3jJd29ohBDtX+TbD9AsA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/shared": "3.5.18" + "@vue/shared": "3.5.21" } }, "node_modules/@vue/shared": { - "version": "3.5.18", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.18.tgz", - "integrity": "sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.21.tgz", + "integrity": "sha512-+2k1EQpnYuVuu3N7atWyG3/xoFWIVJZq4Mz8XNOdScFI0etES75fbny/oU4lKWk/577P1zmg0ioYvpGEDZ3DLw==", "dev": true, "license": "MIT" }, @@ -3545,9 +3242,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -3626,21 +3323,6 @@ } } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -3673,11 +3355,14 @@ "license": "MIT" }, "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "Python-2.0" + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", @@ -3716,6 +3401,25 @@ "node": ">=12" } }, + "node_modules/ast-v8-to-istanbul": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.5.tgz", + "integrity": "sha512-9SdXjNheSiE8bALAQCQQuT6fgQaoxJh7IRYrRGZ8/9nv8WhJeC1aXAwN8TbaOssGOukUvyvnkgD9+Yuykvl1aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.30", + "estree-walker": "^3.0.3", + "js-tokens": "^9.0.1" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -3794,9 +3498,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -3902,6 +3606,58 @@ } } }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3973,9 +3729,9 @@ } }, "node_modules/chai": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", - "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", "dev": true, "license": "MIT", "dependencies": { @@ -3986,7 +3742,7 @@ "pathval": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/chalk": { @@ -4006,6 +3762,19 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/change-case": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", @@ -4013,9 +3782,9 @@ "license": "MIT" }, "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", "license": "MIT" }, "node_modules/check-error": { @@ -4063,33 +3832,93 @@ } }, "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -4202,9 +4031,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -4536,9 +4365,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", - "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4549,31 +4378,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.5", - "@esbuild/android-arm": "0.25.5", - "@esbuild/android-arm64": "0.25.5", - "@esbuild/android-x64": "0.25.5", - "@esbuild/darwin-arm64": "0.25.5", - "@esbuild/darwin-x64": "0.25.5", - "@esbuild/freebsd-arm64": "0.25.5", - "@esbuild/freebsd-x64": "0.25.5", - "@esbuild/linux-arm": "0.25.5", - "@esbuild/linux-arm64": "0.25.5", - "@esbuild/linux-ia32": "0.25.5", - "@esbuild/linux-loong64": "0.25.5", - "@esbuild/linux-mips64el": "0.25.5", - "@esbuild/linux-ppc64": "0.25.5", - "@esbuild/linux-riscv64": "0.25.5", - "@esbuild/linux-s390x": "0.25.5", - "@esbuild/linux-x64": "0.25.5", - "@esbuild/netbsd-arm64": "0.25.5", - "@esbuild/netbsd-x64": "0.25.5", - "@esbuild/openbsd-arm64": "0.25.5", - "@esbuild/openbsd-x64": "0.25.5", - "@esbuild/sunos-x64": "0.25.5", - "@esbuild/win32-arm64": "0.25.5", - "@esbuild/win32-ia32": "0.25.5", - "@esbuild/win32-x64": "0.25.5" + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" } }, "node_modules/escalade": { @@ -4726,6 +4556,19 @@ "dev": true, "license": "MIT" }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4821,9 +4664,9 @@ } }, "node_modules/expect-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", - "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4873,20 +4716,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4936,9 +4765,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", "funding": [ { "type": "github", @@ -5078,9 +4907,22 @@ }, "engines": { "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flat-cache/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, "node_modules/flat-cache/node_modules/rimraf": { @@ -5161,9 +5003,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz", - "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", "dev": true, "license": "MIT", "dependencies": { @@ -5227,9 +5069,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", - "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "license": "MIT", "engines": { "node": ">=18" @@ -5278,15 +5120,15 @@ } }, "node_modules/glob": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz", - "integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", "dev": true, "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -5314,32 +5156,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -5356,19 +5172,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globby": { "version": "14.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", @@ -5390,9 +5193,9 @@ } }, "node_modules/globby/node_modules/ignore": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", - "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "license": "MIT", "engines": { "node": ">= 4" @@ -5566,15 +5369,19 @@ } }, "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ignore": { @@ -6083,6 +5890,19 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/istanbul-lib-source-maps": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", @@ -6099,9 +5919,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6154,6 +5974,13 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -6175,9 +6002,9 @@ "license": "MIT" }, "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "dev": true, "license": "MIT", "dependencies": { @@ -6347,16 +6174,16 @@ "license": "MIT" }, "node_modules/loupe": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", - "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", "dev": true, "license": "MIT" }, "node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz", + "integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==", "dev": true, "license": "ISC", "engines": { @@ -6371,13 +6198,13 @@ "license": "MIT" }, "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/magicast": { @@ -6426,6 +6253,13 @@ "markdown-it": "bin/markdown-it.mjs" } }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -6512,16 +6346,19 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "@isaacs/brace-expansion": "^5.0.0" }, "engines": { - "node": "*" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -6893,15 +6730,6 @@ "node": ">= 0.8.0" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -7019,13 +6847,14 @@ } }, "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=16" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/path-type": { @@ -7048,9 +6877,9 @@ "license": "MIT" }, "node_modules/pathval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", - "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", "dev": true, "license": "MIT", "engines": { @@ -7095,9 +6924,9 @@ } }, "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, "funding": [ { @@ -7115,7 +6944,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -7230,32 +7059,19 @@ } }, "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.1.tgz", + "integrity": "sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==", "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.6.3", + "iconv-lite": "0.7.0", "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, "node_modules/readable-stream": { @@ -7375,13 +7191,13 @@ } }, "node_modules/rollup": { - "version": "4.41.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", - "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", + "version": "4.50.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.2.tgz", + "integrity": "sha512-BgLRGy7tNS9H66aIMASq1qSYbAAJV6Z6WR4QYTvj5FgF15rZ/ympT1uixHXwzbZUBDbkvqUI1KR0fH1FhMaQ9w==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.7" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -7391,26 +7207,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.1", - "@rollup/rollup-android-arm64": "4.41.1", - "@rollup/rollup-darwin-arm64": "4.41.1", - "@rollup/rollup-darwin-x64": "4.41.1", - "@rollup/rollup-freebsd-arm64": "4.41.1", - "@rollup/rollup-freebsd-x64": "4.41.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", - "@rollup/rollup-linux-arm-musleabihf": "4.41.1", - "@rollup/rollup-linux-arm64-gnu": "4.41.1", - "@rollup/rollup-linux-arm64-musl": "4.41.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-musl": "4.41.1", - "@rollup/rollup-linux-s390x-gnu": "4.41.1", - "@rollup/rollup-linux-x64-gnu": "4.41.1", - "@rollup/rollup-linux-x64-musl": "4.41.1", - "@rollup/rollup-win32-arm64-msvc": "4.41.1", - "@rollup/rollup-win32-ia32-msvc": "4.41.1", - "@rollup/rollup-win32-x64-msvc": "4.41.1", + "@rollup/rollup-android-arm-eabi": "4.50.2", + "@rollup/rollup-android-arm64": "4.50.2", + "@rollup/rollup-darwin-arm64": "4.50.2", + "@rollup/rollup-darwin-x64": "4.50.2", + "@rollup/rollup-freebsd-arm64": "4.50.2", + "@rollup/rollup-freebsd-x64": "4.50.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.2", + "@rollup/rollup-linux-arm-musleabihf": "4.50.2", + "@rollup/rollup-linux-arm64-gnu": "4.50.2", + "@rollup/rollup-linux-arm64-musl": "4.50.2", + "@rollup/rollup-linux-loong64-gnu": "4.50.2", + "@rollup/rollup-linux-ppc64-gnu": "4.50.2", + "@rollup/rollup-linux-riscv64-gnu": "4.50.2", + "@rollup/rollup-linux-riscv64-musl": "4.50.2", + "@rollup/rollup-linux-s390x-gnu": "4.50.2", + "@rollup/rollup-linux-x64-gnu": "4.50.2", + "@rollup/rollup-linux-x64-musl": "4.50.2", + "@rollup/rollup-openharmony-arm64": "4.50.2", + "@rollup/rollup-win32-arm64-msvc": "4.50.2", + "@rollup/rollup-win32-ia32-msvc": "4.50.2", + "@rollup/rollup-win32-x64-msvc": "4.50.2", "fsevents": "~2.3.2" } }, @@ -7432,9 +7249,9 @@ } }, "node_modules/run-applescript": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", - "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", "dev": true, "license": "MIT", "engines": { @@ -7730,9 +7547,9 @@ } }, "node_modules/sirv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", - "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", + "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", "dev": true, "license": "MIT", "dependencies": { @@ -7930,6 +7747,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/strnum": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", @@ -7944,16 +7781,19 @@ "license": "MIT" }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -8032,9 +7872,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8140,14 +7980,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -8157,11 +7997,14 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", - "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -8172,9 +8015,9 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -8185,9 +8028,9 @@ } }, "node_modules/tinypool": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", - "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", "dev": true, "license": "MIT", "engines": { @@ -8205,27 +8048,15 @@ } }, "node_modules/tinyspy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", - "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8292,9 +8123,10 @@ } }, "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -8326,17 +8158,17 @@ "license": "MIT" }, "node_modules/typedoc": { - "version": "0.28.5", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.5.tgz", - "integrity": "sha512-5PzUddaA9FbaarUzIsEc4wNXCiO4Ot3bJNeMF2qKpYlTmM9TTaSHQ7162w756ERCkXER/+o2purRG6YOAv6EMA==", + "version": "0.28.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.13.tgz", + "integrity": "sha512-dNWY8msnYB2a+7Audha+aTF1Pu3euiE7ySp53w8kEsXoYw7dMouV5A1UsTUY345aB152RHnmRMDiovuBi7BD+w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@gerrit0/mini-shiki": "^3.2.2", + "@gerrit0/mini-shiki": "^3.12.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "yaml": "^2.7.1" + "yaml": "^2.8.1" }, "bin": { "typedoc": "bin/typedoc" @@ -8346,13 +8178,13 @@ "pnpm": ">= 10" }, "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x" + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x" } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.6.3.tgz", - "integrity": "sha512-86oODyM2zajXwLs4Wok2mwVEfCwCnp756QyhLGX2IfsdRYr1DXLCgJgnLndaMUjJD7FBhnLk2okbNE9PdLxYRw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.8.1.tgz", + "integrity": "sha512-ug7fc4j0SiJxSwBGLncpSo8tLvrT9VONvPUQqQDTKPxCoFQBADLli832RGPtj6sfSVJebNSrHZQRUdEryYH/7g==", "dev": true, "license": "MIT", "engines": { @@ -8363,9 +8195,9 @@ } }, "node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8437,9 +8269,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "devOptional": true, "license": "MIT" }, @@ -8528,24 +8360,24 @@ } }, "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz", + "integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -8554,14 +8386,14 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", - "less": "*", + "less": "^4.0.0", "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" @@ -8603,17 +8435,17 @@ } }, "node_modules/vite-node": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.4.tgz", - "integrity": "sha512-6enNwYnpyDo4hEgytbmc6mYWHXDHYEn0D1/rw4Q+tnHUGtKTJsn8T1YkX6Q18wI5LCrS8CTYlBaiCqxOy2kvUA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.4.0", + "debug": "^4.4.1", "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0" + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" @@ -8626,11 +8458,14 @@ } }, "node_modules/vite/node_modules/fdir": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", - "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -8641,9 +8476,9 @@ } }, "node_modules/vite/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -8654,32 +8489,34 @@ } }, "node_modules/vitest": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.4.tgz", - "integrity": "sha512-Ta56rT7uWxCSJXlBtKgIlApJnT6e6IGmTYxYcmxjJ4ujuZDI59GUQgVDObXXJujOmPDBYXHK1qmaGtneu6TNIQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.1.4", - "@vitest/mocker": "3.1.4", - "@vitest/pretty-format": "^3.1.4", - "@vitest/runner": "3.1.4", - "@vitest/snapshot": "3.1.4", - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", "chai": "^5.2.0", - "debug": "^4.4.0", + "debug": "^4.4.1", "expect-type": "^1.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3", + "picomatch": "^4.0.2", "std-env": "^3.9.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.13", - "tinypool": "^1.0.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.1.4", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", "why-is-node-running": "^2.3.0" }, "bin": { @@ -8695,8 +8532,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.1.4", - "@vitest/ui": "3.1.4", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", "happy-dom": "*", "jsdom": "*" }, @@ -8724,6 +8561,19 @@ } } }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -8992,22 +8842,20 @@ } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { @@ -9020,6 +8868,65 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -9034,9 +8941,9 @@ } }, "node_modules/yoctocolors-cjs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", - "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", "license": "MIT", "engines": { "node": ">=18" diff --git a/eng/packages/http-client-csharp-mgmt/package.json b/eng/packages/http-client-csharp-mgmt/package.json index f5940d308210..6f13f863ada3 100644 --- a/eng/packages/http-client-csharp-mgmt/package.json +++ b/eng/packages/http-client-csharp-mgmt/package.json @@ -37,25 +37,25 @@ "dist/**" ], "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250903.2" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250912.2" }, "devDependencies": { - "@azure-tools/azure-http-specs": "0.1.0-alpha.25", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/azure-http-specs": "0.1.0-alpha.28", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@azure-tools/typespec-liftr-base": "0.8.0", "@eslint/js": "^9.2.0", - "@types/node": "~22.7.5", + "@types/node": "~22.12.0", "@types/prettier": "^2.6.3", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/http-specs": "0.1.0-alpha.25", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/tspd": "0.72.2", - "@typespec/versioning": "0.73.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/http-specs": "0.1.0-alpha.26", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/tspd": "0.73.0", + "@typespec/versioning": "0.74.0", "@vitest/coverage-v8": "^3.0.5", "@vitest/ui": "^3.0.5", "c8": "^10.1.2", diff --git a/eng/packages/http-client-csharp/docs/emitter.md b/eng/packages/http-client-csharp/.tspd/docs/emitter.md similarity index 99% rename from eng/packages/http-client-csharp/docs/emitter.md rename to eng/packages/http-client-csharp/.tspd/docs/emitter.md index 6ab89bf4fc83..c0312db7da71 100644 --- a/eng/packages/http-client-csharp/docs/emitter.md +++ b/eng/packages/http-client-csharp/.tspd/docs/emitter.md @@ -2,7 +2,7 @@ title: 'Emitter usage' --- -## Usage +## Emitter usage 1. Via the command line diff --git a/eng/packages/http-client-csharp/docs/index.mdx b/eng/packages/http-client-csharp/.tspd/docs/index.mdx similarity index 100% rename from eng/packages/http-client-csharp/docs/index.mdx rename to eng/packages/http-client-csharp/.tspd/docs/index.mdx diff --git a/eng/packages/http-client-csharp/.tspd/docs/usage.md b/eng/packages/http-client-csharp/.tspd/docs/usage.md new file mode 100644 index 000000000000..a9f4ea89e24e --- /dev/null +++ b/eng/packages/http-client-csharp/.tspd/docs/usage.md @@ -0,0 +1,8 @@ +### Prerequisite + +- Install [Node.js](https://nodejs.org/download/) 20 or above. (Verify by running `node --version`) +- Install [**.NET 8.0 SDK**](https://dotnet.microsoft.com/download/dotnet/8.0) for your specific platform. (or a higher version) + +### Customizing Generated Code + +For detailed instructions on how to customize the generated C# code, see the [Customization Guide](https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/.tspd/docs/customization.md). \ No newline at end of file diff --git a/eng/packages/http-client-csharp/README.md b/eng/packages/http-client-csharp/README.md index 034b6e24fc60..3ae441efebdf 100644 --- a/eng/packages/http-client-csharp/README.md +++ b/eng/packages/http-client-csharp/README.md @@ -10,6 +10,17 @@ npm install @azure-typespec/http-client-csharp ## Usage +### Prerequisite + +- Install [Node.js](https://nodejs.org/download/) 20 or above. (Verify by running `node --version`) +- Install [**.NET 8.0 SDK**](https://dotnet.microsoft.com/download/dotnet/8.0) for your specific platform. (or a higher version) + +### Customizing Generated Code + +For detailed instructions on how to customize the generated C# code, see the [Customization Guide](https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/.tspd/docs/customization.md). + +## Emitter usage + 1. Via the command line ```bash diff --git a/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 b/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 index 8a088f546765..14042efdc973 100644 --- a/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 +++ b/eng/packages/http-client-csharp/eng/scripts/Spector-Helper.psm1 @@ -13,6 +13,7 @@ $failingSpecs = @( Join-Path 'http' 'azure' 'resource-manager' 'operation-templates' Join-Path 'http' 'azure' 'resource-manager' 'resources' Join-Path 'http' 'azure' 'resource-manager' 'large-header' + Join-Path 'http' 'azure' 'resource-manager' 'method-subscription-id' ) function Capitalize-FirstLetter { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator.StubLibrary/src/AzureStubVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator.StubLibrary/src/AzureStubVisitor.cs index e18aed131b93..f5f122e7252e 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator.StubLibrary/src/AzureStubVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator.StubLibrary/src/AzureStubVisitor.cs @@ -80,7 +80,7 @@ private static bool IsCallingBaseCtor(ConstructorProvider constructor) protected override FieldProvider? VisitField(FieldProvider field) { // For ClientOptions, keep the non-public field as this currently represents the latest service version for a client. - return field.Modifiers.HasFlag(FieldModifiers.Public) || field.EnclosingType.Implements.Any(i => i.Equals(typeof(ClientOptions))) + return field.Modifiers.HasFlag(FieldModifiers.Public) || field.EnclosingType.BaseType?.Equals(typeof(ClientOptions)) == true ? field : null; } 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 6ff27a491d6a..af08e4eadb5b 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 @@ -1224,7 +1224,7 @@ { "$id": "131", "kind": "constant", - "name": "GetUnknownValueResponse6", + "name": "internalProtocolContentType", "namespace": "", "usage": "None", "valueType": { @@ -1234,13 +1234,13 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "Sunday", + "value": "application/json", "decorators": [] }, { "$id": "133", "kind": "constant", - "name": "internalProtocolContentType", + "name": "internalProtocolContentType1", "namespace": "", "usage": "None", "valueType": { @@ -1256,7 +1256,7 @@ { "$id": "135", "kind": "constant", - "name": "internalProtocolContentType1", + "name": "ListWithNextLinkContentType", "namespace": "", "usage": "None", "valueType": { @@ -1272,7 +1272,7 @@ { "$id": "137", "kind": "constant", - "name": "ListWithNextLinkContentType", + "name": "ListWithStringNextLinkContentType", "namespace": "", "usage": "None", "valueType": { @@ -1288,7 +1288,7 @@ { "$id": "139", "kind": "constant", - "name": "ListWithStringNextLinkContentType", + "name": "ListWithHeaderNextLinkContentType", "namespace": "", "usage": "None", "valueType": { @@ -1304,7 +1304,7 @@ { "$id": "141", "kind": "constant", - "name": "ListWithHeaderNextLinkContentType", + "name": "ListWithContinuationTokenContentType", "namespace": "", "usage": "None", "valueType": { @@ -1320,7 +1320,7 @@ { "$id": "143", "kind": "constant", - "name": "ListWithContinuationTokenContentType", + "name": "ListWithContinuationTokenHeaderResponseContentType", "namespace": "", "usage": "None", "valueType": { @@ -1336,27 +1336,11 @@ { "$id": "145", "kind": "constant", - "name": "ListWithContinuationTokenHeaderResponseContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "146", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "147", - "kind": "constant", "name": "ListWithPagingContentType", "namespace": "", "usage": "None", "valueType": { - "$id": "148", + "$id": "146", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1368,7 +1352,7 @@ ], "models": [ { - "$id": "149", + "$id": "147", "kind": "model", "name": "ThingModel", "namespace": "BasicTypeSpec", @@ -1378,13 +1362,13 @@ "decorators": [], "properties": [ { - "$id": "150", + "$id": "148", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ThingModel", "type": { - "$id": "151", + "$id": "149", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1404,29 +1388,29 @@ "isHttpMetadata": false }, { - "$id": "152", + "$id": "150", "kind": "property", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$id": "153", + "$id": "151", "kind": "union", "name": "ThingModelRequiredUnion", "variantTypes": [ { - "$id": "154", + "$id": "152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "155", + "$id": "153", "kind": "array", "name": "Array", "valueType": { - "$id": "156", + "$id": "154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1436,7 +1420,7 @@ "decorators": [] }, { - "$id": "157", + "$id": "155", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1460,7 +1444,7 @@ "isHttpMetadata": false }, { - "$id": "158", + "$id": "156", "kind": "property", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -1482,7 +1466,7 @@ "isHttpMetadata": false }, { - "$id": "159", + "$id": "157", "kind": "property", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -1504,7 +1488,7 @@ "isHttpMetadata": false }, { - "$id": "160", + "$id": "158", "kind": "property", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -1526,7 +1510,7 @@ "isHttpMetadata": false }, { - "$id": "161", + "$id": "159", "kind": "property", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -1548,7 +1532,7 @@ "isHttpMetadata": false }, { - "$id": "162", + "$id": "160", "kind": "property", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", @@ -1570,7 +1554,7 @@ "isHttpMetadata": false }, { - "$id": "163", + "$id": "161", "kind": "property", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", @@ -1592,7 +1576,7 @@ "isHttpMetadata": false }, { - "$id": "164", + "$id": "162", "kind": "property", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", @@ -1614,7 +1598,7 @@ "isHttpMetadata": false }, { - "$id": "165", + "$id": "163", "kind": "property", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -1636,13 +1620,13 @@ "isHttpMetadata": false }, { - "$id": "166", + "$id": "164", "kind": "property", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "167", + "$id": "165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1662,20 +1646,20 @@ "isHttpMetadata": false }, { - "$id": "168", + "$id": "166", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$id": "169", + "$id": "167", "kind": "nullable", "type": { - "$id": "170", + "$id": "168", "kind": "array", "name": "Array1", "valueType": { - "$id": "171", + "$id": "169", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1700,16 +1684,16 @@ "isHttpMetadata": false }, { - "$id": "172", + "$id": "170", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$id": "173", + "$id": "171", "kind": "nullable", "type": { - "$ref": "170" + "$ref": "168" }, "namespace": "BasicTypeSpec" }, @@ -1729,7 +1713,7 @@ ] }, { - "$id": "174", + "$id": "172", "kind": "model", "name": "RoundTripModel", "namespace": "BasicTypeSpec", @@ -1744,13 +1728,13 @@ ], "properties": [ { - "$id": "175", + "$id": "173", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "176", + "$id": "174", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1770,13 +1754,13 @@ "isHttpMetadata": false }, { - "$id": "177", + "$id": "175", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "178", + "$id": "176", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1796,13 +1780,13 @@ "isHttpMetadata": false }, { - "$id": "179", + "$id": "177", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "180", + "$id": "178", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -1825,16 +1809,16 @@ "isHttpMetadata": false }, { - "$id": "181", + "$id": "179", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "182", + "$id": "180", "kind": "dict", "keyType": { - "$id": "183", + "$id": "181", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1859,13 +1843,13 @@ "isHttpMetadata": false }, { - "$id": "184", + "$id": "182", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", "doc": "Required model", "type": { - "$ref": "149" + "$ref": "147" }, "optional": false, "readOnly": false, @@ -1881,7 +1865,7 @@ "isHttpMetadata": false }, { - "$id": "185", + "$id": "183", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", @@ -1903,13 +1887,13 @@ "isHttpMetadata": false }, { - "$id": "186", + "$id": "184", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "187", + "$id": "185", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -1932,7 +1916,7 @@ "isHttpMetadata": false }, { - "$id": "188", + "$id": "186", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", @@ -1954,7 +1938,7 @@ "isHttpMetadata": false }, { - "$id": "189", + "$id": "187", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "serializedName": "floatExtensibleEnumWithIntValue", @@ -1976,13 +1960,13 @@ "isHttpMetadata": false }, { - "$id": "190", + "$id": "188", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "191", + "$id": "189", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -2005,7 +1989,7 @@ "isHttpMetadata": false }, { - "$id": "192", + "$id": "190", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", @@ -2027,7 +2011,7 @@ "isHttpMetadata": false }, { - "$id": "193", + "$id": "191", "kind": "property", "name": "floatFixedEnumWithIntValue", "serializedName": "floatFixedEnumWithIntValue", @@ -2049,13 +2033,13 @@ "isHttpMetadata": false }, { - "$id": "194", + "$id": "192", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "195", + "$id": "193", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -2078,7 +2062,7 @@ "isHttpMetadata": false }, { - "$id": "196", + "$id": "194", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", @@ -2100,13 +2084,13 @@ "isHttpMetadata": false }, { - "$id": "197", + "$id": "195", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "198", + "$id": "196", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -2129,7 +2113,7 @@ "isHttpMetadata": false }, { - "$id": "199", + "$id": "197", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", @@ -2151,13 +2135,13 @@ "isHttpMetadata": false }, { - "$id": "200", + "$id": "198", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "201", + "$id": "199", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2177,13 +2161,13 @@ "isHttpMetadata": false }, { - "$id": "202", + "$id": "200", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "203", + "$id": "201", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2203,23 +2187,23 @@ "isHttpMetadata": false }, { - "$id": "204", + "$id": "202", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "205", + "$id": "203", "kind": "dict", "keyType": { - "$id": "206", + "$id": "204", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "207", + "$id": "205", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2241,13 +2225,13 @@ "isHttpMetadata": false }, { - "$id": "208", + "$id": "206", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "205" + "$ref": "203" }, "optional": true, "readOnly": false, @@ -2263,13 +2247,13 @@ "isHttpMetadata": false }, { - "$id": "209", + "$id": "207", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$ref": "205" + "$ref": "203" }, "optional": false, "readOnly": true, @@ -2285,13 +2269,13 @@ "isHttpMetadata": false }, { - "$id": "210", + "$id": "208", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$ref": "205" + "$ref": "203" }, "optional": true, "readOnly": true, @@ -2307,13 +2291,13 @@ "isHttpMetadata": false }, { - "$id": "211", + "$id": "209", "kind": "property", "name": "modelWithRequiredNullable", "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "212", + "$id": "210", "kind": "model", "name": "ModelWithRequiredNullableProperties", "namespace": "BasicTypeSpec", @@ -2323,16 +2307,16 @@ "decorators": [], "properties": [ { - "$id": "213", + "$id": "211", "kind": "property", "name": "requiredNullablePrimitive", "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "214", + "$id": "212", "kind": "nullable", "type": { - "$id": "215", + "$id": "213", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2354,13 +2338,13 @@ "isHttpMetadata": false }, { - "$id": "216", + "$id": "214", "kind": "property", "name": "requiredExtensibleEnum", "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "217", + "$id": "215", "kind": "nullable", "type": { "$ref": "6" @@ -2381,13 +2365,13 @@ "isHttpMetadata": false }, { - "$id": "218", + "$id": "216", "kind": "property", "name": "requiredFixedEnum", "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "219", + "$id": "217", "kind": "nullable", "type": { "$ref": "1" @@ -2423,13 +2407,13 @@ "isHttpMetadata": false }, { - "$id": "220", + "$id": "218", "kind": "property", "name": "requiredBytes", "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "221", + "$id": "219", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2452,10 +2436,10 @@ ] }, { - "$ref": "212" + "$ref": "210" }, { - "$id": "222", + "$id": "220", "kind": "model", "name": "FriendModel", "namespace": "BasicTypeSpec", @@ -2465,13 +2449,13 @@ "decorators": [], "properties": [ { - "$id": "223", + "$id": "221", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "224", + "$id": "222", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2493,7 +2477,7 @@ ] }, { - "$id": "225", + "$id": "223", "kind": "model", "name": "RenamedModel", "namespace": "BasicTypeSpec", @@ -2503,13 +2487,13 @@ "decorators": [], "properties": [ { - "$id": "226", + "$id": "224", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ModelWithClientName", "type": { - "$id": "227", + "$id": "225", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2531,7 +2515,7 @@ ] }, { - "$id": "228", + "$id": "226", "kind": "model", "name": "ReturnsAnonymousModelResponse", "namespace": "BasicTypeSpec", @@ -2541,7 +2525,7 @@ "properties": [] }, { - "$id": "229", + "$id": "227", "kind": "model", "name": "ListWithNextLinkResponse", "namespace": "BasicTypeSpec", @@ -2550,16 +2534,16 @@ "decorators": [], "properties": [ { - "$id": "230", + "$id": "228", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$id": "231", + "$id": "229", "kind": "array", "name": "ArrayThingModel", "valueType": { - "$ref": "149" + "$ref": "147" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2578,12 +2562,12 @@ "isHttpMetadata": false }, { - "$id": "232", + "$id": "230", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "233", + "$id": "231", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2605,7 +2589,7 @@ ] }, { - "$id": "234", + "$id": "232", "kind": "model", "name": "ListWithStringNextLinkResponse", "namespace": "BasicTypeSpec", @@ -2614,12 +2598,12 @@ "decorators": [], "properties": [ { - "$id": "235", + "$id": "233", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "231" + "$ref": "229" }, "optional": false, "readOnly": false, @@ -2635,12 +2619,12 @@ "isHttpMetadata": false }, { - "$id": "236", + "$id": "234", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "237", + "$id": "235", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2662,7 +2646,7 @@ ] }, { - "$id": "238", + "$id": "236", "kind": "model", "name": "ListWithHeaderNextLinkResponse", "namespace": "", @@ -2671,12 +2655,12 @@ "decorators": [], "properties": [ { - "$id": "239", + "$id": "237", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "231" + "$ref": "229" }, "optional": false, "readOnly": false, @@ -2694,7 +2678,7 @@ ] }, { - "$id": "240", + "$id": "238", "kind": "model", "name": "ListWithContinuationTokenResponse", "namespace": "BasicTypeSpec", @@ -2703,12 +2687,12 @@ "decorators": [], "properties": [ { - "$id": "241", + "$id": "239", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "231" + "$ref": "229" }, "optional": false, "readOnly": false, @@ -2724,12 +2708,12 @@ "isHttpMetadata": false }, { - "$id": "242", + "$id": "240", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "243", + "$id": "241", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2751,7 +2735,7 @@ ] }, { - "$id": "244", + "$id": "242", "kind": "model", "name": "ListWithContinuationTokenHeaderResponseResponse", "namespace": "", @@ -2760,12 +2744,12 @@ "decorators": [], "properties": [ { - "$id": "245", + "$id": "243", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "231" + "$ref": "229" }, "optional": false, "readOnly": false, @@ -2783,7 +2767,7 @@ ] }, { - "$id": "246", + "$id": "244", "kind": "model", "name": "PageThingModel", "namespace": "BasicTypeSpec", @@ -2792,12 +2776,12 @@ "decorators": [], "properties": [ { - "$id": "247", + "$id": "245", "kind": "property", "name": "items", "serializedName": "items", "type": { - "$ref": "231" + "$ref": "229" }, "optional": false, "readOnly": false, @@ -2817,14 +2801,14 @@ ], "clients": [ { - "$id": "248", + "$id": "246", "kind": "client", "name": "BasicTypeSpecClient", "namespace": "BasicTypeSpec", "doc": "This is a sample typespec project.", "methods": [ { - "$id": "249", + "$id": "247", "kind": "basic", "name": "sayHi", "accessibility": "public", @@ -2834,19 +2818,19 @@ ], "doc": "Return hi", "operation": { - "$id": "250", + "$id": "248", "name": "sayHi", "resourceName": "BasicTypeSpec", "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "251", + "$id": "249", "kind": "header", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "252", + "$id": "250", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2861,12 +2845,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.sayHi.headParameter" }, { - "$id": "253", + "$id": "251", "kind": "query", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "254", + "$id": "252", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2881,12 +2865,12 @@ "readOnly": false }, { - "$id": "255", + "$id": "253", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "256", + "$id": "254", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2901,7 +2885,7 @@ "readOnly": false }, { - "$id": "257", + "$id": "255", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -2923,7 +2907,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -2943,12 +2927,12 @@ }, "parameters": [ { - "$id": "258", + "$id": "256", "kind": "method", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "259", + "$id": "257", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2964,12 +2948,12 @@ "decorators": [] }, { - "$id": "260", + "$id": "258", "kind": "method", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "261", + "$id": "259", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2985,12 +2969,12 @@ "decorators": [] }, { - "$id": "262", + "$id": "260", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "263", + "$id": "261", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3006,7 +2990,7 @@ "decorators": [] }, { - "$id": "264", + "$id": "262", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -3025,7 +3009,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -3034,7 +3018,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.sayHi" }, { - "$id": "265", + "$id": "263", "kind": "basic", "name": "helloAgain", "accessibility": "public", @@ -3044,19 +3028,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "266", + "$id": "264", "name": "helloAgain", "resourceName": "BasicTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "267", + "$id": "265", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "268", + "$id": "266", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3071,7 +3055,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.p1" }, { - "$id": "269", + "$id": "267", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -3087,12 +3071,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.contentType" }, { - "$id": "270", + "$id": "268", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "271", + "$id": "269", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3110,7 +3094,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.p2" }, { - "$id": "272", + "$id": "270", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -3126,12 +3110,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain.accept" }, { - "$id": "273", + "$id": "271", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "174" + "$ref": "172" }, "isApiVersion": false, "contentTypes": [ @@ -3151,7 +3135,7 @@ 200 ], "bodyType": { - "$ref": "174" + "$ref": "172" }, "headers": [], "isErrorResponse": false, @@ -3174,12 +3158,12 @@ }, "parameters": [ { - "$id": "274", + "$id": "272", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "275", + "$id": "273", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3195,12 +3179,12 @@ "decorators": [] }, { - "$id": "276", + "$id": "274", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "174" + "$ref": "172" }, "location": "Body", "isApiVersion": false, @@ -3212,7 +3196,7 @@ "decorators": [] }, { - "$id": "277", + "$id": "275", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -3229,12 +3213,12 @@ "decorators": [] }, { - "$id": "278", + "$id": "276", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "279", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3250,7 +3234,7 @@ "decorators": [] }, { - "$id": "280", + "$id": "278", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -3269,7 +3253,7 @@ ], "response": { "type": { - "$ref": "174" + "$ref": "172" } }, "isOverride": false, @@ -3278,7 +3262,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain" }, { - "$id": "281", + "$id": "279", "kind": "basic", "name": "noContentType", "accessibility": "public", @@ -3288,19 +3272,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "282", + "$id": "280", "name": "noContentType", "resourceName": "BasicTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "283", + "$id": "281", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "284", + "$id": "282", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3315,12 +3299,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.p1" }, { - "$id": "285", + "$id": "283", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "286", + "$id": "284", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3338,7 +3322,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.p2" }, { - "$id": "287", + "$id": "285", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -3355,7 +3339,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.contentType" }, { - "$id": "288", + "$id": "286", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -3371,12 +3355,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType.accept" }, { - "$id": "289", + "$id": "287", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "174" + "$ref": "172" }, "isApiVersion": false, "contentTypes": [ @@ -3396,7 +3380,7 @@ 200 ], "bodyType": { - "$ref": "174" + "$ref": "172" }, "headers": [], "isErrorResponse": false, @@ -3419,12 +3403,12 @@ }, "parameters": [ { - "$id": "290", + "$id": "288", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "291", + "$id": "289", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3440,12 +3424,12 @@ "decorators": [] }, { - "$id": "292", + "$id": "290", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "174" + "$ref": "172" }, "location": "Body", "isApiVersion": false, @@ -3457,12 +3441,12 @@ "decorators": [] }, { - "$id": "293", + "$id": "291", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "294", + "$id": "292", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3478,7 +3462,7 @@ "decorators": [] }, { - "$id": "295", + "$id": "293", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -3496,7 +3480,7 @@ "decorators": [] }, { - "$id": "296", + "$id": "294", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -3515,7 +3499,7 @@ ], "response": { "type": { - "$ref": "174" + "$ref": "172" } }, "isOverride": false, @@ -3524,7 +3508,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType" }, { - "$id": "297", + "$id": "295", "kind": "basic", "name": "helloDemo2", "accessibility": "public", @@ -3534,14 +3518,14 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "298", + "$id": "296", "name": "helloDemo2", "resourceName": "BasicTypeSpec", "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "299", + "$id": "297", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -3563,7 +3547,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -3583,7 +3567,7 @@ }, "parameters": [ { - "$id": "300", + "$id": "298", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -3602,7 +3586,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -3611,7 +3595,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloDemo2" }, { - "$id": "301", + "$id": "299", "kind": "basic", "name": "createLiteral", "accessibility": "public", @@ -3621,14 +3605,14 @@ ], "doc": "Create with literal value", "operation": { - "$id": "302", + "$id": "300", "name": "createLiteral", "resourceName": "BasicTypeSpec", "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "303", + "$id": "301", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -3645,7 +3629,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral.contentType" }, { - "$id": "304", + "$id": "302", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -3661,12 +3645,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral.accept" }, { - "$id": "305", + "$id": "303", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "149" + "$ref": "147" }, "isApiVersion": false, "contentTypes": [ @@ -3686,7 +3670,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -3709,12 +3693,12 @@ }, "parameters": [ { - "$id": "306", + "$id": "304", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "149" + "$ref": "147" }, "location": "Body", "isApiVersion": false, @@ -3726,7 +3710,7 @@ "decorators": [] }, { - "$id": "307", + "$id": "305", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -3744,7 +3728,7 @@ "decorators": [] }, { - "$id": "308", + "$id": "306", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -3763,7 +3747,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -3772,7 +3756,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral" }, { - "$id": "309", + "$id": "307", "kind": "basic", "name": "helloLiteral", "accessibility": "public", @@ -3782,14 +3766,14 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "310", + "$id": "308", "name": "helloLiteral", "resourceName": "BasicTypeSpec", "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "311", + "$id": "309", "kind": "header", "name": "p1", "serializedName": "p1", @@ -3805,7 +3789,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral.p1" }, { - "$id": "312", + "$id": "310", "kind": "path", "name": "p2", "serializedName": "p2", @@ -3824,7 +3808,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral.p2" }, { - "$id": "313", + "$id": "311", "kind": "query", "name": "p3", "serializedName": "p3", @@ -3840,7 +3824,7 @@ "readOnly": false }, { - "$id": "314", + "$id": "312", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -3862,7 +3846,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -3882,7 +3866,7 @@ }, "parameters": [ { - "$id": "315", + "$id": "313", "kind": "method", "name": "p1", "serializedName": "p1", @@ -3899,7 +3883,7 @@ "decorators": [] }, { - "$id": "316", + "$id": "314", "kind": "method", "name": "p2", "serializedName": "p2", @@ -3916,7 +3900,7 @@ "decorators": [] }, { - "$id": "317", + "$id": "315", "kind": "method", "name": "p3", "serializedName": "p3", @@ -3933,7 +3917,7 @@ "decorators": [] }, { - "$id": "318", + "$id": "316", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -3952,7 +3936,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -3961,7 +3945,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral" }, { - "$id": "319", + "$id": "317", "kind": "basic", "name": "topAction", "accessibility": "public", @@ -3971,24 +3955,24 @@ ], "doc": "top level method", "operation": { - "$id": "320", + "$id": "318", "name": "topAction", "resourceName": "BasicTypeSpec", "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "321", + "$id": "319", "kind": "path", "name": "action", "serializedName": "action", "type": { - "$id": "322", + "$id": "320", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "323", + "$id": "321", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4009,7 +3993,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction.action" }, { - "$id": "324", + "$id": "322", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4031,7 +4015,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -4051,17 +4035,17 @@ }, "parameters": [ { - "$id": "325", + "$id": "323", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$id": "326", + "$id": "324", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "327", + "$id": "325", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4080,7 +4064,7 @@ "decorators": [] }, { - "$id": "328", + "$id": "326", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4099,7 +4083,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -4108,7 +4092,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction" }, { - "$id": "329", + "$id": "327", "kind": "basic", "name": "topAction2", "accessibility": "public", @@ -4118,14 +4102,14 @@ ], "doc": "top level method2", "operation": { - "$id": "330", + "$id": "328", "name": "topAction2", "resourceName": "BasicTypeSpec", "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "331", + "$id": "329", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4147,7 +4131,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -4167,7 +4151,7 @@ }, "parameters": [ { - "$id": "332", + "$id": "330", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4186,7 +4170,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -4195,7 +4179,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction2" }, { - "$id": "333", + "$id": "331", "kind": "basic", "name": "patchAction", "accessibility": "public", @@ -4205,14 +4189,14 @@ ], "doc": "top level patch", "operation": { - "$id": "334", + "$id": "332", "name": "patchAction", "resourceName": "BasicTypeSpec", "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "335", + "$id": "333", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -4229,7 +4213,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction.contentType" }, { - "$id": "336", + "$id": "334", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4245,12 +4229,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction.accept" }, { - "$id": "337", + "$id": "335", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "149" + "$ref": "147" }, "isApiVersion": false, "contentTypes": [ @@ -4270,7 +4254,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -4293,12 +4277,12 @@ }, "parameters": [ { - "$id": "338", + "$id": "336", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "149" + "$ref": "147" }, "location": "Body", "isApiVersion": false, @@ -4310,7 +4294,7 @@ "decorators": [] }, { - "$id": "339", + "$id": "337", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -4328,7 +4312,7 @@ "decorators": [] }, { - "$id": "340", + "$id": "338", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4347,7 +4331,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -4356,7 +4340,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction" }, { - "$id": "341", + "$id": "339", "kind": "basic", "name": "anonymousBody", "accessibility": "public", @@ -4366,14 +4350,14 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "342", + "$id": "340", "name": "anonymousBody", "resourceName": "BasicTypeSpec", "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "343", + "$id": "341", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -4390,7 +4374,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.contentType" }, { - "$id": "344", + "$id": "342", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4406,12 +4390,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody.accept" }, { - "$id": "345", + "$id": "343", "kind": "body", "name": "thingModel", "serializedName": "thingModel", "type": { - "$ref": "149" + "$ref": "147" }, "isApiVersion": false, "contentTypes": [ @@ -4431,7 +4415,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -4454,13 +4438,13 @@ }, "parameters": [ { - "$id": "346", + "$id": "344", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the ThingModel", "type": { - "$id": "347", + "$id": "345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4476,13 +4460,13 @@ "decorators": [] }, { - "$id": "348", + "$id": "346", "kind": "method", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$ref": "153" + "$ref": "151" }, "location": "Body", "isApiVersion": false, @@ -4494,7 +4478,7 @@ "decorators": [] }, { - "$id": "349", + "$id": "347", "kind": "method", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -4512,7 +4496,7 @@ "decorators": [] }, { - "$id": "350", + "$id": "348", "kind": "method", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -4530,7 +4514,7 @@ "decorators": [] }, { - "$id": "351", + "$id": "349", "kind": "method", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -4548,7 +4532,7 @@ "decorators": [] }, { - "$id": "352", + "$id": "350", "kind": "method", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -4566,7 +4550,7 @@ "decorators": [] }, { - "$id": "353", + "$id": "351", "kind": "method", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", @@ -4584,7 +4568,7 @@ "decorators": [] }, { - "$id": "354", + "$id": "352", "kind": "method", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", @@ -4602,7 +4586,7 @@ "decorators": [] }, { - "$id": "355", + "$id": "353", "kind": "method", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", @@ -4620,7 +4604,7 @@ "decorators": [] }, { - "$id": "356", + "$id": "354", "kind": "method", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -4638,13 +4622,13 @@ "decorators": [] }, { - "$id": "357", + "$id": "355", "kind": "method", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "358", + "$id": "356", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4660,13 +4644,13 @@ "decorators": [] }, { - "$id": "359", + "$id": "357", "kind": "method", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$ref": "169" + "$ref": "167" }, "location": "Body", "isApiVersion": false, @@ -4678,13 +4662,13 @@ "decorators": [] }, { - "$id": "360", + "$id": "358", "kind": "method", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$ref": "173" + "$ref": "171" }, "location": "Body", "isApiVersion": false, @@ -4696,7 +4680,7 @@ "decorators": [] }, { - "$id": "361", + "$id": "359", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -4714,7 +4698,7 @@ "decorators": [] }, { - "$id": "362", + "$id": "360", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4733,7 +4717,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -4742,7 +4726,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody" }, { - "$id": "363", + "$id": "361", "kind": "basic", "name": "friendlyModel", "accessibility": "public", @@ -4752,14 +4736,14 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "364", + "$id": "362", "name": "friendlyModel", "resourceName": "BasicTypeSpec", "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "365", + "$id": "363", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -4776,7 +4760,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.contentType" }, { - "$id": "366", + "$id": "364", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4792,12 +4776,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel.accept" }, { - "$id": "367", + "$id": "365", "kind": "body", "name": "friendModel", "serializedName": "friendModel", "type": { - "$ref": "222" + "$ref": "220" }, "isApiVersion": false, "contentTypes": [ @@ -4817,7 +4801,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "220" }, "headers": [], "isErrorResponse": false, @@ -4840,13 +4824,13 @@ }, "parameters": [ { - "$id": "368", + "$id": "366", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "369", + "$id": "367", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4862,7 +4846,7 @@ "decorators": [] }, { - "$id": "370", + "$id": "368", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -4880,7 +4864,7 @@ "decorators": [] }, { - "$id": "371", + "$id": "369", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4899,7 +4883,7 @@ ], "response": { "type": { - "$ref": "222" + "$ref": "220" } }, "isOverride": false, @@ -4908,7 +4892,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel" }, { - "$id": "372", + "$id": "370", "kind": "basic", "name": "addTimeHeader", "accessibility": "public", @@ -4917,23 +4901,23 @@ "2024-08-16-preview" ], "operation": { - "$id": "373", + "$id": "371", "name": "addTimeHeader", "resourceName": "BasicTypeSpec", "accessibility": "public", "parameters": [ { - "$id": "374", + "$id": "372", "kind": "header", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "375", + "$id": "373", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "376", + "$id": "374", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4971,17 +4955,17 @@ }, "parameters": [ { - "$id": "377", + "$id": "375", "kind": "method", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "378", + "$id": "376", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "379", + "$id": "377", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5007,7 +4991,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.addTimeHeader" }, { - "$id": "380", + "$id": "378", "kind": "basic", "name": "projectedNameModel", "accessibility": "public", @@ -5017,14 +5001,14 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "381", + "$id": "379", "name": "projectedNameModel", "resourceName": "BasicTypeSpec", "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "382", + "$id": "380", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -5041,7 +5025,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.contentType" }, { - "$id": "383", + "$id": "381", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5057,12 +5041,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel.accept" }, { - "$id": "384", + "$id": "382", "kind": "body", "name": "renamedModel", "serializedName": "renamedModel", "type": { - "$ref": "225" + "$ref": "223" }, "isApiVersion": false, "contentTypes": [ @@ -5082,7 +5066,7 @@ 200 ], "bodyType": { - "$ref": "225" + "$ref": "223" }, "headers": [], "isErrorResponse": false, @@ -5105,13 +5089,13 @@ }, "parameters": [ { - "$id": "385", + "$id": "383", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the ModelWithClientName", "type": { - "$id": "386", + "$id": "384", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5127,7 +5111,7 @@ "decorators": [] }, { - "$id": "387", + "$id": "385", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -5145,7 +5129,7 @@ "decorators": [] }, { - "$id": "388", + "$id": "386", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5164,7 +5148,7 @@ ], "response": { "type": { - "$ref": "225" + "$ref": "223" } }, "isOverride": false, @@ -5173,7 +5157,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel" }, { - "$id": "389", + "$id": "387", "kind": "basic", "name": "returnsAnonymousModel", "accessibility": "public", @@ -5183,14 +5167,14 @@ ], "doc": "return anonymous model", "operation": { - "$id": "390", + "$id": "388", "name": "returnsAnonymousModel", "resourceName": "BasicTypeSpec", "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "391", + "$id": "389", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5212,7 +5196,7 @@ 200 ], "bodyType": { - "$ref": "228" + "$ref": "226" }, "headers": [], "isErrorResponse": false, @@ -5232,7 +5216,7 @@ }, "parameters": [ { - "$id": "392", + "$id": "390", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5251,7 +5235,7 @@ ], "response": { "type": { - "$ref": "228" + "$ref": "226" } }, "isOverride": false, @@ -5260,7 +5244,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.returnsAnonymousModel" }, { - "$id": "393", + "$id": "391", "kind": "basic", "name": "getUnknownValue", "accessibility": "public", @@ -5270,19 +5254,19 @@ ], "doc": "get extensible enum", "operation": { - "$id": "394", + "$id": "392", "name": "getUnknownValue", "resourceName": "BasicTypeSpec", "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "395", + "$id": "393", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$id": "396", + "$id": "394", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5303,7 +5287,11 @@ 200 ], "bodyType": { - "$ref": "131" + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "headers": [], "isErrorResponse": false, @@ -5330,12 +5318,12 @@ }, "parameters": [ { - "$id": "397", + "$id": "396", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "396" + "$ref": "394" }, "location": "Header", "isApiVersion": false, @@ -5349,7 +5337,7 @@ ], "response": { "type": { - "$ref": "131" + "$ref": "395" } }, "isOverride": false, @@ -5358,7 +5346,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.getUnknownValue" }, { - "$id": "398", + "$id": "397", "kind": "basic", "name": "internalProtocol", "accessibility": "public", @@ -5368,20 +5356,20 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "399", + "$id": "398", "name": "internalProtocol", "resourceName": "BasicTypeSpec", "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "400", + "$id": "399", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "133" + "$ref": "131" }, "isApiVersion": false, "optional": false, @@ -5392,12 +5380,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol.contentType" }, { - "$id": "401", + "$id": "400", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "135" + "$ref": "133" }, "isApiVersion": false, "optional": false, @@ -5408,12 +5396,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol.accept" }, { - "$id": "402", + "$id": "401", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "149" + "$ref": "147" }, "isApiVersion": false, "contentTypes": [ @@ -5433,7 +5421,7 @@ 200 ], "bodyType": { - "$ref": "149" + "$ref": "147" }, "headers": [], "isErrorResponse": false, @@ -5456,12 +5444,12 @@ }, "parameters": [ { - "$id": "403", + "$id": "402", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "149" + "$ref": "147" }, "location": "Body", "isApiVersion": false, @@ -5473,13 +5461,13 @@ "decorators": [] }, { - "$id": "404", + "$id": "403", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "133" + "$ref": "131" }, "location": "Header", "isApiVersion": false, @@ -5491,12 +5479,12 @@ "decorators": [] }, { - "$id": "405", + "$id": "404", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "135" + "$ref": "133" }, "location": "Header", "isApiVersion": false, @@ -5510,7 +5498,7 @@ ], "response": { "type": { - "$ref": "149" + "$ref": "147" } }, "isOverride": false, @@ -5519,7 +5507,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol" }, { - "$id": "406", + "$id": "405", "kind": "basic", "name": "stillConvenient", "accessibility": "public", @@ -5529,7 +5517,7 @@ ], "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "operation": { - "$id": "407", + "$id": "406", "name": "stillConvenient", "resourceName": "BasicTypeSpec", "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", @@ -5561,7 +5549,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.stillConvenient" }, { - "$id": "408", + "$id": "407", "kind": "basic", "name": "headAsBoolean", "accessibility": "public", @@ -5571,19 +5559,19 @@ ], "doc": "head as boolean.", "operation": { - "$id": "409", + "$id": "408", "name": "headAsBoolean", "resourceName": "BasicTypeSpec", "doc": "head as boolean.", "accessibility": "public", "parameters": [ { - "$id": "410", + "$id": "409", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "411", + "$id": "410", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5621,12 +5609,12 @@ }, "parameters": [ { - "$id": "412", + "$id": "411", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "413", + "$id": "412", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5649,7 +5637,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.headAsBoolean" }, { - "$id": "414", + "$id": "413", "kind": "paging", "name": "ListWithNextLink", "accessibility": "public", @@ -5659,19 +5647,19 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "415", + "$id": "414", "name": "ListWithNextLink", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "416", + "$id": "415", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "137" + "$ref": "135" }, "isApiVersion": false, "optional": false, @@ -5688,7 +5676,7 @@ 200 ], "bodyType": { - "$ref": "229" + "$ref": "227" }, "headers": [], "isErrorResponse": false, @@ -5708,12 +5696,12 @@ }, "parameters": [ { - "$id": "417", + "$id": "416", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "137" + "$ref": "135" }, "location": "Header", "isApiVersion": false, @@ -5727,7 +5715,7 @@ ], "response": { "type": { - "$ref": "231" + "$ref": "229" }, "resultSegments": [ "things" @@ -5750,7 +5738,7 @@ } }, { - "$id": "418", + "$id": "417", "kind": "paging", "name": "ListWithStringNextLink", "accessibility": "public", @@ -5760,19 +5748,19 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "419", + "$id": "418", "name": "ListWithStringNextLink", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "420", + "$id": "419", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "139" + "$ref": "137" }, "isApiVersion": false, "optional": false, @@ -5789,7 +5777,7 @@ 200 ], "bodyType": { - "$ref": "234" + "$ref": "232" }, "headers": [], "isErrorResponse": false, @@ -5809,12 +5797,12 @@ }, "parameters": [ { - "$id": "421", + "$id": "420", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "139" + "$ref": "137" }, "location": "Header", "isApiVersion": false, @@ -5828,7 +5816,7 @@ ], "response": { "type": { - "$ref": "231" + "$ref": "229" }, "resultSegments": [ "things" @@ -5851,7 +5839,7 @@ } }, { - "$id": "422", + "$id": "421", "kind": "paging", "name": "ListWithHeaderNextLink", "accessibility": "public", @@ -5861,19 +5849,19 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "423", + "$id": "422", "name": "ListWithHeaderNextLink", "resourceName": "BasicTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "424", + "$id": "423", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "141" + "$ref": "139" }, "isApiVersion": false, "optional": false, @@ -5890,14 +5878,14 @@ 200 ], "bodyType": { - "$ref": "238" + "$ref": "236" }, "headers": [ { "name": "next", "nameInResponse": "next", "type": { - "$id": "425", + "$id": "424", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5922,12 +5910,12 @@ }, "parameters": [ { - "$id": "426", + "$id": "425", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "141" + "$ref": "139" }, "location": "Header", "isApiVersion": false, @@ -5941,7 +5929,7 @@ ], "response": { "type": { - "$ref": "231" + "$ref": "229" }, "resultSegments": [ "things" @@ -5964,7 +5952,7 @@ } }, { - "$id": "427", + "$id": "426", "kind": "paging", "name": "ListWithContinuationToken", "accessibility": "public", @@ -5974,19 +5962,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "428", + "$id": "427", "name": "ListWithContinuationToken", "resourceName": "BasicTypeSpec", "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "429", + "$id": "428", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "430", + "$id": "429", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6001,12 +5989,12 @@ "readOnly": false }, { - "$id": "431", + "$id": "430", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "143" + "$ref": "141" }, "isApiVersion": false, "optional": false, @@ -6023,7 +6011,7 @@ 200 ], "bodyType": { - "$ref": "240" + "$ref": "238" }, "headers": [], "isErrorResponse": false, @@ -6043,12 +6031,12 @@ }, "parameters": [ { - "$id": "432", + "$id": "431", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "433", + "$id": "432", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6064,12 +6052,12 @@ "decorators": [] }, { - "$id": "434", + "$id": "433", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "143" + "$ref": "141" }, "location": "Header", "isApiVersion": false, @@ -6083,7 +6071,7 @@ ], "response": { "type": { - "$ref": "231" + "$ref": "229" }, "resultSegments": [ "things" @@ -6099,7 +6087,7 @@ ], "continuationToken": { "parameter": { - "$ref": "429" + "$ref": "428" }, "responseSegments": [ "nextToken" @@ -6109,7 +6097,7 @@ } }, { - "$id": "435", + "$id": "434", "kind": "paging", "name": "ListWithContinuationTokenHeaderResponse", "accessibility": "public", @@ -6119,19 +6107,19 @@ ], "doc": "List things with continuation token header response", "operation": { - "$id": "436", + "$id": "435", "name": "ListWithContinuationTokenHeaderResponse", "resourceName": "BasicTypeSpec", "doc": "List things with continuation token header response", "accessibility": "public", "parameters": [ { - "$id": "437", + "$id": "436", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "438", + "$id": "437", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6146,12 +6134,12 @@ "readOnly": false }, { - "$id": "439", + "$id": "438", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "145" + "$ref": "143" }, "isApiVersion": false, "optional": false, @@ -6168,14 +6156,14 @@ 200 ], "bodyType": { - "$ref": "244" + "$ref": "242" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "440", + "$id": "439", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6200,12 +6188,12 @@ }, "parameters": [ { - "$id": "441", + "$id": "440", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "442", + "$id": "441", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6221,12 +6209,12 @@ "decorators": [] }, { - "$id": "443", + "$id": "442", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "145" + "$ref": "143" }, "location": "Header", "isApiVersion": false, @@ -6240,7 +6228,7 @@ ], "response": { "type": { - "$ref": "231" + "$ref": "229" }, "resultSegments": [ "things" @@ -6256,7 +6244,7 @@ ], "continuationToken": { "parameter": { - "$ref": "437" + "$ref": "436" }, "responseSegments": [ "next-token" @@ -6266,7 +6254,7 @@ } }, { - "$id": "444", + "$id": "443", "kind": "paging", "name": "ListWithPaging", "accessibility": "public", @@ -6276,19 +6264,19 @@ ], "doc": "List things with paging", "operation": { - "$id": "445", + "$id": "444", "name": "ListWithPaging", "resourceName": "BasicTypeSpec", "doc": "List things with paging", "accessibility": "public", "parameters": [ { - "$id": "446", + "$id": "445", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "147" + "$ref": "145" }, "isApiVersion": false, "optional": false, @@ -6305,7 +6293,7 @@ 200 ], "bodyType": { - "$ref": "246" + "$ref": "244" }, "headers": [], "isErrorResponse": false, @@ -6325,12 +6313,12 @@ }, "parameters": [ { - "$id": "447", + "$id": "446", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "147" + "$ref": "145" }, "location": "Header", "isApiVersion": false, @@ -6344,7 +6332,7 @@ ], "response": { "type": { - "$ref": "231" + "$ref": "229" }, "resultSegments": [ "items" @@ -6361,7 +6349,7 @@ } }, { - "$id": "448", + "$id": "447", "kind": "basic", "name": "ConditionalRequest", "accessibility": "public", @@ -6371,19 +6359,19 @@ ], "doc": "A sample operation with conditional requests", "operation": { - "$id": "449", + "$id": "448", "name": "ConditionalRequest", "resourceName": "BasicTypeSpec", "doc": "A sample operation with conditional requests", "accessibility": "public", "parameters": [ { - "$id": "450", + "$id": "449", "kind": "header", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "451", + "$id": "450", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6398,12 +6386,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequest.ifMatch" }, { - "$id": "452", + "$id": "451", "kind": "header", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "453", + "$id": "452", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6438,12 +6426,12 @@ }, "parameters": [ { - "$id": "454", + "$id": "453", "kind": "method", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "455", + "$id": "454", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6459,12 +6447,12 @@ "decorators": [] }, { - "$id": "456", + "$id": "455", "kind": "method", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "457", + "$id": "456", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6487,7 +6475,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequest" }, { - "$id": "458", + "$id": "457", "kind": "basic", "name": "ConditionalRequestDate", "accessibility": "public", @@ -6497,19 +6485,19 @@ ], "doc": "A sample operation with conditional requests", "operation": { - "$id": "459", + "$id": "458", "name": "ConditionalRequestDate", "resourceName": "BasicTypeSpec", "doc": "A sample operation with conditional requests", "accessibility": "public", "parameters": [ { - "$id": "460", + "$id": "459", "kind": "header", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "461", + "$id": "460", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6524,12 +6512,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequestDate.ifMatch" }, { - "$id": "462", + "$id": "461", "kind": "header", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "463", + "$id": "462", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6544,12 +6532,12 @@ "crossLanguageDefinitionId": "BasicTypeSpec.ConditionalRequestDate.ifNoneMatch" }, { - "$id": "464", + "$id": "463", "kind": "header", "name": "ifModifiedSince", "serializedName": "If-Modified-Since", "type": { - "$id": "465", + "$id": "464", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6584,12 +6572,12 @@ }, "parameters": [ { - "$id": "466", + "$id": "465", "kind": "method", "name": "ifMatch", "serializedName": "If-Match", "type": { - "$id": "467", + "$id": "466", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6605,12 +6593,12 @@ "decorators": [] }, { - "$id": "468", + "$id": "467", "kind": "method", "name": "ifNoneMatch", "serializedName": "If-None-Match", "type": { - "$id": "469", + "$id": "468", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6626,12 +6614,12 @@ "decorators": [] }, { - "$id": "470", + "$id": "469", "kind": "method", "name": "ifModifiedSince", "serializedName": "If-Modified-Since", "type": { - "$id": "471", + "$id": "470", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6656,12 +6644,12 @@ ], "parameters": [ { - "$id": "472", + "$id": "471", "kind": "endpoint", "name": "basicTypeSpecUrl", "serializedName": "basicTypeSpecUrl", "type": { - "$id": "473", + "$id": "472", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" 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 new file mode 100644 index 000000000000..d69c6a4d2843 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.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; +using Azure; + +namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +{ + public partial class Blob : IJsonModel + { + internal Blob() => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + Blob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual Blob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + Blob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual Blob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static explicit operator Blob(Response result) => throw null; + } +} 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 new file mode 100644 index 000000000000..a7cb0fcb7fc3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +{ + public partial class Blob + { + public string Id => throw null; + + public string Name => throw null; + + public int Size => throw null; + + public string Path => throw null; + } +} 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 72ecbe83780c..92c54ca2cd65 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,6 +10,7 @@ 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; @@ -38,6 +39,8 @@ public partial class ClientLocationClient public virtual MoveToRootClient GetMoveToRootClient() => throw null; + public virtual MoveMethodParameterToClient GetMoveMethodParameterToClient() => throw null; + public virtual ArchiveOperations GetArchiveOperationsClient() => throw null; } } 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 index 456ed7d735f5..961b9c27c685 100644 --- 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 @@ -6,9 +6,11 @@ #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 new file mode 100644 index 000000000000..a31b706b3772 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClient.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +{ + public partial class MoveMethodParameterToClient + { + protected MoveMethodParameterToClient() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual MoveMethodParameterToClientBlobOperations GetMoveMethodParameterToClientBlobOperationsClient() => throw null; + } +} 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 new file mode 100644 index 000000000000..b8842a6bf30d --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClientBlobOperations.cs @@ -0,0 +1,29 @@ +// 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.Pipeline; + +namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +{ + public partial class MoveMethodParameterToClientBlobOperations + { + protected MoveMethodParameterToClientBlobOperations() => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Response GetBlob(string storageAccount, string container, string blob, RequestContext context) => throw null; + + public virtual Task GetBlobAsync(string storageAccount, string container, string blob, RequestContext context) => throw null; + + public virtual Response GetBlob(string storageAccount, string container, string blob, CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetBlobAsync(string storageAccount, string container, string blob, CancellationToken cancellationToken = default) => throw null; + } +} 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 new file mode 100644 index 000000000000..c6dbcaf21d2e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationModelFactory.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; + +namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation +{ + public static partial class _Specs_AzureClientGeneratorCoreClientLocationModelFactory + { + public static Blob Blob(string id = default, string name = default, int size = default, string path = default) => throw null; + } +} 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 7b036e7e7fd1..a8cc32e1a0f3 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 @@ -2,24 +2,153 @@ "name": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "apiVersions": [], "enums": [], - "constants": [], - "models": [], - "clients": [ + "constants": [ { "$id": "1", + "kind": "constant", + "name": "getBlobContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "2", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "3", + "kind": "model", + "name": "Blob", + "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.Blob", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "4", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.Blob.id", + "serializationOptions": { + "json": { + "name": "id" + } + }, + "isHttpMetadata": false + }, + { + "$id": "6", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.Blob.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": false + }, + { + "$id": "8", + "kind": "property", + "name": "size", + "serializedName": "size", + "type": { + "$id": "9", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.Blob.size", + "serializationOptions": { + "json": { + "name": "size" + } + }, + "isHttpMetadata": false + }, + { + "$id": "10", + "kind": "property", + "name": "path", + "serializedName": "path", + "type": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.Blob.path", + "serializationOptions": { + "json": { + "name": "path" + } + }, + "isHttpMetadata": false + } + ] + } + ], + "clients": [ + { + "$id": "12", "kind": "client", "name": "ClientLocationClient", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "doc": "Test for @clientLocation decorator - moving operations between clients", "methods": [ { - "$id": "2", + "$id": "13", "kind": "basic", "name": "getHealthStatus", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "3", + "$id": "14", "name": "getHealthStatus", "resourceName": "ResourceOperations", "accessibility": "public", @@ -52,13 +181,13 @@ ], "parameters": [ { - "$id": "4", + "$id": "15", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "5", + "$id": "16", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -69,7 +198,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "6", + "$id": "17", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -87,20 +216,20 @@ "apiVersions": [], "children": [ { - "$id": "7", + "$id": "18", "kind": "client", "name": "MoveToExistingSubClient", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient", "methods": [], "parameters": [ { - "$id": "8", + "$id": "19", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "9", + "$id": "20", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -111,7 +240,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "10", + "$id": "21", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -128,23 +257,23 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient", "apiVersions": [], "parent": { - "$ref": "1" + "$ref": "12" }, "children": [ { - "$id": "11", + "$id": "22", "kind": "client", "name": "AdminOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient", "methods": [ { - "$id": "12", + "$id": "23", "kind": "basic", "name": "getAdminInfo", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "13", + "$id": "24", "name": "getAdminInfo", "resourceName": "AdminOperations", "accessibility": "public", @@ -175,13 +304,13 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations.getAdminInfo" }, { - "$id": "14", + "$id": "25", "kind": "basic", "name": "deleteUser", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "15", + "$id": "26", "name": "deleteUser", "resourceName": "UserOperations", "accessibility": "public", @@ -214,13 +343,13 @@ ], "parameters": [ { - "$id": "16", + "$id": "27", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "17", + "$id": "28", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -231,7 +360,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "18", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -248,23 +377,23 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations", "apiVersions": [], "parent": { - "$ref": "7" + "$ref": "18" } }, { - "$id": "19", + "$id": "30", "kind": "client", "name": "UserOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient", "methods": [ { - "$id": "20", + "$id": "31", "kind": "basic", "name": "getUser", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "21", + "$id": "32", "name": "getUser", "resourceName": "UserOperations", "accessibility": "public", @@ -297,13 +426,13 @@ ], "parameters": [ { - "$id": "22", + "$id": "33", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "23", + "$id": "34", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -314,7 +443,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "24", + "$id": "35", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -331,26 +460,26 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations", "apiVersions": [], "parent": { - "$ref": "7" + "$ref": "18" } } ] }, { - "$id": "25", + "$id": "36", "kind": "client", "name": "MoveToNewSubClient", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient", "methods": [], "parameters": [ { - "$id": "26", + "$id": "37", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "27", + "$id": "38", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -361,7 +490,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "28", + "$id": "39", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -378,23 +507,23 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient", "apiVersions": [], "parent": { - "$ref": "1" + "$ref": "12" }, "children": [ { - "$id": "29", + "$id": "40", "kind": "client", "name": "ProductOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient", "methods": [ { - "$id": "30", + "$id": "41", "kind": "basic", "name": "listProducts", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "31", + "$id": "42", "name": "listProducts", "resourceName": "ProductOperations", "accessibility": "public", @@ -427,13 +556,13 @@ ], "parameters": [ { - "$id": "32", + "$id": "43", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "33", + "$id": "44", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -444,7 +573,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "34", + "$id": "45", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -461,26 +590,26 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations", "apiVersions": [], "parent": { - "$ref": "25" + "$ref": "36" } } ] }, { - "$id": "35", + "$id": "46", "kind": "client", "name": "MoveToRootClient", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient", "methods": [], "parameters": [ { - "$id": "36", + "$id": "47", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "37", + "$id": "48", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -491,7 +620,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "38", + "$id": "49", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -508,23 +637,23 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient", "apiVersions": [], "parent": { - "$ref": "1" + "$ref": "12" }, "children": [ { - "$id": "39", + "$id": "50", "kind": "client", "name": "ResourceOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient", "methods": [ { - "$id": "40", + "$id": "51", "kind": "basic", "name": "getResource", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "41", + "$id": "52", "name": "getResource", "resourceName": "ResourceOperations", "accessibility": "public", @@ -557,13 +686,13 @@ ], "parameters": [ { - "$id": "42", + "$id": "53", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "43", + "$id": "54", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -574,7 +703,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "44", + "$id": "55", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -591,25 +720,323 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations", "apiVersions": [], "parent": { - "$ref": "35" + "$ref": "46" + } + } + ] + }, + { + "$id": "56", + "kind": "client", + "name": "MoveMethodParameterToClient", + "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", + "methods": [], + "parameters": [ + { + "$id": "57", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "58", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" + } + ], + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", + "apiVersions": [], + "parent": { + "$ref": "12" + }, + "children": [ + { + "$id": "60", + "kind": "client", + "name": "BlobOperations", + "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", + "methods": [ + { + "$id": "61", + "kind": "basic", + "name": "getBlob", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "62", + "name": "getBlob", + "resourceName": "BlobOperations", + "accessibility": "public", + "parameters": [ + { + "$id": "63", + "kind": "query", + "name": "storageAccount", + "serializedName": "storageAccount", + "type": { + "$id": "64", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "optional": false, + "scope": "Method", + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.storageAccount", + "readOnly": false + }, + { + "$id": "65", + "kind": "query", + "name": "container", + "serializedName": "container", + "type": { + "$id": "66", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "optional": false, + "scope": "Method", + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.container", + "readOnly": false + }, + { + "$id": "67", + "kind": "query", + "name": "blob", + "serializedName": "blob", + "type": { + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "optional": false, + "scope": "Method", + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.blob", + "readOnly": false + }, + { + "$id": "69", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "3" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/azure/client-generator-core/client-location/blob", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob", + "decorators": [] + }, + "parameters": [ + { + "$id": "70", + "kind": "method", + "name": "storageAccount", + "serializedName": "storageAccount", + "type": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.storageAccount", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "72", + "kind": "method", + "name": "container", + "serializedName": "container", + "type": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.container", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "74", + "kind": "method", + "name": "blob", + "serializedName": "blob", + "type": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.blob", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "76", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "3" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob" + } + ], + "parameters": [ + { + "$id": "77", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "78", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" + } + ], + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations", + "apiVersions": [], + "parent": { + "$ref": "56" } } ] }, { - "$id": "45", + "$id": "80", "kind": "client", "name": "ArchiveOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "methods": [ { - "$id": "46", + "$id": "81", "kind": "basic", "name": "archiveProduct", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "47", + "$id": "82", "name": "archiveProduct", "resourceName": "ProductOperations", "accessibility": "public", @@ -642,13 +1069,13 @@ ], "parameters": [ { - "$id": "48", + "$id": "83", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "49", + "$id": "84", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -659,7 +1086,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "50", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -676,7 +1103,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "apiVersions": [], "parent": { - "$ref": "1" + "$ref": "12" } } ] 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 341eb6a2ff1f..ecf3cba5b04a 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,8 +8,8 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using ClientNameSpaceClient; -using ClientNameSpaceClient._ClientNamespaceSecondClient; +using client.clientnamespace; +using client.clientnamespace.second; namespace Microsoft.Extensions.Azure { 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 57d537d63023..99b198a04a10 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,8 +5,9 @@ #nullable disable -using Client.ClientNamespace.FirstModel; -using Client.ClientNamespace.Second.Model; +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 e5a7f614be5a..62b177f87484 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,9 +10,9 @@ using System.Threading.Tasks; using Azure; using Azure.Core.Pipeline; -using Client.ClientNamespace.FirstModel; +using client.clientnamespace.first; -namespace ClientNameSpaceClient +namespace client.clientnamespace { public partial class ClientNamespaceFirstClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClientOptions.cs index baa5fc81ee68..d566257c26b8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace ClientNameSpaceClient +namespace client.clientnamespace { public partial class ClientNamespaceFirstClientOptions : ClientOptions { 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 7bd41ac56c59..741e98cce9ac 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,9 +10,8 @@ using System.Threading.Tasks; using Azure; using Azure.Core.Pipeline; -using Client.ClientNamespace.Second.Model; -namespace ClientNameSpaceClient._ClientNamespaceSecondClient +namespace client.clientnamespace.second { public partial class ClientNamespaceSecondClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClientOptions.cs index 09889c6f9b5f..72bf6bbdefdd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace ClientNameSpaceClient._ClientNamespaceSecondClient +namespace client.clientnamespace.second { public partial class ClientNamespaceSecondClientOptions : ClientOptions { 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 2c3b8e879fdf..231265d57564 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.FirstModel +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 87917c913446..e098a31738a8 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.FirstModel +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 9d975cc3df4c..5928d29485a5 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.FirstModel; -using Client.ClientNamespace.Second.Model; +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 3e6b21819489..34a70aae3e6d 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.Model +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 6c87187ab53f..cd982ceb291e 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.Model +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 b779de4c541d..272c9f3ba491 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,7 +5,9 @@ #nullable disable -namespace Client.ClientNamespace.Second.Model +using client.clientnamespace.second.sub; + +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 87cc0f43acac..75948dcccae7 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 @@ -29,7 +29,7 @@ "decorators": [] } ], - "namespace": "Client.ClientNamespace.Second.Model", + "namespace": "client.clientnamespace.second.sub", "isFixed": false, "isFlags": false, "usage": "Output,Json", @@ -75,7 +75,7 @@ "$id": "8", "kind": "model", "name": "FirstClientResult", - "namespace": "Client.ClientNamespace.FirstModel", + "namespace": "client.clientnamespace.first", "crossLanguageDefinitionId": "Client.ClientNamespace.FirstModel.FirstClientResult", "usage": "Output,Json", "decorators": [], @@ -111,7 +111,7 @@ "$id": "11", "kind": "model", "name": "SecondClientResult", - "namespace": "Client.ClientNamespace.Second.Model", + "namespace": "client.clientnamespace.second", "crossLanguageDefinitionId": "Client.ClientNamespace.Second.Model.SecondClientResult", "usage": "Output,Json", "decorators": [], @@ -145,7 +145,7 @@ "$id": "13", "kind": "client", "name": "ClientNamespaceFirstClient", - "namespace": "ClientNameSpaceClient", + "namespace": "client.clientnamespace", "methods": [ { "$id": "14", @@ -270,7 +270,7 @@ "$id": "21", "kind": "client", "name": "ClientNamespaceSecondClient", - "namespace": "ClientNameSpaceClient.ClientNamespaceSecondClient", + "namespace": "client.clientnamespace.second", "methods": [ { "$id": "22", diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageableClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageableClient.cs index af4af5ca0ee0..f9c574fd4b54 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageableClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/PageableClient.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.Threading; +using Azure; using Azure.Core.Pipeline; using Payload.Pageable._ServerDrivenPagination; @@ -19,6 +21,14 @@ public partial class PageableClient public virtual HttpPipeline Pipeline => throw null; + public virtual Pageable GetWithoutContinuation(RequestContext context) => throw null; + + public virtual AsyncPageable GetWithoutContinuationAsync(RequestContext context) => throw null; + + public virtual Pageable GetWithoutContinuation(CancellationToken cancellationToken = default) => throw null; + + public virtual AsyncPageable GetWithoutContinuationAsync(CancellationToken cancellationToken = default) => throw null; + public virtual ServerDrivenPagination GetServerDrivenPaginationClient() => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs index 510cb994dc05..a78ccc10512c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Generated/ServerDrivenPagination.cs @@ -28,6 +28,14 @@ public partial class ServerDrivenPagination public virtual AsyncPageable LinkAsync(CancellationToken cancellationToken = default) => throw null; + public virtual Pageable LinkString(RequestContext context) => throw null; + + public virtual AsyncPageable LinkStringAsync(RequestContext context) => throw null; + + public virtual Pageable LinkString(CancellationToken cancellationToken = default) => throw null; + + public virtual AsyncPageable LinkStringAsync(CancellationToken cancellationToken = default) => throw null; + public virtual Pageable NestedLink(RequestContext context) => throw null; public virtual AsyncPageable NestedLinkAsync(RequestContext context) => throw null; 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 f4bb2dfd51f5..cf252dccf6aa 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 @@ -6,7 +6,7 @@ { "$id": "1", "kind": "constant", - "name": "linkContentType", + "name": "listWithoutContinuationContentType", "namespace": "", "usage": "None", "valueType": { @@ -22,7 +22,7 @@ { "$id": "3", "kind": "constant", - "name": "nestedLinkContentType", + "name": "linkContentType", "namespace": "", "usage": "None", "valueType": { @@ -38,7 +38,7 @@ { "$id": "5", "kind": "constant", - "name": "requestQueryResponseBodyContentType", + "name": "linkStringContentType", "namespace": "", "usage": "None", "valueType": { @@ -54,7 +54,7 @@ { "$id": "7", "kind": "constant", - "name": "requestHeaderResponseBodyContentType", + "name": "nestedLinkContentType", "namespace": "", "usage": "None", "valueType": { @@ -70,7 +70,7 @@ { "$id": "9", "kind": "constant", - "name": "requestQueryResponseHeaderContentType", + "name": "requestQueryResponseBodyContentType", "namespace": "", "usage": "None", "valueType": { @@ -86,7 +86,7 @@ { "$id": "11", "kind": "constant", - "name": "requestHeaderResponseHeaderContentType", + "name": "requestHeaderResponseBodyContentType", "namespace": "", "usage": "None", "valueType": { @@ -102,7 +102,7 @@ { "$id": "13", "kind": "constant", - "name": "requestQueryNestedResponseBodyContentType", + "name": "requestQueryResponseHeaderContentType", "namespace": "", "usage": "None", "valueType": { @@ -118,7 +118,7 @@ { "$id": "15", "kind": "constant", - "name": "requestHeaderNestedResponseBodyContentType", + "name": "requestHeaderResponseHeaderContentType", "namespace": "", "usage": "None", "valueType": { @@ -130,29 +130,61 @@ }, "value": "application/json", "decorators": [] + }, + { + "$id": "17", + "kind": "constant", + "name": "requestQueryNestedResponseBodyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "18", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "19", + "kind": "constant", + "name": "requestHeaderNestedResponseBodyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "20", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] } ], "models": [ { - "$id": "17", + "$id": "21", "kind": "model", - "name": "LinkResponse", - "namespace": "Payload.Pageable.ServerDrivenPagination", - "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.link.Response.anonymous", + "name": "ListWithoutContinuationResponse", + "namespace": "Payload.Pageable", + "crossLanguageDefinitionId": "Payload.Pageable.listWithoutContinuation.Response.anonymous", "usage": "Output,Json", "decorators": [], "properties": [ { - "$id": "18", + "$id": "22", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$id": "19", + "$id": "23", "kind": "array", "name": "ArrayPet", "valueType": { - "$id": "20", + "$id": "24", "kind": "model", "name": "Pet", "namespace": "Payload.Pageable", @@ -161,12 +193,12 @@ "decorators": [], "properties": [ { - "$id": "21", + "$id": "25", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "22", + "$id": "26", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -186,12 +218,12 @@ "isHttpMetadata": false }, { - "$id": "23", + "$id": "27", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "24", + "$id": "28", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -220,6 +252,41 @@ "discriminator": false, "flatten": false, "decorators": [], + "crossLanguageDefinitionId": "Payload.Pageable.listWithoutContinuation.Response.anonymous.pets", + "serializationOptions": { + "json": { + "name": "pets" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$ref": "24" + }, + { + "$id": "29", + "kind": "model", + "name": "LinkResponse", + "namespace": "Payload.Pageable.ServerDrivenPagination", + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.link.Response.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "30", + "kind": "property", + "name": "pets", + "serializedName": "pets", + "type": { + "$ref": "23" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.link.Response.anonymous.pets", "serializationOptions": { "json": { @@ -229,12 +296,12 @@ "isHttpMetadata": false }, { - "$id": "25", + "$id": "31", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "26", + "$id": "32", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -256,10 +323,64 @@ ] }, { - "$ref": "20" + "$id": "33", + "kind": "model", + "name": "LinkStringResponse", + "namespace": "Payload.Pageable.ServerDrivenPagination", + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString.Response.anonymous", + "usage": "Output,Json", + "decorators": [], + "properties": [ + { + "$id": "34", + "kind": "property", + "name": "pets", + "serializedName": "pets", + "type": { + "$ref": "23" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString.Response.anonymous.pets", + "serializationOptions": { + "json": { + "name": "pets" + } + }, + "isHttpMetadata": false + }, + { + "$id": "35", + "kind": "property", + "name": "next", + "serializedName": "next", + "type": { + "$id": "36", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString.Response.anonymous.next", + "serializationOptions": { + "json": { + "name": "next" + } + }, + "isHttpMetadata": false + } + ] }, { - "$id": "27", + "$id": "37", "kind": "model", "name": "NestedLinkResponse", "namespace": "Payload.Pageable.ServerDrivenPagination", @@ -268,12 +389,12 @@ "decorators": [], "properties": [ { - "$id": "28", + "$id": "38", "kind": "property", "name": "nestedItems", "serializedName": "nestedItems", "type": { - "$id": "29", + "$id": "39", "kind": "model", "name": "NestedLinkResponseNestedItems", "namespace": "Payload.Pageable.ServerDrivenPagination", @@ -282,12 +403,12 @@ "decorators": [], "properties": [ { - "$id": "30", + "$id": "40", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -318,12 +439,12 @@ "isHttpMetadata": false }, { - "$id": "31", + "$id": "41", "kind": "property", "name": "nestedNext", "serializedName": "nestedNext", "type": { - "$id": "32", + "$id": "42", "kind": "model", "name": "NestedLinkResponseNestedNext", "namespace": "Payload.Pageable.ServerDrivenPagination", @@ -332,12 +453,12 @@ "decorators": [], "properties": [ { - "$id": "33", + "$id": "43", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "34", + "$id": "44", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -374,13 +495,13 @@ ] }, { - "$ref": "29" + "$ref": "39" }, { - "$ref": "32" + "$ref": "42" }, { - "$id": "35", + "$id": "45", "kind": "model", "name": "RequestQueryResponseBodyResponse", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -389,12 +510,12 @@ "decorators": [], "properties": [ { - "$id": "36", + "$id": "46", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -410,12 +531,12 @@ "isHttpMetadata": false }, { - "$id": "37", + "$id": "47", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "38", + "$id": "48", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -437,7 +558,7 @@ ] }, { - "$id": "39", + "$id": "49", "kind": "model", "name": "RequestHeaderResponseBodyResponse", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -446,12 +567,12 @@ "decorators": [], "properties": [ { - "$id": "40", + "$id": "50", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -467,12 +588,12 @@ "isHttpMetadata": false }, { - "$id": "41", + "$id": "51", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "42", + "$id": "52", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -494,7 +615,7 @@ ] }, { - "$id": "43", + "$id": "53", "kind": "model", "name": "RequestQueryResponseHeaderResponse", "namespace": "", @@ -503,12 +624,12 @@ "decorators": [], "properties": [ { - "$id": "44", + "$id": "54", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -526,7 +647,7 @@ ] }, { - "$id": "45", + "$id": "55", "kind": "model", "name": "RequestHeaderResponseHeaderResponse", "namespace": "", @@ -535,12 +656,12 @@ "decorators": [], "properties": [ { - "$id": "46", + "$id": "56", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -558,7 +679,7 @@ ] }, { - "$id": "47", + "$id": "57", "kind": "model", "name": "RequestQueryNestedResponseBodyResponse", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -567,12 +688,12 @@ "decorators": [], "properties": [ { - "$id": "48", + "$id": "58", "kind": "property", "name": "nestedItems", "serializedName": "nestedItems", "type": { - "$id": "49", + "$id": "59", "kind": "model", "name": "RequestQueryNestedResponseBodyResponseNestedItems", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -581,12 +702,12 @@ "decorators": [], "properties": [ { - "$id": "50", + "$id": "60", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -617,12 +738,12 @@ "isHttpMetadata": false }, { - "$id": "51", + "$id": "61", "kind": "property", "name": "nestedNext", "serializedName": "nestedNext", "type": { - "$id": "52", + "$id": "62", "kind": "model", "name": "RequestQueryNestedResponseBodyResponseNestedNext", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -631,12 +752,12 @@ "decorators": [], "properties": [ { - "$id": "53", + "$id": "63", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "54", + "$id": "64", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -673,13 +794,13 @@ ] }, { - "$ref": "49" + "$ref": "59" }, { - "$ref": "52" + "$ref": "62" }, { - "$id": "55", + "$id": "65", "kind": "model", "name": "RequestHeaderNestedResponseBodyResponse", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -688,12 +809,12 @@ "decorators": [], "properties": [ { - "$id": "56", + "$id": "66", "kind": "property", "name": "nestedItems", "serializedName": "nestedItems", "type": { - "$id": "57", + "$id": "67", "kind": "model", "name": "RequestHeaderNestedResponseBodyResponseNestedItems", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -702,12 +823,12 @@ "decorators": [], "properties": [ { - "$id": "58", + "$id": "68", "kind": "property", "name": "pets", "serializedName": "pets", "type": { - "$ref": "19" + "$ref": "23" }, "optional": false, "readOnly": false, @@ -738,12 +859,12 @@ "isHttpMetadata": false }, { - "$id": "59", + "$id": "69", "kind": "property", "name": "nestedNext", "serializedName": "nestedNext", "type": { - "$id": "60", + "$id": "70", "kind": "model", "name": "RequestHeaderNestedResponseBodyResponseNestedNext", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", @@ -752,12 +873,12 @@ "decorators": [], "properties": [ { - "$id": "61", + "$id": "71", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "62", + "$id": "72", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -794,29 +915,120 @@ ] }, { - "$ref": "57" + "$ref": "67" }, { - "$ref": "60" + "$ref": "70" } ], "clients": [ { - "$id": "63", + "$id": "73", "kind": "client", "name": "PageableClient", "namespace": "Payload.Pageable", "doc": "Test for pageable payload.", - "methods": [], + "methods": [ + { + "$id": "74", + "kind": "paging", + "name": "listWithoutContinuation", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "75", + "name": "listWithoutContinuation", + "resourceName": "Pageable", + "accessibility": "public", + "parameters": [ + { + "$id": "76", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Pageable.listWithoutContinuation.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "21" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/pageable/simple", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Pageable.listWithoutContinuation", + "decorators": [] + }, + "parameters": [ + { + "$id": "77", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Pageable.listWithoutContinuation.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "23" + }, + "resultSegments": [ + "pets" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Pageable.listWithoutContinuation", + "pagingMetadata": { + "itemPropertySegments": [ + "pets" + ] + } + } + ], "parameters": [ { - "$id": "64", + "$id": "78", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "65", + "$id": "79", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -827,7 +1039,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "66", + "$id": "80", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -845,30 +1057,30 @@ "apiVersions": [], "children": [ { - "$id": "67", + "$id": "81", "kind": "client", "name": "ServerDrivenPagination", "namespace": "Payload.Pageable.ServerDrivenPagination", "methods": [ { - "$id": "68", + "$id": "82", "kind": "paging", "name": "link", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "69", + "$id": "83", "name": "link", "resourceName": "ServerDrivenPagination", "accessibility": "public", "parameters": [ { - "$id": "70", + "$id": "84", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "1" + "$ref": "3" }, "isApiVersion": false, "optional": false, @@ -885,7 +1097,7 @@ 200 ], "bodyType": { - "$ref": "17" + "$ref": "29" }, "headers": [], "isErrorResponse": false, @@ -905,12 +1117,12 @@ }, "parameters": [ { - "$id": "71", + "$id": "85", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "1" + "$ref": "3" }, "location": "Header", "isApiVersion": false, @@ -924,7 +1136,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "pets" @@ -947,24 +1159,120 @@ } }, { - "$id": "72", + "$id": "86", + "kind": "paging", + "name": "linkString", + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "87", + "name": "linkString", + "resourceName": "ServerDrivenPagination", + "accessibility": "public", + "parameters": [ + { + "$id": "88", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "5" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "33" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/payload/pageable/server-driven-pagination/link-string", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString", + "decorators": [] + }, + "parameters": [ + { + "$id": "89", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "5" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "23" + }, + "resultSegments": [ + "pets" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.linkString", + "pagingMetadata": { + "itemPropertySegments": [ + "pets" + ], + "nextLink": { + "responseSegments": [ + "next" + ], + "responseLocation": "Body" + } + } + }, + { + "$id": "90", "kind": "paging", "name": "nestedLink", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "73", + "$id": "91", "name": "nestedLink", "resourceName": "ServerDrivenPagination", "accessibility": "public", "parameters": [ { - "$id": "74", + "$id": "92", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "3" + "$ref": "7" }, "isApiVersion": false, "optional": false, @@ -981,7 +1289,7 @@ 200 ], "bodyType": { - "$ref": "27" + "$ref": "37" }, "headers": [], "isErrorResponse": false, @@ -1001,12 +1309,12 @@ }, "parameters": [ { - "$id": "75", + "$id": "93", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "3" + "$ref": "7" }, "location": "Header", "isApiVersion": false, @@ -1020,7 +1328,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "nestedItems", @@ -1048,13 +1356,13 @@ ], "parameters": [ { - "$id": "76", + "$id": "94", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "77", + "$id": "95", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1065,7 +1373,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "78", + "$id": "96", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1082,34 +1390,34 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination", "apiVersions": [], "parent": { - "$ref": "63" + "$ref": "73" }, "children": [ { - "$id": "79", + "$id": "97", "kind": "client", "name": "ContinuationToken", "namespace": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", "methods": [ { - "$id": "80", + "$id": "98", "kind": "paging", "name": "requestQueryResponseBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "81", + "$id": "99", "name": "requestQueryResponseBody", "resourceName": "ContinuationToken", "accessibility": "public", "parameters": [ { - "$id": "82", + "$id": "100", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "83", + "$id": "101", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1124,12 +1432,12 @@ "readOnly": false }, { - "$id": "84", + "$id": "102", "kind": "header", "name": "foo", "serializedName": "foo", "type": { - "$id": "85", + "$id": "103", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1144,12 +1452,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestQueryResponseBody.foo" }, { - "$id": "86", + "$id": "104", "kind": "query", "name": "bar", "serializedName": "bar", "type": { - "$id": "87", + "$id": "105", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1164,12 +1472,12 @@ "readOnly": false }, { - "$id": "88", + "$id": "106", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "5" + "$ref": "9" }, "isApiVersion": false, "optional": false, @@ -1186,7 +1494,7 @@ 200 ], "bodyType": { - "$ref": "35" + "$ref": "45" }, "headers": [], "isErrorResponse": false, @@ -1206,12 +1514,12 @@ }, "parameters": [ { - "$id": "89", + "$id": "107", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "90", + "$id": "108", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1227,12 +1535,12 @@ "decorators": [] }, { - "$id": "91", + "$id": "109", "kind": "method", "name": "foo", "serializedName": "foo", "type": { - "$id": "92", + "$id": "110", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1248,12 +1556,12 @@ "decorators": [] }, { - "$id": "93", + "$id": "111", "kind": "method", "name": "bar", "serializedName": "bar", "type": { - "$id": "94", + "$id": "112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1269,12 +1577,12 @@ "decorators": [] }, { - "$id": "95", + "$id": "113", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "5" + "$ref": "9" }, "location": "Header", "isApiVersion": false, @@ -1288,7 +1596,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "pets" @@ -1304,7 +1612,7 @@ ], "continuationToken": { "parameter": { - "$ref": "82" + "$ref": "100" }, "responseSegments": [ "nextToken" @@ -1314,24 +1622,24 @@ } }, { - "$id": "96", + "$id": "114", "kind": "paging", "name": "requestHeaderResponseBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "97", + "$id": "115", "name": "requestHeaderResponseBody", "resourceName": "ContinuationToken", "accessibility": "public", "parameters": [ { - "$id": "98", + "$id": "116", "kind": "header", "name": "token", "serializedName": "token", "type": { - "$id": "99", + "$id": "117", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1346,12 +1654,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestHeaderResponseBody.token" }, { - "$id": "100", + "$id": "118", "kind": "header", "name": "foo", "serializedName": "foo", "type": { - "$id": "101", + "$id": "119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1366,12 +1674,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestHeaderResponseBody.foo" }, { - "$id": "102", + "$id": "120", "kind": "query", "name": "bar", "serializedName": "bar", "type": { - "$id": "103", + "$id": "121", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1386,12 +1694,12 @@ "readOnly": false }, { - "$id": "104", + "$id": "122", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "7" + "$ref": "11" }, "isApiVersion": false, "optional": false, @@ -1408,7 +1716,7 @@ 200 ], "bodyType": { - "$ref": "39" + "$ref": "49" }, "headers": [], "isErrorResponse": false, @@ -1428,12 +1736,12 @@ }, "parameters": [ { - "$id": "105", + "$id": "123", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "106", + "$id": "124", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1449,12 +1757,12 @@ "decorators": [] }, { - "$id": "107", + "$id": "125", "kind": "method", "name": "foo", "serializedName": "foo", "type": { - "$id": "108", + "$id": "126", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1470,12 +1778,12 @@ "decorators": [] }, { - "$id": "109", + "$id": "127", "kind": "method", "name": "bar", "serializedName": "bar", "type": { - "$id": "110", + "$id": "128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1491,12 +1799,12 @@ "decorators": [] }, { - "$id": "111", + "$id": "129", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "7" + "$ref": "11" }, "location": "Header", "isApiVersion": false, @@ -1510,7 +1818,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "pets" @@ -1526,7 +1834,7 @@ ], "continuationToken": { "parameter": { - "$ref": "98" + "$ref": "116" }, "responseSegments": [ "nextToken" @@ -1536,24 +1844,24 @@ } }, { - "$id": "112", + "$id": "130", "kind": "paging", "name": "requestQueryResponseHeader", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "113", + "$id": "131", "name": "requestQueryResponseHeader", "resourceName": "ContinuationToken", "accessibility": "public", "parameters": [ { - "$id": "114", + "$id": "132", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "115", + "$id": "133", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1568,12 +1876,12 @@ "readOnly": false }, { - "$id": "116", + "$id": "134", "kind": "header", "name": "foo", "serializedName": "foo", "type": { - "$id": "117", + "$id": "135", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1588,12 +1896,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestQueryResponseHeader.foo" }, { - "$id": "118", + "$id": "136", "kind": "query", "name": "bar", "serializedName": "bar", "type": { - "$id": "119", + "$id": "137", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1608,12 +1916,12 @@ "readOnly": false }, { - "$id": "120", + "$id": "138", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "9" + "$ref": "13" }, "isApiVersion": false, "optional": false, @@ -1630,14 +1938,14 @@ 200 ], "bodyType": { - "$ref": "43" + "$ref": "53" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "121", + "$id": "139", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1662,12 +1970,12 @@ }, "parameters": [ { - "$id": "122", + "$id": "140", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "123", + "$id": "141", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1683,12 +1991,12 @@ "decorators": [] }, { - "$id": "124", + "$id": "142", "kind": "method", "name": "foo", "serializedName": "foo", "type": { - "$id": "125", + "$id": "143", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1704,12 +2012,12 @@ "decorators": [] }, { - "$id": "126", + "$id": "144", "kind": "method", "name": "bar", "serializedName": "bar", "type": { - "$id": "127", + "$id": "145", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1725,12 +2033,12 @@ "decorators": [] }, { - "$id": "128", + "$id": "146", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "9" + "$ref": "13" }, "location": "Header", "isApiVersion": false, @@ -1744,7 +2052,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "pets" @@ -1760,7 +2068,7 @@ ], "continuationToken": { "parameter": { - "$ref": "114" + "$ref": "132" }, "responseSegments": [ "next-token" @@ -1770,24 +2078,24 @@ } }, { - "$id": "129", + "$id": "147", "kind": "paging", "name": "requestHeaderResponseHeader", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "130", + "$id": "148", "name": "requestHeaderResponseHeader", "resourceName": "ContinuationToken", "accessibility": "public", "parameters": [ { - "$id": "131", + "$id": "149", "kind": "header", "name": "token", "serializedName": "token", "type": { - "$id": "132", + "$id": "150", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1802,12 +2110,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestHeaderResponseHeader.token" }, { - "$id": "133", + "$id": "151", "kind": "header", "name": "foo", "serializedName": "foo", "type": { - "$id": "134", + "$id": "152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1822,12 +2130,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestHeaderResponseHeader.foo" }, { - "$id": "135", + "$id": "153", "kind": "query", "name": "bar", "serializedName": "bar", "type": { - "$id": "136", + "$id": "154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1842,12 +2150,12 @@ "readOnly": false }, { - "$id": "137", + "$id": "155", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "11" + "$ref": "15" }, "isApiVersion": false, "optional": false, @@ -1864,14 +2172,14 @@ 200 ], "bodyType": { - "$ref": "45" + "$ref": "55" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "138", + "$id": "156", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1896,12 +2204,12 @@ }, "parameters": [ { - "$id": "139", + "$id": "157", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "140", + "$id": "158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1917,12 +2225,12 @@ "decorators": [] }, { - "$id": "141", + "$id": "159", "kind": "method", "name": "foo", "serializedName": "foo", "type": { - "$id": "142", + "$id": "160", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1938,12 +2246,12 @@ "decorators": [] }, { - "$id": "143", + "$id": "161", "kind": "method", "name": "bar", "serializedName": "bar", "type": { - "$id": "144", + "$id": "162", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1959,12 +2267,12 @@ "decorators": [] }, { - "$id": "145", + "$id": "163", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "11" + "$ref": "15" }, "location": "Header", "isApiVersion": false, @@ -1978,7 +2286,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "pets" @@ -1994,7 +2302,7 @@ ], "continuationToken": { "parameter": { - "$ref": "131" + "$ref": "149" }, "responseSegments": [ "next-token" @@ -2004,24 +2312,24 @@ } }, { - "$id": "146", + "$id": "164", "kind": "paging", "name": "requestQueryNestedResponseBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "147", + "$id": "165", "name": "requestQueryNestedResponseBody", "resourceName": "ContinuationToken", "accessibility": "public", "parameters": [ { - "$id": "148", + "$id": "166", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "149", + "$id": "167", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2036,12 +2344,12 @@ "readOnly": false }, { - "$id": "150", + "$id": "168", "kind": "header", "name": "foo", "serializedName": "foo", "type": { - "$id": "151", + "$id": "169", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2056,12 +2364,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestQueryNestedResponseBody.foo" }, { - "$id": "152", + "$id": "170", "kind": "query", "name": "bar", "serializedName": "bar", "type": { - "$id": "153", + "$id": "171", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2076,12 +2384,12 @@ "readOnly": false }, { - "$id": "154", + "$id": "172", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "13" + "$ref": "17" }, "isApiVersion": false, "optional": false, @@ -2098,7 +2406,7 @@ 200 ], "bodyType": { - "$ref": "47" + "$ref": "57" }, "headers": [], "isErrorResponse": false, @@ -2118,12 +2426,12 @@ }, "parameters": [ { - "$id": "155", + "$id": "173", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "156", + "$id": "174", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2139,12 +2447,12 @@ "decorators": [] }, { - "$id": "157", + "$id": "175", "kind": "method", "name": "foo", "serializedName": "foo", "type": { - "$id": "158", + "$id": "176", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2160,12 +2468,12 @@ "decorators": [] }, { - "$id": "159", + "$id": "177", "kind": "method", "name": "bar", "serializedName": "bar", "type": { - "$id": "160", + "$id": "178", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2181,12 +2489,12 @@ "decorators": [] }, { - "$id": "161", + "$id": "179", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "13" + "$ref": "17" }, "location": "Header", "isApiVersion": false, @@ -2200,7 +2508,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "nestedItems", @@ -2218,7 +2526,7 @@ ], "continuationToken": { "parameter": { - "$ref": "148" + "$ref": "166" }, "responseSegments": [ "nestedNext", @@ -2229,24 +2537,24 @@ } }, { - "$id": "162", + "$id": "180", "kind": "paging", "name": "requestHeaderNestedResponseBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "163", + "$id": "181", "name": "requestHeaderNestedResponseBody", "resourceName": "ContinuationToken", "accessibility": "public", "parameters": [ { - "$id": "164", + "$id": "182", "kind": "header", "name": "token", "serializedName": "token", "type": { - "$id": "165", + "$id": "183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2261,12 +2569,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestHeaderNestedResponseBody.token" }, { - "$id": "166", + "$id": "184", "kind": "header", "name": "foo", "serializedName": "foo", "type": { - "$id": "167", + "$id": "185", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2281,12 +2589,12 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestHeaderNestedResponseBody.foo" }, { - "$id": "168", + "$id": "186", "kind": "query", "name": "bar", "serializedName": "bar", "type": { - "$id": "169", + "$id": "187", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2301,12 +2609,12 @@ "readOnly": false }, { - "$id": "170", + "$id": "188", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "15" + "$ref": "19" }, "isApiVersion": false, "optional": false, @@ -2323,7 +2631,7 @@ 200 ], "bodyType": { - "$ref": "55" + "$ref": "65" }, "headers": [], "isErrorResponse": false, @@ -2343,12 +2651,12 @@ }, "parameters": [ { - "$id": "171", + "$id": "189", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "172", + "$id": "190", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2364,12 +2672,12 @@ "decorators": [] }, { - "$id": "173", + "$id": "191", "kind": "method", "name": "foo", "serializedName": "foo", "type": { - "$id": "174", + "$id": "192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2385,12 +2693,12 @@ "decorators": [] }, { - "$id": "175", + "$id": "193", "kind": "method", "name": "bar", "serializedName": "bar", "type": { - "$id": "176", + "$id": "194", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2406,12 +2714,12 @@ "decorators": [] }, { - "$id": "177", + "$id": "195", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "15" + "$ref": "19" }, "location": "Header", "isApiVersion": false, @@ -2425,7 +2733,7 @@ ], "response": { "type": { - "$ref": "19" + "$ref": "23" }, "resultSegments": [ "nestedItems", @@ -2443,7 +2751,7 @@ ], "continuationToken": { "parameter": { - "$ref": "164" + "$ref": "182" }, "responseSegments": [ "nestedNext", @@ -2456,13 +2764,13 @@ ], "parameters": [ { - "$id": "178", + "$id": "196", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "179", + "$id": "197", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2473,7 +2781,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "180", + "$id": "198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2490,7 +2798,7 @@ "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", "apiVersions": [], "parent": { - "$ref": "67" + "$ref": "81" } } ] diff --git a/eng/packages/http-client-csharp/package-lock.json b/eng/packages/http-client-csharp/package-lock.json index 1740b8099470..2d4521e44b3c 100644 --- a/eng/packages/http-client-csharp/package-lock.json +++ b/eng/packages/http-client-csharp/package-lock.json @@ -9,29 +9,29 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250908.5" + "@typespec/http-client-csharp": "1.0.0-alpha.20250918.1" }, "devDependencies": { - "@azure-tools/azure-http-specs": "0.1.0-alpha.27", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/azure-http-specs": "0.1.0-alpha.28", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@eslint/js": "^9.2.0", - "@types/node": "~22.7.5", + "@types/node": "~22.12.0", "@types/prettier": "^2.6.3", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/http-specs": "0.1.0-alpha.25", - "@typespec/json-schema": "1.3.0", - "@typespec/library-linter": "0.73.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/spec-api": "0.1.0-alpha.8", - "@typespec/spector": "0.1.0-alpha.17", - "@typespec/tspd": "0.72.2", - "@typespec/versioning": "0.73.0", - "@typespec/xml": "0.73.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/http-specs": "0.1.0-alpha.26", + "@typespec/json-schema": "1.4.0", + "@typespec/library-linter": "0.74.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/spec-api": "0.1.0-alpha.9", + "@typespec/spector": "0.1.0-alpha.18", + "@typespec/tspd": "0.73.0", + "@typespec/versioning": "0.74.0", + "@typespec/xml": "0.74.0", "@vitest/coverage-v8": "^3.0.5", "@vitest/ui": "^3.0.5", "c8": "^10.1.2", @@ -44,9 +44,9 @@ } }, "node_modules/@alloy-js/core": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@alloy-js/core/-/core-0.19.0.tgz", - "integrity": "sha512-Od92r7UgX7kRLJWfGD3+lLZBhrRQ5M2pV5Fqm1CuCKhFUV5CrfoW46DQy2gdSDLD4AE+N7oPo6DTkLqrxACHFA==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@alloy-js/core/-/core-0.20.0.tgz", + "integrity": "sha512-ylPf+ayI9MsqUPrNVzND3Oh9rVrfOOcMkyVwtXXaxaobWPkcRq2I4rX09FkG0i/9DoaLE6ZCvUfdgJsM29MYBA==", "dev": true, "license": "MIT", "dependencies": { @@ -54,7 +54,7 @@ "cli-table3": "^0.6.5", "pathe": "^2.0.3", "picocolors": "^1.1.1", - "prettier": "^3.5.3" + "prettier": "^3.6.2" } }, "node_modules/@alloy-js/core/node_modules/prettier": { @@ -74,24 +74,24 @@ } }, "node_modules/@alloy-js/markdown": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@alloy-js/markdown/-/markdown-0.19.0.tgz", - "integrity": "sha512-IKwzO6+ggXtl+bVy33wa5iBJx6KkMD7lzN3RJrKTvBPml7iuP21TwLjhUa1rmRQLekUZlbRuTYWaeWVEyrPYyw==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@alloy-js/markdown/-/markdown-0.20.0.tgz", + "integrity": "sha512-c1Q4dzUvWC4Bdoi6dRT9yAYVoCiqz3ZMClV8CHzEsgZYjjdS0S2ZWWmgxzS87rSDHSjmQIXJ4BcUZfKyfnMrFA==", "dev": true, "license": "MIT", "dependencies": { - "@alloy-js/core": "~0.19.0", + "@alloy-js/core": "~0.20.0", "yaml": "^2.7.1" } }, "node_modules/@alloy-js/typescript": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@alloy-js/typescript/-/typescript-0.19.0.tgz", - "integrity": "sha512-feYhirsNsKADZYWTwN+TrwD88cgdwQP1shDyBJuUgHPX2/LxSR2p5bace6Nw/qYOg44d1VVjf2pe+JFWNkShXw==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@alloy-js/typescript/-/typescript-0.20.0.tgz", + "integrity": "sha512-F1y5QjneE8GVxIq6oYsebu+Fccrn72qFHelNX5GSLfs4Ps2fxpk2+70rsGznZyHe9LIt70StaAciTjH6cxH4bQ==", "dev": true, "license": "MIT", "dependencies": { - "@alloy-js/core": "~0.19.0", + "@alloy-js/core": "~0.20.0", "change-case": "^5.4.4", "pathe": "^2.0.3" } @@ -111,45 +111,45 @@ } }, "node_modules/@azure-tools/azure-http-specs": { - "version": "0.1.0-alpha.27", - "resolved": "https://registry.npmjs.org/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.27.tgz", - "integrity": "sha512-70+PKuUGz/Uw7M5bS8daIf8OGw2nvZy9j4OC0Sy2dcEy8I85JgysE9Cjv59f9qsUFyVsGydI/uQSv4Njvnjfcg==", + "version": "0.1.0-alpha.28", + "resolved": "https://registry.npmjs.org/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.28.tgz", + "integrity": "sha512-rPd/37FGprH3Hg00r+JJ6a9cG4vadGMrd6Q+Ea8EXWArG5Vqq/FmzghxlafA+U9ByBbELQWnZlEDaRCaGC8fYA==", "dev": true, "license": "MIT", "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.8", - "@typespec/spector": "^0.1.0-alpha.17" + "@typespec/spec-api": "^0.1.0-alpha.9", + "@typespec/spector": "^0.1.0-alpha.18" }, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.59.0.tgz", - "integrity": "sha512-3vTWDTSR+P0qeyFcOKTgXortNOeA3nsyKTPpZqfFZVTtNFiiO17UWAM2Eg3i0IpNQ3qxMMAksIkwt1bqltTDqA==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.60.0.tgz", + "integrity": "sha512-Pmm7blxnEZZ7lhMJWWsiIqMrFthaCK6uu7f+ONN7dq0Mjc/O9w8+43tAIXwnGz1OKAWmiToh3EDbaxeWyt/FhQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.59.0.tgz", - "integrity": "sha512-q0UkBnwWE4+9ivAkwAOOrDF9kvSb+qRIvMXJdUlqGfwFqDkOvQFwHSzSDeL/mBNK2fB9NIePKPFjDGP9lpC0vQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.60.0.tgz", + "integrity": "sha512-u0gqgSO5lIcpZN11MBAmRnR7kM1eoBLO8cKB86bXrxLt2vAkYpuL4hWp0A+QJjQy/YI5rrijeBF0visqBJnR4A==", "dev": true, "license": "MIT", "dependencies": { @@ -160,34 +160,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.59.0.tgz", - "integrity": "sha512-+eKYH25ptj6SZHT+/YfxrX+g6HMAQQTphmHmqOoRCbbfPaE8l855OaDrwEgh5NDLV8WXnHpzTNI0dsYipEp10g==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.60.0.tgz", + "integrity": "sha512-4sx9StBWkmnBfLJ9b23RSwCs0TkTElaU9+6a/cS6JS0F7UggP/KLQd6LG59D0u9ByXM2x9pvYPO8l/K7UOXoPg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@azure-tools/typespec-azure-resource-manager": "^0.59.0", - "@azure-tools/typespec-client-generator-core": "^0.59.0", - "@typespec/compiler": "^1.3.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@azure-tools/typespec-azure-resource-manager": "^0.60.0", + "@azure-tools/typespec-client-generator-core": "^0.60.0", + "@typespec/compiler": "^1.4.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.59.0.tgz", - "integrity": "sha512-5+pVcOr7Uyq4IaZ3oLjLi8jnBuR+t/B8hQF4CZo+goe/uK+WkmDfw1TlY14G2ve7W7v8m9+Sk2nil6bN1uHWEQ==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.60.0.tgz", + "integrity": "sha512-JV9uiqxDCzVVFeMctm4ebmUI4982B3dCdKx0nmonjfRf9a2/MXilEKExPIaNVR3ZqbFPXM/IepheY8t9YZNqSQ==", "license": "MIT", "dependencies": { "change-case": "~5.4.4", @@ -198,16 +198,16 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.59.0", - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/sse": "^0.73.0", - "@typespec/streams": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@azure-tools/typespec-azure-core": "^0.60.0", + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/sse": "^0.74.0", + "@typespec/streams": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@azure/abort-controller": { @@ -363,9 +363,9 @@ } }, "node_modules/@azure/identity": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.10.2.tgz", - "integrity": "sha512-Uth4vz0j+fkXCkbvutChUj03PDCokjbC6Wk9JT8hHEUtpy/EurNKAseb3+gO6Zi9VYBvwt61pgbzn1ovk942Qg==", + "version": "4.11.2", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.11.2.tgz", + "integrity": "sha512-xajUK+qzN28JkVol93Ouleu+aNiETEx/LR2LkRWGb5vi8D2Tv6y5COyQHDZwVQhZW/EJDHNjuxjjv47jF3TntQ==", "dev": true, "license": "MIT", "dependencies": { @@ -400,22 +400,22 @@ } }, "node_modules/@azure/msal-browser": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.19.0.tgz", - "integrity": "sha512-g6Ea+sJmK7l5NUyrPhtD7DNj/tZcsr6VTNNLNuYs8yPvL3HNiIpO/0kzXntF9AqJ/6L+uz9aHmoT1x+RNq6zBQ==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.22.1.tgz", + "integrity": "sha512-/I76rBJpt5ZVfFXk+GkKxD4w1DZEbVpNn0aQjvRgnDnTYo3L/f8Oeo3R1O9eL/ccg5j1537iRLr7UwVhwnHtyg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.10.0" + "@azure/msal-common": "15.12.0" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "15.10.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.10.0.tgz", - "integrity": "sha512-+cGnma71NV3jzl6DdgdHsqriN4ZA7puBIzObSYCvcIVGMULGb2NrcOGV6IJxO06HoVRHFKijkxd9lcBvS063KQ==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.12.0.tgz", + "integrity": "sha512-4ucXbjVw8KJ5QBgnGJUeA07c8iznwlk5ioHIhI4ASXcXgcf2yRFhWzYOyWg/cI49LC9ekpFJeQtO3zjDTbl6TQ==", "dev": true, "license": "MIT", "engines": { @@ -423,13 +423,13 @@ } }, "node_modules/@azure/msal-node": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.7.0.tgz", - "integrity": "sha512-WsL11pT0hnoIr/4NCjG6uJswkmNA/9AgEre4mSQZS2e+ZPKUWwUdA5nCTnr4n1FMT1O5ezSEiJushnPW25Y+dA==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.7.3.tgz", + "integrity": "sha512-MoJxkKM/YpChfq4g2o36tElyzNUMG8mfD6u8NbuaPAsqfGpaw249khAcJYNoIOigUzRw45OjXCOrexE6ImdUxg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.10.0", + "@azure/msal-common": "15.12.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -438,28 +438,50 @@ } }, "node_modules/@azure/storage-blob": { - "version": "12.27.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.27.0.tgz", - "integrity": "sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==", + "version": "12.28.0", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.28.0.tgz", + "integrity": "sha512-VhQHITXXO03SURhDiGuHhvc/k/sD2WvJUS7hqhiVNbErVCuQoLtWql7r97fleBlIRKHJaa9R7DpBjfE0pfLYcA==", "dev": true, "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.4.0", - "@azure/core-client": "^1.6.2", - "@azure/core-http-compat": "^2.0.0", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.3", + "@azure/core-http-compat": "^2.2.0", "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.10.1", - "@azure/core-tracing": "^1.1.2", - "@azure/core-util": "^1.6.1", - "@azure/core-xml": "^1.4.3", - "@azure/logger": "^1.0.0", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/core-xml": "^1.4.5", + "@azure/logger": "^1.1.4", + "@azure/storage-common": "^12.0.0-beta.2", "events": "^3.0.0", - "tslib": "^2.2.0" + "tslib": "^2.8.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" + } + }, + "node_modules/@azure/storage-common": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.0.0.tgz", + "integrity": "sha512-QyEWXgi4kdRo0wc1rHum9/KnaWZKCdQGZK1BjU4fFL6Jtedp7KLbQihgTTVxldFy1z1ZPtuDPx8mQ5l3huPPbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-http-compat": "^2.2.0", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "events": "^3.3.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@babel/code-frame": { @@ -496,13 +518,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", - "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.1" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -512,9 +534,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -547,9 +569,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", - "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", "cpu": [ "ppc64" ], @@ -564,9 +586,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", - "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", "cpu": [ "arm" ], @@ -581,9 +603,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", - "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", "cpu": [ "arm64" ], @@ -598,9 +620,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", - "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", "cpu": [ "x64" ], @@ -615,9 +637,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", - "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", "cpu": [ "arm64" ], @@ -632,9 +654,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", - "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", "cpu": [ "x64" ], @@ -649,9 +671,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", - "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", "cpu": [ "arm64" ], @@ -666,9 +688,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", - "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", "cpu": [ "x64" ], @@ -683,9 +705,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", - "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", "cpu": [ "arm" ], @@ -700,9 +722,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", - "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", "cpu": [ "arm64" ], @@ -717,9 +739,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", - "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", "cpu": [ "ia32" ], @@ -734,9 +756,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", - "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", "cpu": [ "loong64" ], @@ -751,9 +773,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", - "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", "cpu": [ "mips64el" ], @@ -768,9 +790,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", - "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", "cpu": [ "ppc64" ], @@ -785,9 +807,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", - "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", "cpu": [ "riscv64" ], @@ -802,9 +824,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", - "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", "cpu": [ "s390x" ], @@ -819,9 +841,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", - "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", "cpu": [ "x64" ], @@ -836,9 +858,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", - "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", "cpu": [ "arm64" ], @@ -853,9 +875,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", - "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", "cpu": [ "x64" ], @@ -870,9 +892,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", - "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", "cpu": [ "arm64" ], @@ -887,9 +909,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", - "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", "cpu": [ "x64" ], @@ -903,10 +925,27 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", - "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", "cpu": [ "x64" ], @@ -921,9 +960,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", - "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", "cpu": [ "arm64" ], @@ -938,9 +977,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", - "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", "cpu": [ "ia32" ], @@ -955,9 +994,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", - "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", "cpu": [ "x64" ], @@ -972,9 +1011,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { @@ -1048,10 +1087,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/js": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", - "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "version": "9.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz", + "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==", "dev": true, "license": "MIT", "engines": { @@ -1062,16 +1114,16 @@ } }, "node_modules/@gerrit0/mini-shiki": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.4.2.tgz", - "integrity": "sha512-3jXo5bNjvvimvdbIhKGfFxSnKCX+MA8wzHv55ptzk/cx8wOzT+BRcYgj8aFN3yTiTs+zvQQiaZFr7Jce1ZG3fw==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.12.2.tgz", + "integrity": "sha512-HKZPmO8OSSAAo20H2B3xgJdxZaLTwtlMwxg0967scnrDlPwe6j5+ULGHyIqwgTbFCn9yv/ff8CmfWZLE9YKBzA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/engine-oniguruma": "^3.4.2", - "@shikijs/langs": "^3.4.2", - "@shikijs/themes": "^3.4.2", - "@shikijs/types": "^3.4.2", + "@shikijs/engine-oniguruma": "^3.12.2", + "@shikijs/langs": "^3.12.2", + "@shikijs/themes": "^3.12.2", + "@shikijs/types": "^3.12.2", "@shikijs/vscode-textmate": "^10.0.2" } }, @@ -1091,6 +1143,19 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1114,14 +1179,14 @@ "license": "BSD-3-Clause" }, "node_modules/@inquirer/checkbox": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.6.tgz", - "integrity": "sha512-62u896rWCtKKE43soodq5e/QcRsA22I+7/4Ov7LESWnKRO6BVo2A1DFLDmXL9e28TB0CfHc3YtkbPm7iwajqkg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.2.tgz", + "integrity": "sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", + "@inquirer/core": "^10.2.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, @@ -1138,13 +1203,13 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.10", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.10.tgz", - "integrity": "sha512-FxbQ9giWxUWKUk2O5XZ6PduVnH2CZ/fmMKMBkH71MHJvWr7WL5AHKevhzF1L5uYWB2P548o1RzVxrNd3dpmk6g==", + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.16.tgz", + "integrity": "sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6" + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1159,13 +1224,13 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.11.tgz", - "integrity": "sha512-BXwI/MCqdtAhzNQlBEFE7CEflhPkl/BqvAuV/aK6lW3DClIfYVDWPP/kXuXHtBWC7/EEbNqd/1BGq2BGBBnuxw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.0.tgz", + "integrity": "sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==", "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "ansi-escapes": "^4.3.2", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", @@ -1186,14 +1251,14 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.11.tgz", - "integrity": "sha512-YoZr0lBnnLFPpfPSNsQ8IZyKxU47zPyVi9NLjCWtna52//M/xuL0PGPAxHxxYhdOhnvY2oBafoM+BI5w/JK7jw==", + "version": "4.2.18", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.18.tgz", + "integrity": "sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", - "external-editor": "^3.1.0" + "@inquirer/core": "^10.2.0", + "@inquirer/external-editor": "^1.0.1", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1208,13 +1273,13 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.13.tgz", - "integrity": "sha512-HgYNWuZLHX6q5y4hqKhwyytqAghmx35xikOGY3TcgNiElqXGPas24+UzNPOwGUZa5Dn32y25xJqVeUcGlTv+QQ==", + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.18.tgz", + "integrity": "sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1229,23 +1294,44 @@ } } }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", + "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "license": "MIT", + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.6.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/figures": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.11.tgz", - "integrity": "sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@inquirer/input": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.10.tgz", - "integrity": "sha512-kV3BVne3wJ+j6reYQUZi/UN9NZGZLxgc/tfyjeK3mrx1QI7RXPxGp21IUTv+iVHcbP4ytZALF8vCHoxyNSC6qg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.2.tgz", + "integrity": "sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6" + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1260,13 +1346,13 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.13.tgz", - "integrity": "sha512-IrLezcg/GWKS8zpKDvnJ/YTflNJdG0qSFlUM/zNFsdi4UKW/CO+gaJpbMgQ20Q58vNKDJbEzC6IebdkprwL6ew==", + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.18.tgz", + "integrity": "sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6" + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" @@ -1281,13 +1367,13 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.13.tgz", - "integrity": "sha512-NN0S/SmdhakqOTJhDwOpeBEEr8VdcYsjmZHDb0rblSh2FcbXQOr+2IApP7JG4WE3sxIdKytDn4ed3XYwtHxmJQ==", + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.18.tgz", + "integrity": "sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8", "ansi-escapes": "^4.3.2" }, "engines": { @@ -1303,21 +1389,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.1.tgz", - "integrity": "sha512-5AOrZPf2/GxZ+SDRZ5WFplCA2TAQgK3OYrXCYmJL5NaTu4ECcoWFlfUZuw7Es++6Njv7iu/8vpYJhuzxUH76Vg==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.4.tgz", + "integrity": "sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.6", - "@inquirer/confirm": "^5.1.10", - "@inquirer/editor": "^4.2.11", - "@inquirer/expand": "^4.0.13", - "@inquirer/input": "^4.1.10", - "@inquirer/number": "^3.0.13", - "@inquirer/password": "^4.0.13", - "@inquirer/rawlist": "^4.1.1", - "@inquirer/search": "^3.0.13", - "@inquirer/select": "^4.2.1" + "@inquirer/checkbox": "^4.2.2", + "@inquirer/confirm": "^5.1.16", + "@inquirer/editor": "^4.2.18", + "@inquirer/expand": "^4.0.18", + "@inquirer/input": "^4.2.2", + "@inquirer/number": "^3.0.18", + "@inquirer/password": "^4.0.18", + "@inquirer/rawlist": "^4.1.6", + "@inquirer/search": "^3.1.1", + "@inquirer/select": "^4.3.2" }, "engines": { "node": ">=18" @@ -1332,13 +1418,13 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.1.tgz", - "integrity": "sha512-VBUC0jPN2oaOq8+krwpo/mf3n/UryDUkKog3zi+oIi8/e5hykvdntgHUB9nhDM78RubiyR1ldIOfm5ue+2DeaQ==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.6.tgz", + "integrity": "sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", + "@inquirer/core": "^10.2.0", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1354,14 +1440,14 @@ } }, "node_modules/@inquirer/search": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.13.tgz", - "integrity": "sha512-9g89d2c5Izok/Gw/U7KPC3f9kfe5rA1AJ24xxNZG0st+vWekSk7tB9oE+dJv5JXd0ZSijomvW0KPMoBd8qbN4g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.1.tgz", + "integrity": "sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", + "@inquirer/core": "^10.2.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -1377,14 +1463,14 @@ } }, "node_modules/@inquirer/select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.1.tgz", - "integrity": "sha512-gt1Kd5XZm+/ddemcT3m23IP8aD8rC9drRckWoP/1f7OL46Yy2FGi8DSmNjEjQKtPl6SV96Kmjbl6p713KXJ/Jg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.2.tgz", + "integrity": "sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", + "@inquirer/core": "^10.2.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, @@ -1401,9 +1487,9 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.6.tgz", - "integrity": "sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", "license": "MIT", "engines": { "node": ">=18" @@ -1459,9 +1545,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -1472,9 +1558,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -1484,10 +1570,35 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -1541,18 +1652,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -1565,27 +1672,17 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -1594,9 +1691,9 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.52.10", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.52.10.tgz", - "integrity": "sha512-LhKytJM5ZJkbHQVfW/3o747rZUNs/MGg6j/wt/9qwwqEOfvUDTYXXxIBuMgrRXhJ528p41iyz4zjBVHZU74Odg==", + "version": "7.52.11", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.52.11.tgz", + "integrity": "sha512-IKQ7bHg6f/Io3dQds6r9QPYk4q0OlR9A4nFDtNhUt3UUIhyitbxAqRN1CLjUVtk6IBk3xzyCMOdwwtIXQ7AlGg==", "dev": true, "license": "MIT", "dependencies": { @@ -1643,22 +1740,6 @@ "node": ">=10" } }, - "node_modules/@microsoft/api-extractor/node_modules/minimatch": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", - "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", - "dev": true, - "license": "ISC", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@microsoft/api-extractor/node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -1787,9 +1868,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz", - "integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.1.tgz", + "integrity": "sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==", "cpu": [ "arm" ], @@ -1801,9 +1882,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz", - "integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.1.tgz", + "integrity": "sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==", "cpu": [ "arm64" ], @@ -1815,9 +1896,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz", - "integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.1.tgz", + "integrity": "sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==", "cpu": [ "arm64" ], @@ -1829,9 +1910,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz", - "integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.1.tgz", + "integrity": "sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==", "cpu": [ "x64" ], @@ -1843,9 +1924,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz", - "integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.1.tgz", + "integrity": "sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==", "cpu": [ "arm64" ], @@ -1857,9 +1938,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz", - "integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.1.tgz", + "integrity": "sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==", "cpu": [ "x64" ], @@ -1871,9 +1952,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz", - "integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.1.tgz", + "integrity": "sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==", "cpu": [ "arm" ], @@ -1885,9 +1966,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz", - "integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.1.tgz", + "integrity": "sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==", "cpu": [ "arm" ], @@ -1899,9 +1980,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz", - "integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.1.tgz", + "integrity": "sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==", "cpu": [ "arm64" ], @@ -1913,9 +1994,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", - "integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.1.tgz", + "integrity": "sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==", "cpu": [ "arm64" ], @@ -1927,9 +2008,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz", - "integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.50.1.tgz", + "integrity": "sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==", "cpu": [ "loong64" ], @@ -1940,10 +2021,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz", - "integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==", + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.1.tgz", + "integrity": "sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==", "cpu": [ "ppc64" ], @@ -1955,9 +2036,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz", - "integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.1.tgz", + "integrity": "sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==", "cpu": [ "riscv64" ], @@ -1969,9 +2050,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz", - "integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.1.tgz", + "integrity": "sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==", "cpu": [ "riscv64" ], @@ -1983,9 +2064,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz", - "integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.1.tgz", + "integrity": "sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==", "cpu": [ "s390x" ], @@ -1997,9 +2078,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", - "integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.1.tgz", + "integrity": "sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==", "cpu": [ "x64" ], @@ -2011,9 +2092,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz", - "integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.1.tgz", + "integrity": "sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==", "cpu": [ "x64" ], @@ -2024,10 +2105,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.1.tgz", + "integrity": "sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz", - "integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.1.tgz", + "integrity": "sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==", "cpu": [ "arm64" ], @@ -2039,9 +2134,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz", - "integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.1.tgz", + "integrity": "sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==", "cpu": [ "ia32" ], @@ -2053,9 +2148,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz", - "integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.1.tgz", + "integrity": "sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==", "cpu": [ "x64" ], @@ -2174,22 +2269,6 @@ } } }, - "node_modules/@rushstack/terminal/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/@rushstack/ts-command-line": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-5.0.2.tgz", @@ -2203,51 +2282,41 @@ "string-argv": "~0.3.1" } }, - "node_modules/@rushstack/ts-command-line/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.4.2.tgz", - "integrity": "sha512-zcZKMnNndgRa3ORja6Iemsr3DrLtkX3cAF7lTJkdMB6v9alhlBsX9uNiCpqofNrXOvpA3h6lHcLJxgCIhVOU5Q==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.12.2.tgz", + "integrity": "sha512-hozwnFHsLvujK4/CPVHNo3Bcg2EsnG8krI/ZQ2FlBlCRpPZW4XAEQmEwqegJsypsTAN9ehu2tEYe30lYKSZW/w==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.4.2", + "@shikijs/types": "3.12.2", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.4.2.tgz", - "integrity": "sha512-H6azIAM+OXD98yztIfs/KH5H4PU39t+SREhmM8LaNXyUrqj2mx+zVkr8MWYqjceSjDw9I1jawm1WdFqU806rMA==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.12.2.tgz", + "integrity": "sha512-bVx5PfuZHDSHoBal+KzJZGheFuyH4qwwcwG/n+MsWno5cTlKmaNtTsGzJpHYQ8YPbB5BdEdKU1rga5/6JGY8ww==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.4.2" + "@shikijs/types": "3.12.2" } }, "node_modules/@shikijs/themes": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.4.2.tgz", - "integrity": "sha512-qAEuAQh+brd8Jyej2UDDf+b4V2g1Rm8aBIdvt32XhDPrHvDkEnpb7Kzc9hSuHUxz0Iuflmq7elaDuQAP9bHIhg==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.12.2.tgz", + "integrity": "sha512-fTR3QAgnwYpfGczpIbzPjlRnxyONJOerguQv1iwpyQZ9QXX4qy/XFQqXlf17XTsorxnHoJGbH/LXBvwtqDsF5A==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.4.2" + "@shikijs/types": "3.12.2" } }, "node_modules/@shikijs/types": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.4.2.tgz", - "integrity": "sha512-zHC1l7L+eQlDXLnxvM9R91Efh2V4+rN3oMVS2swCBssbj2U/FBwybD1eeLaq8yl/iwT+zih8iUbTBCgGZOYlVg==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.12.2.tgz", + "integrity": "sha512-K5UIBzxCyv0YoxN3LMrKB9zuhp1bV+LgewxuVwHdl4Gz5oePoUFrr9EfgJlGlDeXCU1b/yhdnXeuRvAnz8HN8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2281,10 +2350,27 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2313,13 +2399,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.7.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.9.tgz", - "integrity": "sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==", + "version": "22.12.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz", + "integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==", "devOptional": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.20.0" } }, "node_modules/@types/prettier": { @@ -2489,9 +2575,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2587,22 +2673,22 @@ } }, "node_modules/@typespec/asset-emitter": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/asset-emitter/-/asset-emitter-0.73.0.tgz", - "integrity": "sha512-SigCa9k8gS+AiHE7Ky/kcwyqFM5kuJ0wXT+Dy89Jbd+wwrYu+mKXyXbScrTdc+MBzut+rFltFENgEYXsSvA/mA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/asset-emitter/-/asset-emitter-0.74.0.tgz", + "integrity": "sha512-DWIdlSNhRgBeZ8exfqubfUn0H6mRg4gr0s7zLTdBMUEDHL3Yh0ljnRPkd8AXTZhoW3maTFT69loWTrqx09T5oQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/compiler": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.3.0.tgz", - "integrity": "sha512-OqpoNP3C2y8riA6C5RofPMvmj9jNiGyyhde0tM2ZE7IBOv7BBaTDqw4CJD22YnC8JEilRfPmvdVCViNrPHEjrA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.4.0.tgz", + "integrity": "sha512-/AFiU3ImuhH/vHKzSGv7I2peewdJ7YLhgMCfFDNk6Ae0a5Ylrc8R1GOATVilisEPBFG9lnjHn3uUcyaZs5VWRw==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.27.1", @@ -2631,50 +2717,6 @@ "node": ">=20.0.0" } }, - "node_modules/@typespec/compiler/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@typespec/compiler/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@typespec/compiler/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@typespec/compiler/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "license": "MIT" - }, "node_modules/@typespec/compiler/node_modules/prettier": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", @@ -2690,210 +2732,134 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/@typespec/compiler/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "node_modules/@typespec/events": { + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.74.0.tgz", + "integrity": "sha512-CY6JTtheMKAUlxiPmwx2fLIAWEwezsXmQYUMRhyuW44Q73unQIkexE43LUnNWOJSZckYucqUp+ihXh7jxzWeVQ==", "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, + "peer": true, "engines": { - "node": ">=18" + "node": ">=20.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@typespec/compiler": "^1.4.0" } }, - "node_modules/@typespec/compiler/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/@typespec/http": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.4.0.tgz", + "integrity": "sha512-Y0PDDtBu+oZnwivfhbL0lN6Mk3QiCxZ66DgB5kFjcgKNpnXf0u440PPyaL42a8lbchzz5lVwz+cinyIMI89FIQ==", "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, "engines": { - "node": ">=12" + "node": ">=20.0.0" }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "peerDependencies": { + "@typespec/compiler": "^1.4.0", + "@typespec/streams": "^0.74.0" + }, + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } + } + }, + "node_modules/@typespec/http-client-csharp": { + "version": "1.0.0-alpha.20250918.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250918.1.tgz", + "integrity": "sha512-Yy5FOOjC6XgQdHO3f1iIMby8yRjE93i6ZeALfyq7PgCNee2Kf7ucmzfkZaM4QgiiGLba1ibCqO1nbn99zeb04Q==", + "license": "MIT", + "peerDependencies": { + "@azure-tools/typespec-client-generator-core": ">=0.60.0 < 0.61.0 || ~0.61.0-0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/openapi": "^1.4.0", + "@typespec/rest": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/streams": ">=0.74.0 <0.75.0 || ~0.75.0-0", + "@typespec/versioning": ">=0.74.0 <0.75.0 || ~0.75.0-0" } }, - "node_modules/@typespec/compiler/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "node_modules/@typespec/http-specs": { + "version": "0.1.0-alpha.26", + "resolved": "https://registry.npmjs.org/@typespec/http-specs/-/http-specs-0.1.0-alpha.26.tgz", + "integrity": "sha512-Mhsn6kwj0VU1AMCObuieVDlxGJ49wW8cXTb0E8WNz72CB3R/+ZKKp9Wg/wYrfJurbFEKNBiPu/WWdVJrXWV8Bg==", + "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@typespec/compiler/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/compiler/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/events": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.73.0.tgz", - "integrity": "sha512-etlhp86amDaElD/UX27u9I4O58zREov73HkkV3xbdTWpv2RqOKyD3mkyGAWsW3hKaGVIxwHOvKcOZ2j+b07Gpw==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "^1.3.0" - } - }, - "node_modules/@typespec/http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.3.0.tgz", - "integrity": "sha512-4W3KsmBHZGgECVbvyh7S7KQG06948XyVVzae+UbVDDxoUj/x4Ry0AXw3q4HmzB2BVhxw6JBrwBuVa5mxjVMzdw==", - "license": "MIT", - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/streams": "^0.73.0" - }, - "peerDependenciesMeta": { - "@typespec/streams": { - "optional": true - } - } - }, - "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250908.5", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250908.5.tgz", - "integrity": "sha512-zB3QrNQWBi248oYUIwnfnMDmxZLpNblNXZMzYdM3PzandepZAo0U+AWLaeovEPnGvIi8shEt3CmhbJAouil3qA==", - "license": "MIT", - "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/openapi": "^1.3.0", - "@typespec/rest": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/streams": ">=0.73.0 <0.74.0 || ~0.74.0-0", - "@typespec/versioning": ">=0.73.0 <0.74.0 || ~0.74.0-0" - } - }, - "node_modules/@typespec/http-specs": { - "version": "0.1.0-alpha.25", - "resolved": "https://registry.npmjs.org/@typespec/http-specs/-/http-specs-0.1.0-alpha.25.tgz", - "integrity": "sha512-3/3uMaWSLjc5wP0gT5K8O7s0bgW/6dJiFpKhFR1HT7y8/rFguVRVXRn/SC43F00ADjE3VVlxWqeSeYK59uuAHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.8", - "@typespec/spector": "^0.1.0-alpha.17", - "deep-equal": "^2.2.0" + "@typespec/spec-api": "^0.1.0-alpha.9", + "@typespec/spector": "^0.1.0-alpha.18", + "deep-equal": "^2.2.0" }, "engines": { "node": ">=16.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/versioning": "^0.73.0", - "@typespec/xml": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/versioning": "^0.74.0", + "@typespec/xml": "^0.74.0" } }, "node_modules/@typespec/json-schema": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/json-schema/-/json-schema-1.3.0.tgz", - "integrity": "sha512-q04h8OmsbGguP12KR8qVz9jabDYImUrQtXsaMCRl361FfnDL21ASSBmy1GpwfUF4vxFc0Mf0xs6SI7ZZLAY87Q==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/json-schema/-/json-schema-1.4.0.tgz", + "integrity": "sha512-0Hay3//LZEHRAs/oUZuY9AM63tZguuneD0KRaN93r+XKZ1iKdBxL8q2XfqS+Ie5TGvN/C/iRSu0AhYwGyzTY9w==", "dev": true, "license": "MIT", "dependencies": { - "@typespec/asset-emitter": "^0.73.0", + "@typespec/asset-emitter": "^0.74.0", "yaml": "~2.8.0" }, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/library-linter": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/library-linter/-/library-linter-0.73.0.tgz", - "integrity": "sha512-UF1QFUIsZQLcv+4bifAWeyBfHzEwiffUHOqWbtERTqf0fRkrAobWWlXpCr9CB/NAV72laq2+pBojO4ttg0HKBQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/library-linter/-/library-linter-0.74.0.tgz", + "integrity": "sha512-65+e/+RLUD2SoS18xMMDc/O/8Eh4hlmDFUg+D20cni6TSmXYwQB492WOouQKfxGCCcC1jW9jFAR/GqEwGD295Q==", "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/openapi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.3.0.tgz", - "integrity": "sha512-BSeshjCZQodVGyVHn7ytcUeIcUGjqbG2Ac0NLOQaaKnISVrhTWNcgo5aFTqxAa24ZL/EuhqlSauLyYce2EV9fw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.4.0.tgz", + "integrity": "sha512-ZfrCsmZG/Zt1laLaWC0pKvnZr4jqrm/YS/YuZe/gVrSYKBxGLopXle7H0wrSSMYkIVCNCLiC68/HqRxV6XTfoA==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/rest": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.73.0.tgz", - "integrity": "sha512-28hgFGvreBg34Xuguw+E++pQC/kbRxy1Bpx/9nU7x87Ly6ykns3lpx74gjY9ByE8VYKVbXtC7lzdnp19DRSjIQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.74.0.tgz", + "integrity": "sha512-dE+Xmv01AQ7m8jUvEbGsUQLSVo3sLzMpnHRbQEOnJX42oDqtIsz/2GEOXKQpNm1AKBISK66E2FFB5boz999Ziw==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0" + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0" } }, "node_modules/@typespec/spec-api": { - "version": "0.1.0-alpha.8", - "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.8.tgz", - "integrity": "sha512-WEnnx/Ts53wruj8WL5oR/aAFxTO2gkb8uzhdjZtiGkEy2iJGTus/bETh+aIIzRcoTJ3+o8JucrTvAUMauCOICQ==", + "version": "0.1.0-alpha.9", + "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.9.tgz", + "integrity": "sha512-EOJYl7z8F8cdZnnJdXOhRSePZ/k4z7q8G7CD/byHB5Esu/gAs1jDh9mSDU837Rszt0ABaYmexRwn8NOlFvusZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2906,52 +2872,52 @@ } }, "node_modules/@typespec/spec-coverage-sdk": { - "version": "0.1.0-alpha.9", - "resolved": "https://registry.npmjs.org/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.9.tgz", - "integrity": "sha512-8L2c2r9Z7wrChaAyuuo9Ix3++urtjoyfLTvxRd8PNWJLL8nPYAmetDngmSg3J4Sfxq4nHP5pxIIVBG0axFiGwA==", + "version": "0.1.0-alpha.10", + "resolved": "https://registry.npmjs.org/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.10.tgz", + "integrity": "sha512-WmXT8FAsWfsBHR5POQ8hpuKqGR1J+hrERl0FypRGFmPmVwrHOH1ATsv6JLeLEVjpbTWfy00Ly/7b7oVJOfCLPw==", "dev": true, "license": "MIT", "dependencies": { - "@azure/identity": "~4.10.1", - "@azure/storage-blob": "~12.27.0", - "@types/node": "~24.1.0" + "@azure/identity": "~4.11.1", + "@azure/storage-blob": "~12.28.0", + "@types/node": "~24.3.0" }, "engines": { "node": ">=16.0.0" } }, "node_modules/@typespec/spec-coverage-sdk/node_modules/@types/node": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", - "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "version": "24.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz", + "integrity": "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.10.0" } }, "node_modules/@typespec/spec-coverage-sdk/node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", "dev": true, "license": "MIT" }, "node_modules/@typespec/spector": { - "version": "0.1.0-alpha.17", - "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.17.tgz", - "integrity": "sha512-N1jfnrOKUlm09cuZ9W54gRVfoti7D36+hs/FaOlgXrFMjpFzBydkHY005CpgsdBJhSZN/ae1rizdZ5dkJpN6Aw==", + "version": "0.1.0-alpha.18", + "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.18.tgz", + "integrity": "sha512-DwKUkqkMwfAnDnycDG6GrS9z+24EI/AqnY+bQX9otcbDa+d21RYacKOG70Epjc5aF1T8D/MN4BDOjl8JIHUtvg==", "dev": true, "license": "MIT", "dependencies": { - "@azure/identity": "~4.10.1", + "@azure/identity": "~4.11.1", "@types/js-yaml": "^4.0.5", - "@typespec/compiler": "^1.3.0", - "@typespec/http": "^1.3.0", - "@typespec/rest": "^0.73.0", - "@typespec/spec-api": "^0.1.0-alpha.8", - "@typespec/spec-coverage-sdk": "^0.1.0-alpha.9", - "@typespec/versioning": "^0.73.0", + "@typespec/compiler": "^1.4.0", + "@typespec/http": "^1.4.0", + "@typespec/rest": "^0.74.0", + "@typespec/spec-api": "^0.1.0-alpha.9", + "@typespec/spec-coverage-sdk": "^0.1.0-alpha.10", + "@typespec/versioning": "^0.74.0", "ajv": "~8.17.1", "body-parser": "^2.2.0", "deep-equal": "^2.2.0", @@ -2973,161 +2939,33 @@ "node": ">=16.0.0" } }, - "node_modules/@typespec/spector/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@typespec/spector/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typespec/spector/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@typespec/spector/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@typespec/spector/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@typespec/spector/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, "node_modules/@typespec/sse": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.73.0.tgz", - "integrity": "sha512-WTnRJ1b1M3RPzlHxhnK9sh6+AGKPKWpuA0TSAqzyxb/uRHFYLNeoDKPOnlQ749SJ8lJz71Oh0nUsP3vB0EzO6Q==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.74.0.tgz", + "integrity": "sha512-+m7/elbGp7q/kqCGaBRj8v8wVMWKVEV8AsZOjf1PY2MkMUrux9ivOijBIktgoLBXDn+ocO2qVfFrHWG2slZSaw==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0", - "@typespec/events": "^0.73.0", - "@typespec/http": "^1.3.0", - "@typespec/streams": "^0.73.0" + "@typespec/compiler": "^1.4.0", + "@typespec/events": "^0.74.0", + "@typespec/http": "^1.4.0", + "@typespec/streams": "^0.74.0" } }, "node_modules/@typespec/streams": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.73.0.tgz", - "integrity": "sha512-pL4xffHXEIhBQKPlB9L4AKuM0bn44WsGKjnz91wa6wBtP/CbsPrGQicof0Z7GPGdddtDi4G8PWGmJtVFw53V9g==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.74.0.tgz", + "integrity": "sha512-LIWizQgzGt8qN8ravte4DrPLPNOk9ge73bV9Us2TOECagTVQWwgMVy7+o/Beff3sOLQO/sEOwfzvmnNpSlauHg==", "license": "MIT", "peer": true, "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/ts-http-runtime": { @@ -3146,20 +2984,20 @@ } }, "node_modules/@typespec/tspd": { - "version": "0.72.2", - "resolved": "https://registry.npmjs.org/@typespec/tspd/-/tspd-0.72.2.tgz", - "integrity": "sha512-rDj0wVpE4ypHaTCdqbmkxIo5PrDxY80YZ4bBKuGN3gXDMLn5J6mMyHQVeJ+MXGY+p0xBN3VlgpllDiRDHNK9VQ==", + "version": "0.73.0", + "resolved": "https://registry.npmjs.org/@typespec/tspd/-/tspd-0.73.0.tgz", + "integrity": "sha512-2Zk0XHpSrVak06c2JoUMMWLt/6bXMEmTbqVR7i4EPftvWCJepJrA8jw0MokAksX9Q+Qh6fn3oEE2w5huZHyp6Q==", "dev": true, "license": "MIT", "dependencies": { - "@alloy-js/core": "^0.19.0", - "@alloy-js/markdown": "^0.19.0", - "@alloy-js/typescript": "^0.19.0", + "@alloy-js/core": "^0.20.0", + "@alloy-js/markdown": "^0.20.0", + "@alloy-js/typescript": "^0.20.0", "@microsoft/api-extractor": "^7.52.1", "@microsoft/api-extractor-model": "^7.30.6", "@microsoft/tsdoc": "^0.15.1", "@microsoft/tsdoc-config": "^0.17.1", - "@typespec/compiler": "^1.3.0", + "@typespec/compiler": "^1.4.0", "picocolors": "~1.1.1", "prettier": "~3.6.2", "typedoc": "^0.28.1", @@ -3171,175 +3009,47 @@ "tspd": "cmd/tspd.js" }, "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@typespec/tspd/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@typespec/tspd/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typespec/tspd/node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@typespec/tspd/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@typespec/tspd/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" + "node": ">=20.0.0" } }, - "node_modules/@typespec/tspd/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "node_modules/@typespec/tspd/node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, - "license": "ISC", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/@typespec/versioning": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.73.0.tgz", - "integrity": "sha512-cfFvzTsvsu4VpdwZcRULr3p/fawKZnjiJClQxlLcYW0dLs/5k5jh7l0YyPkYvgkOcncUrIB6hIu82tQhKrMDKQ==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.74.0.tgz", + "integrity": "sha512-eFIa23tycWJgv3Lxyu6jUlRi02dhtQE4Jjx3Ui5vEbwHW8pMEzuyF7ALt1c+V9HOLkfDkS4dJkiOVIoikZHPvQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@typespec/xml": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.73.0.tgz", - "integrity": "sha512-vlMM8/L22O/PbI3ovj3qoww/3Z8wNwn7og4jzlGRM93jZBJvrOeDSwZo1Dc4rMJyU6KfjPkP3/l5TLbgW8x0zA==", + "version": "0.74.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.74.0.tgz", + "integrity": "sha512-NiXatOfpyPxU94f2tEBAygxJeS7CvIr5lvnfZkC0tUHwkiJeLrI1jt13kDVB5CE6zNK6I3d7c37xsQs9WXGFAQ==", "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.3.0" + "@typespec/compiler": "^1.4.0" } }, "node_modules/@ungap/structured-clone": { @@ -3350,15 +3060,16 @@ "license": "ISC" }, "node_modules/@vitest/coverage-v8": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.1.4.tgz", - "integrity": "sha512-G4p6OtioySL+hPV7Y6JHlhpsODbJzt1ndwHAFkyk6vVjpK03PFsKnauZIzcd0PrK4zAbc5lc+jeZ+eNGiMA+iw==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.4.tgz", + "integrity": "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^1.0.2", - "debug": "^4.4.0", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", @@ -3373,8 +3084,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "3.1.4", - "vitest": "3.1.4" + "@vitest/browser": "3.2.4", + "vitest": "3.2.4" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -3383,14 +3094,15 @@ } }, "node_modules/@vitest/expect": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.4.tgz", - "integrity": "sha512-xkD/ljeliyaClDYqHPNCiJ0plY5YIcM0OlRiZizLhlPmpXWpxnGMyTZXOHFhFeG7w9P5PBeL4IdtJ/HeQwTbQA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -3398,37 +3110,10 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/mocker": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.4.tgz", - "integrity": "sha512-8IJ3CvwtSw/EFXqWFL8aCMu+YyYXG2WUSrQbViOZkWTKTVicVwZ/YiEZDSqD00kX+v/+W+OnxhNWoeVKorHygA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.1.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, "node_modules/@vitest/pretty-format": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.4.tgz", - "integrity": "sha512-cqv9H9GvAEoTaoq+cYqUTCGscUjKqlJZC7PRwY5FMySVj5J+xOm1KQcCiYHJOEzOKRUhLH4R2pTwvFlWCEScsg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", "dev": true, "license": "MIT", "dependencies": { @@ -3439,27 +3124,28 @@ } }, "node_modules/@vitest/runner": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.4.tgz", - "integrity": "sha512-djTeF1/vt985I/wpKVFBMWUlk/I7mb5hmD5oP8K9ACRmVXgKTae3TUOtXAEBfslNKPzUQvnKhNd34nnRSYgLNQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.4", - "pathe": "^2.0.3" + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.4.tgz", - "integrity": "sha512-JPHf68DvuO7vilmvwdPr9TS0SuuIzHvxeaCkxYcCD4jTk67XwL45ZhEHFKIuCm8CYstgI6LZ4XbwD6ANrwMpFg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.4", + "@vitest/pretty-format": "3.2.4", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -3468,49 +3154,49 @@ } }, "node_modules/@vitest/spy": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.4.tgz", - "integrity": "sha512-Xg1bXhu+vtPXIodYN369M86K8shGLouNjoVI78g8iAq2rFoHFdajNvJJ5A/9bPMFcfQqdaCpOgWKEoMQg/s0Yg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.2" + "tinyspy": "^4.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/ui": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.1.4.tgz", - "integrity": "sha512-CFc2Bpb3sz4Sdt53kdNGq+qZKLftBwX4qZLC03CBUc0N1LJrOoL0ZeK0oq/708mtnpwccL0BZCY9d1WuiBSr7Q==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.2.4.tgz", + "integrity": "sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.4", + "@vitest/utils": "3.2.4", "fflate": "^0.8.2", "flatted": "^3.3.3", "pathe": "^2.0.3", "sirv": "^3.0.1", - "tinyglobby": "^0.2.13", + "tinyglobby": "^0.2.14", "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "3.1.4" + "vitest": "3.2.4" } }, "node_modules/@vitest/utils": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.4.tgz", - "integrity": "sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.4", - "loupe": "^3.1.3", + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" }, "funding": { @@ -3518,19 +3204,19 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.5.18", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.18.tgz", - "integrity": "sha512-x0vPO5Imw+3sChLM5Y+B6G1zPjwdOri9e8V21NnTnlEvkxatHEH5B5KEAJcjuzQ7BsjGrKtfzuQ5eQwXh8HXBg==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.21.tgz", + "integrity": "sha512-3ah7sa+Cwr9iiYEERt9JfZKPw4A2UlbY8RbbnH2mGCE8NwHkhmlZt2VsH0oDA3P08X3jJd29ohBDtX+TbD9AsA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/shared": "3.5.18" + "@vue/shared": "3.5.21" } }, "node_modules/@vue/shared": { - "version": "3.5.18", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.18.tgz", - "integrity": "sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==", + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.21.tgz", + "integrity": "sha512-+2k1EQpnYuVuu3N7atWyG3/xoFWIVJZq4Mz8XNOdScFI0etES75fbny/oU4lKWk/577P1zmg0ioYvpGEDZ3DLw==", "dev": true, "license": "MIT" }, @@ -3549,9 +3235,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -3677,11 +3363,14 @@ "license": "MIT" }, "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "Python-2.0" + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", @@ -3720,6 +3409,25 @@ "node": ">=12" } }, + "node_modules/ast-v8-to-istanbul": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.5.tgz", + "integrity": "sha512-9SdXjNheSiE8bALAQCQQuT6fgQaoxJh7IRYrRGZ8/9nv8WhJeC1aXAwN8TbaOssGOukUvyvnkgD9+Yuykvl1aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.30", + "estree-walker": "^3.0.3", + "js-tokens": "^9.0.1" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -3784,23 +3492,10 @@ "node": ">=18" } }, - "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -3906,6 +3601,58 @@ } } }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3977,9 +3724,9 @@ } }, "node_modules/chai": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", - "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", "dev": true, "license": "MIT", "dependencies": { @@ -3990,7 +3737,7 @@ "pathval": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/chalk": { @@ -4010,6 +3757,19 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/change-case": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", @@ -4017,9 +3777,9 @@ "license": "MIT" }, "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", "license": "MIT" }, "node_modules/check-error": { @@ -4057,28 +3817,6 @@ "@colors/colors": "1.5.0" } }, - "node_modules/cli-table3/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-table3/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/cli-width": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", @@ -4089,55 +3827,93 @@ } }, "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", "license": "MIT" }, "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -4482,10 +4258,9 @@ "license": "MIT" }, "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, "node_modules/encodeurl": { @@ -4585,9 +4360,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", - "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4598,31 +4373,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.4", - "@esbuild/android-arm": "0.25.4", - "@esbuild/android-arm64": "0.25.4", - "@esbuild/android-x64": "0.25.4", - "@esbuild/darwin-arm64": "0.25.4", - "@esbuild/darwin-x64": "0.25.4", - "@esbuild/freebsd-arm64": "0.25.4", - "@esbuild/freebsd-x64": "0.25.4", - "@esbuild/linux-arm": "0.25.4", - "@esbuild/linux-arm64": "0.25.4", - "@esbuild/linux-ia32": "0.25.4", - "@esbuild/linux-loong64": "0.25.4", - "@esbuild/linux-mips64el": "0.25.4", - "@esbuild/linux-ppc64": "0.25.4", - "@esbuild/linux-riscv64": "0.25.4", - "@esbuild/linux-s390x": "0.25.4", - "@esbuild/linux-x64": "0.25.4", - "@esbuild/netbsd-arm64": "0.25.4", - "@esbuild/netbsd-x64": "0.25.4", - "@esbuild/openbsd-arm64": "0.25.4", - "@esbuild/openbsd-x64": "0.25.4", - "@esbuild/sunos-x64": "0.25.4", - "@esbuild/win32-arm64": "0.25.4", - "@esbuild/win32-ia32": "0.25.4", - "@esbuild/win32-x64": "0.25.4" + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" } }, "node_modules/escalade": { @@ -4775,6 +4551,19 @@ "dev": true, "license": "MIT" }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4870,9 +4659,9 @@ } }, "node_modules/expect-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", - "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4922,20 +4711,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4985,9 +4760,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", "funding": [ { "type": "github", @@ -5132,6 +4907,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/flat-cache/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/flat-cache/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -5210,9 +4998,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz", + "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==", "dev": true, "license": "MIT", "dependencies": { @@ -5276,9 +5064,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", - "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", "license": "MIT", "engines": { "node": ">=18" @@ -5327,15 +5115,15 @@ } }, "node_modules/glob": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz", - "integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", "dev": true, "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -5363,32 +5151,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -5439,9 +5201,9 @@ } }, "node_modules/globby/node_modules/ignore": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", - "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "license": "MIT", "engines": { "node": ">= 4" @@ -5615,12 +5377,12 @@ } }, "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" @@ -6132,6 +5894,19 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/istanbul-lib-source-maps": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", @@ -6148,9 +5923,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6203,6 +5978,13 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -6224,9 +6006,9 @@ "license": "MIT" }, "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", "dev": true, "license": "MIT", "dependencies": { @@ -6396,16 +6178,16 @@ "license": "MIT" }, "node_modules/loupe": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", - "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", "dev": true, "license": "MIT" }, "node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz", + "integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==", "dev": true, "license": "ISC", "engines": { @@ -6420,13 +6202,13 @@ "license": "MIT" }, "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/magicast": { @@ -6475,6 +6257,13 @@ "markdown-it": "bin/markdown-it.mjs" } }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -6561,16 +6350,19 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "@isaacs/brace-expansion": "^5.0.0" }, "engines": { - "node": "*" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -6942,15 +6734,6 @@ "node": ">= 0.8.0" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -7068,13 +6851,14 @@ } }, "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=16" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/path-type": { @@ -7097,9 +6881,9 @@ "license": "MIT" }, "node_modules/pathval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", - "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", "dev": true, "license": "MIT", "engines": { @@ -7144,9 +6928,9 @@ } }, "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, "funding": [ { @@ -7164,7 +6948,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -7279,25 +7063,25 @@ } }, "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.1.tgz", + "integrity": "sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==", "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.6.3", + "iconv-lite": "0.7.0", "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.10" } }, "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7305,6 +7089,10 @@ }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/readable-stream": { @@ -7424,13 +7212,13 @@ } }, "node_modules/rollup": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", - "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", + "version": "4.50.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.1.tgz", + "integrity": "sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.7" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -7440,26 +7228,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.0", - "@rollup/rollup-android-arm64": "4.41.0", - "@rollup/rollup-darwin-arm64": "4.41.0", - "@rollup/rollup-darwin-x64": "4.41.0", - "@rollup/rollup-freebsd-arm64": "4.41.0", - "@rollup/rollup-freebsd-x64": "4.41.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.0", - "@rollup/rollup-linux-arm-musleabihf": "4.41.0", - "@rollup/rollup-linux-arm64-gnu": "4.41.0", - "@rollup/rollup-linux-arm64-musl": "4.41.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-musl": "4.41.0", - "@rollup/rollup-linux-s390x-gnu": "4.41.0", - "@rollup/rollup-linux-x64-gnu": "4.41.0", - "@rollup/rollup-linux-x64-musl": "4.41.0", - "@rollup/rollup-win32-arm64-msvc": "4.41.0", - "@rollup/rollup-win32-ia32-msvc": "4.41.0", - "@rollup/rollup-win32-x64-msvc": "4.41.0", + "@rollup/rollup-android-arm-eabi": "4.50.1", + "@rollup/rollup-android-arm64": "4.50.1", + "@rollup/rollup-darwin-arm64": "4.50.1", + "@rollup/rollup-darwin-x64": "4.50.1", + "@rollup/rollup-freebsd-arm64": "4.50.1", + "@rollup/rollup-freebsd-x64": "4.50.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.1", + "@rollup/rollup-linux-arm-musleabihf": "4.50.1", + "@rollup/rollup-linux-arm64-gnu": "4.50.1", + "@rollup/rollup-linux-arm64-musl": "4.50.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.50.1", + "@rollup/rollup-linux-ppc64-gnu": "4.50.1", + "@rollup/rollup-linux-riscv64-gnu": "4.50.1", + "@rollup/rollup-linux-riscv64-musl": "4.50.1", + "@rollup/rollup-linux-s390x-gnu": "4.50.1", + "@rollup/rollup-linux-x64-gnu": "4.50.1", + "@rollup/rollup-linux-x64-musl": "4.50.1", + "@rollup/rollup-openharmony-arm64": "4.50.1", + "@rollup/rollup-win32-arm64-msvc": "4.50.1", + "@rollup/rollup-win32-ia32-msvc": "4.50.1", + "@rollup/rollup-win32-x64-msvc": "4.50.1", "fsevents": "~2.3.2" } }, @@ -7481,9 +7270,9 @@ } }, "node_modules/run-applescript": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", - "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", "dev": true, "license": "MIT", "engines": { @@ -7779,9 +7568,9 @@ } }, "node_modules/sirv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", - "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", + "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", "dev": true, "license": "MIT", "dependencies": { @@ -7911,21 +7700,17 @@ } }, "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "license": "MIT", "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/string-width-cjs": { @@ -7944,42 +7729,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -8019,6 +7768,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/strnum": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", @@ -8033,16 +7802,19 @@ "license": "MIT" }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -8121,9 +7893,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8229,14 +8001,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", - "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -8246,11 +8018,14 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -8261,9 +8036,9 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -8274,9 +8049,9 @@ } }, "node_modules/tinypool": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", - "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", "dev": true, "license": "MIT", "engines": { @@ -8294,27 +8069,15 @@ } }, "node_modules/tinyspy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", - "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8415,17 +8178,17 @@ "license": "MIT" }, "node_modules/typedoc": { - "version": "0.28.4", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.4.tgz", - "integrity": "sha512-xKvKpIywE1rnqqLgjkoq0F3wOqYaKO9nV6YkkSat6IxOWacUCc/7Es0hR3OPmkIqkPoEn7U3x+sYdG72rstZQA==", + "version": "0.28.12", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.12.tgz", + "integrity": "sha512-H5ODu4f7N+myG4MfuSp2Vh6wV+WLoZaEYxKPt2y8hmmqNEMVrH69DAjjdmYivF4tP/C2jrIZCZhPalZlTU/ipA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@gerrit0/mini-shiki": "^3.2.2", + "@gerrit0/mini-shiki": "^3.12.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "yaml": "^2.7.1" + "yaml": "^2.8.1" }, "bin": { "typedoc": "bin/typedoc" @@ -8435,13 +8198,13 @@ "pnpm": ">= 10" }, "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x" + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x" } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.6.3.tgz", - "integrity": "sha512-86oODyM2zajXwLs4Wok2mwVEfCwCnp756QyhLGX2IfsdRYr1DXLCgJgnLndaMUjJD7FBhnLk2okbNE9PdLxYRw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.8.1.tgz", + "integrity": "sha512-ug7fc4j0SiJxSwBGLncpSo8tLvrT9VONvPUQqQDTKPxCoFQBADLli832RGPtj6sfSVJebNSrHZQRUdEryYH/7g==", "dev": true, "license": "MIT", "engines": { @@ -8452,9 +8215,9 @@ } }, "node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8526,9 +8289,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "devOptional": true, "license": "MIT" }, @@ -8606,35 +8369,110 @@ "node": ">=10.12.0" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-node/node_modules/@types/node": { + "version": "24.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz", + "integrity": "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/vite-node/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite-node/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "node_modules/vite-node/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/vite-node/node_modules/vite": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz", + "integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -8643,14 +8481,14 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", - "less": "*", + "less": "^4.0.0", "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" @@ -8691,35 +8529,115 @@ } } }, - "node_modules/vite-node": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.4.tgz", - "integrity": "sha512-6enNwYnpyDo4hEgytbmc6mYWHXDHYEn0D1/rw4Q+tnHUGtKTJsn8T1YkX6Q18wI5LCrS8CTYlBaiCqxOy2kvUA==", + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.0", - "es-module-lexer": "^1.7.0", + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0" + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" }, "bin": { - "vite-node": "vite-node.mjs" + "vitest": "vitest.mjs" }, "engines": { "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/vite/node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "node_modules/vitest/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -8729,10 +8647,10 @@ } } }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -8742,73 +8660,77 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/vitest": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.4.tgz", - "integrity": "sha512-Ta56rT7uWxCSJXlBtKgIlApJnT6e6IGmTYxYcmxjJ4ujuZDI59GUQgVDObXXJujOmPDBYXHK1qmaGtneu6TNIQ==", + "node_modules/vitest/node_modules/vite": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz", + "integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.1.4", - "@vitest/mocker": "3.1.4", - "@vitest/pretty-format": "^3.1.4", - "@vitest/runner": "3.1.4", - "@vitest/snapshot": "3.1.4", - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", - "chai": "^5.2.0", - "debug": "^4.4.0", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.13", - "tinypool": "^1.0.2", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.1.4", - "why-is-node-running": "^2.3.0" + "esbuild": "^0.25.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { - "vitest": "vitest.mjs" + "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { - "url": "https://opencollective.com/vitest" + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" }, "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.1.4", - "@vitest/ui": "3.1.4", - "happy-dom": "*", - "jsdom": "*" + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { - "@edge-runtime/vm": { + "@types/node": { "optional": true }, - "@types/debug": { + "jiti": { "optional": true }, - "@types/node": { + "less": { "optional": true }, - "@vitest/browser": { + "lightningcss": { "optional": true }, - "@vitest/ui": { + "sass": { "optional": true }, - "happy-dom": { + "sass-embedded": { "optional": true }, - "jsdom": { + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { "optional": true } } @@ -8993,48 +8915,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -9111,9 +8991,9 @@ } }, "node_modules/yaml": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", - "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -9123,22 +9003,20 @@ } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { @@ -9151,26 +9029,63 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", "license": "MIT" }, "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yocto-queue": { @@ -9187,9 +9102,9 @@ } }, "node_modules/yoctocolors-cjs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", - "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", "license": "MIT", "engines": { "node": ">=18" diff --git a/eng/packages/http-client-csharp/package.json b/eng/packages/http-client-csharp/package.json index 7655a007ff1d..4cf7d28c7836 100644 --- a/eng/packages/http-client-csharp/package.json +++ b/eng/packages/http-client-csharp/package.json @@ -31,36 +31,36 @@ "lint:fix": "eslint . --fix", "prettier:fix": "prettier --write --config .prettierrc.json ./**/*.ts package.json", "prettier": "prettier --check --config .prettierrc.json ./**/*.ts package.json", - "regen-docs": "npm run build:emitter && tspd doc . --enable-experimental --skip-js" + "regen-docs": "npm run build:emitter && tspd doc . --output-dir .tspd/docs --enable-experimental --skip-js" }, "files": [ "dist/emitter/src/**", "dist/generator/**" ], "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250908.5" + "@typespec/http-client-csharp": "1.0.0-alpha.20250918.1" }, "devDependencies": { - "@azure-tools/azure-http-specs": "0.1.0-alpha.27", - "@azure-tools/typespec-azure-core": "0.59.0", - "@azure-tools/typespec-azure-resource-manager": "0.59.0", - "@azure-tools/typespec-azure-rulesets": "0.59.0", - "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/azure-http-specs": "0.1.0-alpha.28", + "@azure-tools/typespec-azure-core": "0.60.0", + "@azure-tools/typespec-azure-resource-manager": "0.60.0", + "@azure-tools/typespec-azure-rulesets": "0.60.0", + "@azure-tools/typespec-client-generator-core": "0.60.0", "@eslint/js": "^9.2.0", - "@types/node": "~22.7.5", + "@types/node": "~22.12.0", "@types/prettier": "^2.6.3", - "@typespec/compiler": "1.3.0", - "@typespec/http": "1.3.0", - "@typespec/http-specs": "0.1.0-alpha.25", - "@typespec/json-schema": "1.3.0", - "@typespec/library-linter": "0.73.0", - "@typespec/openapi": "1.3.0", - "@typespec/rest": "0.73.0", - "@typespec/spec-api": "0.1.0-alpha.8", - "@typespec/spector": "0.1.0-alpha.17", - "@typespec/tspd": "0.72.2", - "@typespec/versioning": "0.73.0", - "@typespec/xml": "0.73.0", + "@typespec/compiler": "1.4.0", + "@typespec/http": "1.4.0", + "@typespec/http-specs": "0.1.0-alpha.26", + "@typespec/json-schema": "1.4.0", + "@typespec/library-linter": "0.74.0", + "@typespec/openapi": "1.4.0", + "@typespec/rest": "0.74.0", + "@typespec/spec-api": "0.1.0-alpha.9", + "@typespec/spector": "0.1.0-alpha.18", + "@typespec/tspd": "0.73.0", + "@typespec/versioning": "0.74.0", + "@typespec/xml": "0.74.0", "@vitest/coverage-v8": "^3.0.5", "@vitest/ui": "^3.0.5", "c8": "^10.1.2", diff --git a/eng/scripts/automation/GenerateAndBuildLib.ps1 b/eng/scripts/automation/GenerateAndBuildLib.ps1 index 14283793101b..209338f835aa 100644 --- a/eng/scripts/automation/GenerateAndBuildLib.ps1 +++ b/eng/scripts/automation/GenerateAndBuildLib.ps1 @@ -917,8 +917,15 @@ function GetSDKProjectFolder() if ($yml["parameters"] -And $yml["parameters"]["service-dir"]) { $service = $yml["parameters"]["service-dir"]["default"]; } + # Support both old and new C# emitters + $csharpOpts = $null if ($yml["options"] -And $yml["options"]["@azure-tools/typespec-csharp"]) { $csharpOpts = $yml["options"]["@azure-tools/typespec-csharp"] + } elseif ($yml["options"] -And $yml["options"]["@azure-typespec/http-client-csharp"]) { + $csharpOpts = $yml["options"]["@azure-typespec/http-client-csharp"] + } + + if ($csharpOpts) { if ($csharpOpts["package-dir"]) { $packageDir = $csharpOpts["package-dir"] } elseif ($csharpOpts["namespace"]) { diff --git a/eng/scripts/automation/test/GenerateAndBuildLib-functions.tests.ps1 b/eng/scripts/automation/test/GenerateAndBuildLib-functions.tests.ps1 index 391c4f7f9b4d..aa05793f3f19 100644 --- a/eng/scripts/automation/test/GenerateAndBuildLib-functions.tests.ps1 +++ b/eng/scripts/automation/test/GenerateAndBuildLib-functions.tests.ps1 @@ -200,4 +200,78 @@ options: {GetSDKProjectFolder -typespecConfigurationFile $testTspConfigFile2 -sdkRepoRoot "/test"} | Should -Throw "*namespace*" } + + it("should work with new @azure-typespec/http-client-csharp emitter") { + $testTspConfigFileNew = Join-Path $testTspConfigDir "tspconfig-new-emitter.yaml" + $testConfigNewEmitter = @" +parameters: + service-dir: + default: testservice +options: + "@azure-typespec/http-client-csharp": + namespace: Azure.TestService.NewEmitter + service-dir: testservice +"@ + $testConfigNewEmitter | Out-File -FilePath $testTspConfigFileNew -Encoding UTF8 + + $testSdkRoot = "/test/sdk/root" + $result = GetSDKProjectFolder -typespecConfigurationFile $testTspConfigFileNew -sdkRepoRoot $testSdkRoot + $expected = Join-Path $testSdkRoot "testservice" "Azure.TestService.NewEmitter" + $result | Should -Be $expected + } + + it("should prioritize package-dir over namespace with new emitter") { + $testTspConfigFileNewPackageDir = Join-Path $testTspConfigDir "tspconfig-new-emitter-package-dir.yaml" + $testConfigNewEmitterPackageDir = @" +parameters: + service-dir: + default: testservice +options: + "@azure-typespec/http-client-csharp": + package-dir: Azure.TestService.NewEmitter.PackageDir + namespace: Azure.TestService.NewEmitter + service-dir: testservice +"@ + $testConfigNewEmitterPackageDir | Out-File -FilePath $testTspConfigFileNewPackageDir -Encoding UTF8 + + $testSdkRoot = "/test/sdk/root" + $result = GetSDKProjectFolder -typespecConfigurationFile $testTspConfigFileNewPackageDir -sdkRepoRoot $testSdkRoot + $expected = Join-Path $testSdkRoot "testservice" "Azure.TestService.NewEmitter.PackageDir" + $result | Should -Be $expected + } + + it("should prefer old emitter when both are present") { + $testTspConfigFileBoth = Join-Path $testTspConfigDir "tspconfig-both-emitters.yaml" + $testConfigBothEmitters = @" +parameters: + service-dir: + default: testservice +options: + "@azure-tools/typespec-csharp": + namespace: Azure.TestService.OldEmitter + service-dir: testservice + "@azure-typespec/http-client-csharp": + namespace: Azure.TestService.NewEmitter + service-dir: testservice +"@ + $testConfigBothEmitters | Out-File -FilePath $testTspConfigFileBoth -Encoding UTF8 + + $testSdkRoot = "/test/sdk/root" + $result = GetSDKProjectFolder -typespecConfigurationFile $testTspConfigFileBoth -sdkRepoRoot $testSdkRoot + $expected = Join-Path $testSdkRoot "testservice" "Azure.TestService.OldEmitter" + $result | Should -Be $expected + } + + it("should throw error when neither emitter has namespace") { + $testTspConfigFileNoEmitter = Join-Path $testTspConfigDir "tspconfig-no-emitter.yaml" + $testConfigNoEmitter = @" +parameters: + service-dir: + default: testservice +options: {} +"@ + $testConfigNoEmitter | Out-File -FilePath $testTspConfigFileNoEmitter -Encoding UTF8 + + {GetSDKProjectFolder -typespecConfigurationFile $testTspConfigFileNoEmitter -sdkRepoRoot "/test"} | Should -Throw "*namespace*" + } } \ No newline at end of file diff --git a/eng/swagger_to_sdk_config.json b/eng/swagger_to_sdk_config.json index e1cc55c58052..32fbeecd17d4 100644 --- a/eng/swagger_to_sdk_config.json +++ b/eng/swagger_to_sdk_config.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/documentation/sdkautomation/SwaggerToSdkConfigSchema.json", + "$schema": "https://raw.githubusercontent.com/Azure/azure-sdk-tools/main/tools/spec-gen-sdk/src/types/SwaggerToSdkConfigSchema.json", "generateOptions": { "generateScript": { "path": "pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1", @@ -21,6 +21,9 @@ } }, "packageOptions": { - "packageFolderFromFileSearch": false + "packageFolderFromFileSearch": false, + "buildScript": { + "command": "dotnet build {packagePath}" + } } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md b/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md index 93a70ec98f6b..daffafdd2777 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.5 (Unreleased) +## 1.2.0-beta.6 (Unreleased) ### Features Added @@ -10,6 +10,11 @@ ### Other Changes +## 1.2.0-beta.5 (2025-09-18) + +### Bugs Fixed +- Fix issue with image block serialization [issue](https://github.com/Azure/azure-sdk-for-net/issues/52571) + ## 1.2.0-beta.4 (2025-09-05) ### Features Added diff --git a/sdk/ai/Azure.AI.Agents.Persistent/assets.json b/sdk/ai/Azure.AI.Agents.Persistent/assets.json index 3fc732e88cda..2a22af89c2b7 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/assets.json +++ b/sdk/ai/Azure.AI.Agents.Persistent/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Agents.Persistent", - "Tag": "net/ai/Azure.AI.Agents.Persistent_32145de83f" + "Tag": "net/ai/Azure.AI.Agents.Persistent_358ff70ace" } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Azure.AI.Agents.Persistent.csproj b/sdk/ai/Azure.AI.Agents.Persistent/src/Azure.AI.Agents.Persistent.csproj index a29734148050..836162e38852 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Azure.AI.Agents.Persistent.csproj +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Azure.AI.Agents.Persistent.csproj @@ -2,7 +2,7 @@ This is the Azure.AI.Agents.Persistent client library for developing .NET applications with rich experience. Microsoft Azure.AI.Agents.Persistent client library - 1.2.0-beta.5 + 1.2.0-beta.6 1.0.0 Azure.AI.Agents.Persistent diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadMessages.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadMessages.cs index a75a0837b02b..01ff26e4e139 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadMessages.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/ThreadMessages.cs @@ -314,7 +314,7 @@ public virtual Response CreateMessage( } // Now serialize the array of JsonElements into a single BinaryData for the request: - var jsonString = JsonSerializer.Serialize(contentBlocks, JsonElementSerializer.Default.ListJsonElement); + var jsonString = JsonSerializer.Serialize(jsonElements, JsonElementSerializer.Default.ListJsonElement); BinaryData serializedBlocks = BinaryData.FromString(jsonString); return CreateMessage( diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs index 120f322fa368..f1a20aeec515 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/AIAgentsTestEnvironment.cs @@ -23,5 +23,6 @@ public class AIAgentsTestEnvironment : TestEnvironment public string DEEP_RESEARCH_MODEL_DEPLOYMENT_NAME => GetRecordedOptionalVariable("DEEP_RESEARCH_MODEL_DEPLOYMENT_NAME"); public string BING_CONFIGURATION_NAME => GetRecordedOptionalVariable("BING_CONFIGURATION_NAME"); public string PLAYWRIGHT_CONNECTION_ID => GetRecordedOptionalVariable("AZURE_PLAYWRIGHT_CONNECTION_ID"); + public string UPLOADED_IMAGE_ID => GetRecordedOptionalVariable("UPLOADED_IMAGE_ID"); } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTelemetryTests.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTelemetryTests.cs index 74b8a54beab9..01b1362f5daf 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTelemetryTests.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTelemetryTests.cs @@ -5,18 +5,19 @@ using System; using System.Collections.Generic; +using System.Data; +using System.Diagnostics; using System.Linq; +using System.Reflection; +using System.Text.Json; using System.Threading.Tasks; +using Azure.AI.Agents.Persistent.Tests.Utilities; using Azure.Core.TestFramework; +using Azure.Identity; using NUnit.Framework; +using OpenTelemetry; using OpenTelemetry.Resources; using OpenTelemetry.Trace; -using OpenTelemetry; -using Azure.AI.Agents.Persistent.Tests.Utilities; -using System.Text.Json; -using System.Reflection; -using Azure.Identity; -using System.Diagnostics; namespace Azure.AI.Agents.Persistent.Tests; @@ -105,11 +106,9 @@ private PersistentAgentsClient GetClient() private async Task WaitForRun(PersistentAgentsClient client, ThreadRun run) { - double delay = 500; do { - if (Mode != RecordedTestMode.Playback) - await Task.Delay(TimeSpan.FromMilliseconds(delay)); + await WaitMayBe(500); run = await client.Runs.GetRunAsync(run.ThreadId, run.Id); } while (run.Status == RunStatus.Queued @@ -153,7 +152,7 @@ public async Task TestAgentChatWithTracingActivitySourceDisabled() while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress || run.Status == RunStatus.RequiresAction) { - await Task.Delay(1000); + await WaitMayBe(); run = await client.Runs.GetRunAsync(thread.Id, run.Id); } @@ -207,11 +206,7 @@ public async Task TestAgentChatWithTracingContentRecordingEnabled() ThreadRun run = await client.Runs.CreateRunAsync(thread.Id, agent.Id); - while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress || run.Status == RunStatus.RequiresAction) - { - await Task.Delay(1000); - run = await client.Runs.GetRunAsync(thread.Id, run.Id); - } + run = await WaitForRun(client, run); var messages = client.Messages.GetMessagesAsync(threadId: thread.Id, order: ListSortOrder.Ascending); await foreach (PersistentThreadMessage threadMessage in messages) @@ -226,122 +221,41 @@ public async Task TestAgentChatWithTracingContentRecordingEnabled() // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent my-agent"); - Assert.IsNotNull(createAgentSpan); - - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "my-agent" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "{\"content\": \"You are helpful agent\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "my-agent", + content: "{\"content\": \"You are helpful agent\"}"); // Verify create_thread span var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); - Assert.IsNotNull(createThreadSpan); - var expectedCreateThreadAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_thread" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedCreateThreadAttributes)); + CheckCreateThreadSpan( + createThreadSpan: createThreadSpan, + modelName: modelDeploymentName + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"content\": \"Hello, tell me a joke\", \"role\": \"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"content\": \"Hello, tell me a joke\", \"role\": \"user\"}" + ); // Verify start_thread_run span var startThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "start_thread_run"); - Assert.IsNotNull(startThreadRunSpan); - var expectedStartThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "start_thread_run" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.status", "queued" }, - { "gen_ai.response.model", modelDeploymentName } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(startThreadRunSpan, expectedStartThreadRunAttributes)); + CheckThreadRunAttribute(threadRunActivity: startThreadRunSpan, modelName: modelDeploymentName, operation: "start_thread_run", status: "queued"); // Verify get_thread_run span var getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); - Assert.IsNotNull(getThreadRunSpan); - var expectedGetThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "get_thread_run" }, - { "gen_ai.thread.run.status", "completed" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(getThreadRunSpan, expectedGetThreadRunAttributes)); + CheckThreadRunAttribute(threadRunActivity: getThreadRunSpan, modelName: modelDeploymentName); // Verify list_messages span - var listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); - Assert.IsNotNull(listMessagesSpan); - var expectedListMessagesAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_messages" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listMessagesSpan, expectedListMessagesAttributes)); - - var expectedListMessagesEvents = new List<(string, Dictionary)> - { - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"content\": {\"text\": {\"value\": \"*\"}}, \"role\": \"assistant\"}" } - }), - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"content\": {\"text\": {\"value\": \"Hello, tell me a joke\"}}, \"role\": \"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listMessagesSpan, expectedListMessagesEvents)); + Activity listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); + CheckListMessages( + listActivity: listMessagesSpan, + contents: ["{\"content\": {\"text\": {\"value\": \"*\"}}, \"role\": \"assistant\"}", "{\"content\": {\"text\": {\"value\": \"Hello, tell me a joke\"}}, \"role\": \"user\"}"], + roles: ["gen_ai.assistant.message", "gen_ai.user.message"] + ); } [RecordedTest] @@ -368,12 +282,7 @@ public async Task TestAgentChatWithTracingContentRecordingDisabled() "Hello, tell me a joke"); ThreadRun run = await client.Runs.CreateRunAsync(thread.Id, agent.Id); - - while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress || run.Status == RunStatus.RequiresAction) - { - await Task.Delay(1000); - run = await client.Runs.GetRunAsync(thread.Id, run.Id); - } + run = await WaitForRun(client, run); var messages = client.Messages.GetMessagesAsync(threadId: thread.Id, order: ListSortOrder.Ascending); await foreach (PersistentThreadMessage threadMessage in messages) @@ -388,122 +297,41 @@ public async Task TestAgentChatWithTracingContentRecordingDisabled() // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent my-agent"); - Assert.IsNotNull(createAgentSpan); - - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "my-agent" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "\"\"" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "my-agent", + content: "\"\"" + ); // Verify create_thread span - var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); - Assert.IsNotNull(createThreadSpan); - var expectedCreateThreadAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_thread" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedCreateThreadAttributes)); - + Activity createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); + CheckCreateThreadSpan( + createThreadSpan: createThreadSpan, + modelName: modelDeploymentName + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"role\": \"user\"}" + ); // Verify start_thread_run span var startThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "start_thread_run"); - Assert.IsNotNull(startThreadRunSpan); - var expectedStartThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "start_thread_run" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.status", "*" }, - { "gen_ai.response.model", modelDeploymentName } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(startThreadRunSpan, expectedStartThreadRunAttributes)); + CheckThreadRunAttribute(threadRunActivity: startThreadRunSpan, modelName: modelDeploymentName, operation: "start_thread_run"); // Verify get_thread_run span - var getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); - Assert.IsNotNull(getThreadRunSpan); - var expectedGetThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "get_thread_run" }, - { "gen_ai.thread.run.status", "completed" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(getThreadRunSpan, expectedGetThreadRunAttributes)); + Activity getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); + CheckThreadRunAttribute(threadRunActivity: getThreadRunSpan, modelName: modelDeploymentName); // Verify list_messages span - var listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); - Assert.IsNotNull(listMessagesSpan); - var expectedListMessagesAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_messages" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listMessagesSpan, expectedListMessagesAttributes)); - - var expectedListMessagesEvents = new List<(string, Dictionary)> - { - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"assistant\"}" } - }), - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listMessagesSpan, expectedListMessagesEvents)); + Activity listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); + CheckListMessages( + listActivity: listMessagesSpan, + contents: ["{\"role\": \"assistant\"}", "{\"role\": \"user\"}"], + roles: ["gen_ai.assistant.message", "gen_ai.user.message"] + ); } [RecordedTest] @@ -558,10 +386,7 @@ public async Task TestAgentChatWithFunctionToolTracingContentRecordingEnabled() while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress || run.Status == RunStatus.RequiresAction) { - if (Mode != RecordedTestMode.Playback) - { - await Task.Delay(1000); - } + await WaitMayBe(); run = await client.Runs.GetRunAsync(thread.Id, run.Id); if (run.Status == RunStatus.RequiresAction && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) @@ -598,176 +423,47 @@ public async Task TestAgentChatWithFunctionToolTracingContentRecordingEnabled() _exporter.ForceFlush(); // Verify create_agent span - var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - Functions"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "SDK Test Agent - Functions" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); + Activity createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - Functions"); - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "{\"content\": \"You are a weather bot. Use the provided function to help answer questions about weather.\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "SDK Test Agent - Functions", + content: "{\"content\": \"You are a weather bot. Use the provided function to help answer questions about weather.\"}" + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"content\": \"What is the weather in Seattle.\", \"role\": \"user\"}" } - }) - }; - - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"content\": \"What is the weather in Seattle.\", \"role\": \"user\"}" + ); // Verify submit_tool_outputs span explicitly - var submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); - Assert.IsNotNull(submitToolOutputsSpan); - var expectedSubmitToolOutputsAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "submit_tool_outputs" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.response.model", modelDeploymentName } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(submitToolOutputsSpan, expectedSubmitToolOutputsAttributes)); - - var expectedSubmitToolOutputsEvents = new List<(string, Dictionary)> - { - ("gen_ai.tool.message", new Dictionary - { - { "gen_ai.event.content", "{\"content\":\"{\\\"weather\\\": \\\"Sunny\\\"}\",\"id\":\"*\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(submitToolOutputsSpan, expectedSubmitToolOutputsEvents)); + Activity submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); + CheckSubmitToolOutputSpan( + submitActivity: submitToolOutputsSpan, + content: "{\"content\":\"{\\\"weather\\\": \\\"Sunny\\\"}\",\"id\":\"*\"}" + ); // Verify get_thread_run span var getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); - Assert.IsNotNull(getThreadRunSpan); - var expectedGetThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "get_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.status", "completed" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(getThreadRunSpan, expectedGetThreadRunAttributes)); + CheckThreadRunAttribute(threadRunActivity: getThreadRunSpan, modelName: modelDeploymentName); // Verify list_messages span explicitly - var listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); - Assert.IsNotNull(listMessagesSpan); - - var expectedListMessagesAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_messages" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listMessagesSpan, expectedListMessagesAttributes)); - - var expectedListMessagesEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"content\":{\"text\":{\"value\":\"What is the weather in Seattle.\"}},\"role\":\"user\"}" } - }), - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"content\":{\"text\":{\"value\":\"*\"}},\"role\":\"assistant\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listMessagesSpan, expectedListMessagesEvents)); + Activity listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); + CheckListMessages( + listActivity: listMessagesSpan, + contents: ["{\"content\":{\"text\":{\"value\":\"What is the weather in Seattle.\"}},\"role\":\"user\"}", "{\"content\":{\"text\":{\"value\":\"*\"}},\"role\":\"assistant\"}"], + roles: ["gen_ai.user.message", "gen_ai.assistant.message"] + ); // Verify list_run_steps span var listRunStepsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_run_steps"); - Assert.IsNotNull(listRunStepsSpan); - var expectedListRunStepsAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_run_steps" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listRunStepsSpan, expectedListRunStepsAttributes)); - - var expectedListRunStepsEvents = new List<(string, Dictionary)> - { - ("gen_ai.run_step.message_creation", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" } - }), - ("gen_ai.run_step.tool_calls", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\",\"function\":{\"name\":\"getCurrentWeatherAtLocation\",\"arguments\":{\"location\":\"Seattle, WA\"}}}]}"} - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listRunStepsSpan, expectedListRunStepsEvents)); + CheckRunSteps( + runStepActivity: listRunStepsSpan, + contents: [null, "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\",\"function\":{\"name\":\"getCurrentWeatherAtLocation\",\"arguments\":{\"location\":\"Seattle, WA\"}}}]}"], + events: ["gen_ai.run_step.message_creation", "gen_ai.run_step.tool_calls"]); } [RecordedTest] @@ -828,152 +524,39 @@ public async Task TestBingCustomSearchTracingContentRecordingEnabled() _exporter.ForceFlush(); // Verify create_agent span - var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - DeepResearch"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", agentName }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", $"{{\"content\": \"{system_prompt}\"}}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + Activity createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - DeepResearch"); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: agentName, + content: $"{{\"content\": \"{system_prompt}\"}}" + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", $"{{\"content\":\"{prompt}\",\"role\":\"user\"}}" } - }) - }; - - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: $"{{\"content\":\"{prompt}\",\"role\":\"user\"}}" + ); // Verify get_thread_run span var getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); - Assert.IsNotNull(getThreadRunSpan); - var expectedGetThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "get_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.status", "completed" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(getThreadRunSpan, expectedGetThreadRunAttributes)); + CheckThreadRunAttribute(threadRunActivity: getThreadRunSpan, modelName: modelDeploymentName); // Verify list_messages span explicitly - var listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); - Assert.IsNotNull(listMessagesSpan); - - var expectedListMessagesAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_messages" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listMessagesSpan, expectedListMessagesAttributes)); - - var expectedListMessagesEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", $"{{\"content\":{{\"text\":{{\"value\":\"{prompt}\"}}}},\"role\":\"user\"}}" } - }), - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"content\":{\"text\":{\"value\":\"*\",\"annotations\":\"*\"}},\"role\":\"assistant\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listMessagesSpan, expectedListMessagesEvents)); + Activity listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); + CheckListMessages( + listActivity: listMessagesSpan, + contents: [$"{{\"content\":{{\"text\":{{\"value\":\"{prompt}\"}}}},\"role\":\"user\"}}", "{\"content\":{\"text\":{\"value\":\"*\",\"annotations\":\"*\"}},\"role\":\"assistant\"}"], + roles: ["gen_ai.user.message", "gen_ai.assistant.message"] + ); // Verify list_run_steps span var listRunStepsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_run_steps"); - Assert.IsNotNull(listRunStepsSpan); - var expectedListRunStepsAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_run_steps" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listRunStepsSpan, expectedListRunStepsAttributes)); - - var expectedListRunStepsEvents = new List<(string, Dictionary)> - { - ("gen_ai.run_step.message_creation", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" } - }), - ("gen_ai.run_step.tool_calls", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"bing_custom_search\",\"details\":{\"requesturl\":\"*\",\"response_metadata\":\"*\"}}]}"} - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listRunStepsSpan, expectedListRunStepsEvents)); + CheckRunSteps( + runStepActivity: listRunStepsSpan, + contents: [null, "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"bing_custom_search\",\"details\":{\"requesturl\":\"*\",\"response_metadata\":\"*\"}}]}"], + events: ["gen_ai.run_step.message_creation", "gen_ai.run_step.tool_calls"]); } [RecordedTest] @@ -1037,74 +620,25 @@ public async Task TestDeepResearchToolTracingContentRecordingEnabled() // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - DeepResearch"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "SDK Test Agent - DeepResearch" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", $"{{\"content\": \"{system_prompt}\"}}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "SDK Test Agent - DeepResearch", + content: $"{{\"content\": \"{system_prompt}\"}}" + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", $"{{\"content\":\"{prompt}\",\"role\":\"user\"}}" } - }) - }; - - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: $"{{\"content\":\"{prompt}\",\"role\":\"user\"}}" + ); // Verify get_thread_run span var getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); - Assert.IsNotNull(getThreadRunSpan); - var expectedGetThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "get_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.status", "completed" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(getThreadRunSpan, expectedGetThreadRunAttributes)); + CheckThreadRunAttribute(threadRunActivity: getThreadRunSpan, modelName: modelDeploymentName); // Verify list_messages span explicitly - //var listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); IEnumerable spans = _exporter.GetExportedActivities().Where(s => s.DisplayName == "list_messages"); Assert.Greater(spans.Count(), 0); @@ -1251,7 +785,7 @@ public async Task TestAgentChatWithFunctionToolTracingContentRecordingDisabled() while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress || run.Status == RunStatus.RequiresAction) { - await Task.Delay(1000); + await WaitMayBe(); run = await client.Runs.GetRunAsync(thread.Id, run.Id); if (run.Status == RunStatus.RequiresAction && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) @@ -1288,175 +822,38 @@ public async Task TestAgentChatWithFunctionToolTracingContentRecordingDisabled() // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - Functions"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "SDK Test Agent - Functions" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "\"\"" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "SDK Test Agent - Functions", + content: "\"\"" + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"role\": \"user\"}" + ); - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"user\"}" } - }) - }; - - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); - - // Verify submit_tool_outputs span explicitly - var submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); - Assert.IsNotNull(submitToolOutputsSpan); - var expectedSubmitToolOutputsAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "submit_tool_outputs" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.response.model", modelDeploymentName } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(submitToolOutputsSpan, expectedSubmitToolOutputsAttributes)); - - var expectedSubmitToolOutputsEvents = new List<(string, Dictionary)> - { - ("gen_ai.tool.message", new Dictionary - { - { "gen_ai.event.content", "{\"content\":\"\",\"id\":\"*\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(submitToolOutputsSpan, expectedSubmitToolOutputsEvents)); + // Verify submit_tool_outputs span explicitly + Activity submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); + CheckSubmitToolOutputSpan( + submitActivity: submitToolOutputsSpan, + content: "{\"content\":\"\",\"id\":\"*\"}" + ); // Verify get_thread_run span - var getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); - Assert.IsNotNull(getThreadRunSpan); - var expectedGetThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "get_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.status", "completed" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(getThreadRunSpan, expectedGetThreadRunAttributes)); + Activity getThreadRunSpan = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "get_thread_run"); + CheckThreadRunAttribute(threadRunActivity: getThreadRunSpan, modelName: modelDeploymentName); // Verify list_messages span explicitly - var listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); - Assert.IsNotNull(listMessagesSpan); - - var expectedListMessagesAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_messages" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listMessagesSpan, expectedListMessagesAttributes)); - - var expectedListMessagesEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"user\"}" } - }), - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"assistant\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listMessagesSpan, expectedListMessagesEvents)); - - // Verify list_run_steps span - var listRunStepsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_run_steps"); - Assert.IsNotNull(listRunStepsSpan); - var expectedListRunStepsAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "list_run_steps" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listRunStepsSpan, expectedListRunStepsAttributes)); - - var expectedListRunStepsEvents = new List<(string, Dictionary)> - { - ("gen_ai.run_step.message_creation", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" } - }), - ("gen_ai.run_step.tool_calls", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\"}]}"} - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(listRunStepsSpan, expectedListRunStepsEvents)); + Activity listMessagesSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "list_messages"); + CheckListMessages( + listActivity: listMessagesSpan, + contents: ["{\"role\": \"user\"}", "{\"role\": \"assistant\"}"], + roles: ["gen_ai.user.message", "gen_ai.assistant.message"] + ); } [RecordedTest] @@ -1502,103 +899,35 @@ public async Task TestAgentStreamingWithTracingContentRecordingEnabled() // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent Test Agent"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "Test Agent" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "{\"content\":\"You are a helpful assistant.\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "Test Agent", + content: "{\"content\":\"You are a helpful assistant.\"}" + ); // Verify create_thread span - var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); - Assert.IsNotNull(createThreadSpan); - var expectedCreateThreadAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_thread" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedCreateThreadAttributes)); + Activity createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); + CheckCreateThreadSpan( + createThreadSpan: createThreadSpan, + modelName: modelDeploymentName + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"content\":\"Tell me a joke.\",\"role\":\"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"content\":\"Tell me a joke.\",\"role\":\"user\"}" + ); // Verify process_thread_run span - var processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); - Assert.IsNotNull(processThreadRunSpan); - var expectedProcessThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "process_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.run.status", "completed" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(processThreadRunSpan, expectedProcessThreadRunAttributes)); - - var expectedProcessThreadRunEvents = new List<(string, Dictionary)> - { - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.status", "completed" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"content\":{\"text\":{\"value\":\"*\"}},\"role\":\"assistant\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(processThreadRunSpan, expectedProcessThreadRunEvents)); + Activity processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); + CheckProcessThreadRun( + threadRun: processThreadRunSpan, + modelName: modelDeploymentName, + contents: ["{\"content\":{\"text\":{\"value\":\"*\"}},\"role\":\"assistant\"}"], + roles: ["gen_ai.assistant.message"] + ); } [RecordedTest] @@ -1644,103 +973,34 @@ public async Task TestAgentStreamingWithTracingContentRecordingDisabled() // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent Test Agent"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "Test Agent" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "\"\"" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "Test Agent", + content: "\"\"" + ); // Verify create_thread span var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); - Assert.IsNotNull(createThreadSpan); - var expectedCreateThreadAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_thread" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedCreateThreadAttributes)); - + CheckCreateThreadSpan( + createThreadSpan: createThreadSpan, + modelName: modelDeploymentName + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"role\": \"user\"}" + ); // Verify process_thread_run span - var processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); - Assert.IsNotNull(processThreadRunSpan); - var expectedProcessThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "process_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.run.status", "completed" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(processThreadRunSpan, expectedProcessThreadRunAttributes)); - - var expectedProcessThreadRunEvents = new List<(string, Dictionary)> - { - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.status", "completed" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"role\": \"assistant\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(processThreadRunSpan, expectedProcessThreadRunEvents)); + Activity processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); + CheckProcessThreadRun( + threadRun: processThreadRunSpan, + modelName: modelDeploymentName, + contents: ["{\"role\": \"assistant\"}"], + roles: ["gen_ai.assistant.message"] + ); } [RecordedTest] @@ -1836,156 +1096,55 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string // Verify create_agent span var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - Functions"); - Assert.IsNotNull(createAgentSpan); - var expectedCreateAgentAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_agent" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "SDK Test Agent - Functions" }, - { "gen_ai.agent.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - - var expectedCreateAgentEvents = new List<(string, Dictionary)> - { - ("gen_ai.system.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "{\"content\":\"You are a weather bot. Use the provided function to help answer questions about weather.\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + CheckCreateAgentEvent( + createAgentSpan: createAgentSpan, + modelName: modelDeploymentName, + agentName: "SDK Test Agent - Functions", + content: "{\"content\":\"You are a weather bot. Use the provided function to help answer questions about weather.\"}" + ); // Verify create_thread span var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); - Assert.IsNotNull(createThreadSpan); - var expectedCreateThreadAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_thread" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedCreateThreadAttributes)); + //Assert.IsNotNull(createThreadSpan); + CheckCreateThreadSpan( + createThreadSpan: createThreadSpan, + modelName: modelDeploymentName, + status: RunStatus.RequiresAction + ); // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); - var expectedCreateMessageAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); - - var expectedCreateMessageEvents = new List<(string, Dictionary)> - { - ("gen_ai.user.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"content\":\"What is the weather in Seattle?\",\"role\":\"user\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"content\":\"What is the weather in Seattle?\",\"role\":\"user\"}" + ); // Verify process_thread_run span - var processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); - Assert.IsNotNull(processThreadRunSpan); - var expectedProcessThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "process_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.run.status", "requires_action" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(processThreadRunSpan, expectedProcessThreadRunAttributes)); + Activity processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); + CheckCreateThreadSpan( + createThreadSpan: processThreadRunSpan, + modelName: modelDeploymentName, + status: RunStatus.RequiresAction, + operation: "process_thread_run" + ); // Verify submit_tool_outputs span - var submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); - Assert.IsNotNull(submitToolOutputsSpan); - var expectedSubmitToolOutputsAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "submit_tool_outputs" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.thread.run.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(submitToolOutputsSpan, expectedSubmitToolOutputsAttributes)); - - var expectedSubmitToolOutputsEvents = new List<(string, Dictionary)> - { - ("gen_ai.tool.message", new Dictionary - { - { "gen_ai.event.content", "{\"content\":\"{\\\"temperature\\\":\\\"70f\\\"}\",\"id\":\"*\"}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(submitToolOutputsSpan, expectedSubmitToolOutputsEvents)); + Activity submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); + CheckSubmitToolOutputSpan( + submitActivity: submitToolOutputsSpan, + content: "{\"content\":\"{\\\"temperature\\\":\\\"70f\\\"}\",\"id\":\"*\"}" + ); // Verify process_thread_run span after tool submission - var processThreadRunSpanAfterTool = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "process_thread_run"); - Assert.IsNotNull(processThreadRunSpanAfterTool); - var expectedProcessThreadRunAttributesAfterTool = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "process_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.run.status", "completed" }, - { "gen_ai.message.id", "*" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(processThreadRunSpanAfterTool, expectedProcessThreadRunAttributesAfterTool)); - - var expectedProcessThreadRunEventsAfterTool = new List<(string, Dictionary)> - { - ("gen_ai.assistant.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.status", "completed" }, - { "gen_ai.message.id", "*" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"content\":{\"text\":{\"value\":\"*\"}},\"role\":\"assistant\"}" } - }), - ("gen_ai.tool.message", new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.run_step.status", "completed" }, - { "gen_ai.run_step.start.timestamp", "+" }, - { "gen_ai.run_step.end.timestamp", "+" }, - { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\",\"function\":{\"name\":\"getCurrentWeatherAtLocation\",\"arguments\":{\"location\":\"Seattle, WA\"}}}]}" } - }) - }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(processThreadRunSpanAfterTool, expectedProcessThreadRunEventsAfterTool)); + Activity processThreadRunSpanAfterTool = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "process_thread_run"); + CheckProcessThreadRun( + threadRun: processThreadRunSpanAfterTool, + modelName: modelDeploymentName, + contents: [ + "{\"content\":{\"text\":{\"value\":\"*\"}},\"role\":\"assistant\"}", + "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\",\"function\":{\"name\":\"getCurrentWeatherAtLocation\",\"arguments\":{\"location\":\"Seattle, WA\"}}}]}"], + roles: ["gen_ai.assistant.message", "gen_ai.tool.message"] + ); } [RecordedTest] @@ -2035,7 +1194,7 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string model: modelDeploymentName, name: "SDK Test Agent - Functions", instructions: "You are a weather bot. Use the provided function to help answer questions about weather.", - tools: new[] { getCurrentWeatherAtLocationTool }); + tools: [ getCurrentWeatherAtLocationTool ]); PersistentAgentThread thread = await client.Threads.CreateThreadAsync(); var threadId = thread.Id; @@ -2045,7 +1204,7 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string MessageRole.User, "What is the weather in Seattle?"); - List toolOutputs = new List(); + List toolOutputs = []; ThreadRun streamRun = null; var stream = client.Runs.CreateRunStreamingAsync(thread.Id, agent.Id); @@ -2080,7 +1239,52 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string _exporter.ForceFlush(); // Verify create_agent span - var createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - Functions"); + Activity createAgentSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_agent SDK Test Agent - Functions"); + CheckCreateAgentEvent(createAgentSpan, modelDeploymentName, "SDK Test Agent - Functions", "\"\""); + + // Verify create_thread span + var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); + CheckCreateThreadSpan( + createThreadSpan:createThreadSpan, + modelName:modelDeploymentName + ); + + // Verify create_message span + Activity createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); + CheckCreateMessageSpan( + createMessageActivity: createMessageSpan, + content: "{\"role\": \"user\"}" + ); + + // Verify process_thread_run span + var processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); + CheckCreateThreadSpan( + createThreadSpan: processThreadRunSpan, + modelName: modelDeploymentName, + status: RunStatus.RequiresAction, + operation: "process_thread_run" + ); + + // Verify submit_tool_outputs span + Activity submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); + CheckSubmitToolOutputSpan( + submitActivity: submitToolOutputsSpan, + content: "{\"content\":\"\",\"id\":\"*\"}" + ); + + // Verify process_thread_run span after tool submission + Activity processThreadRunSpanAfterTool = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "process_thread_run"); + CheckProcessThreadRun( + threadRun: processThreadRunSpanAfterTool, + modelName: modelDeploymentName, + contents: ["{\"role\":\"assistant\"}", "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\"}]}"], + roles: ["gen_ai.assistant.message", "gen_ai.tool.message"] + ); + } + + #region Helpers + private void CheckCreateAgentEvent(Activity createAgentSpan, string modelName, string agentName, string content) + { Assert.IsNotNull(createAgentSpan); var expectedCreateAgentAttributes = new Dictionary { @@ -2088,48 +1292,56 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string { "gen_ai.operation.name", "create_agent" }, { "server.address", "*" }, { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.request.model", modelDeploymentName }, - { "gen_ai.agent.name", "SDK Test Agent - Functions" }, + { "gen_ai.request.model", modelName }, + { "gen_ai.agent.name", agentName }, { "gen_ai.agent.id", "*" } }; Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createAgentSpan, expectedCreateAgentAttributes)); - var expectedCreateAgentEvents = new List<(string, Dictionary)> { ("gen_ai.system.message", new Dictionary { { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.event.content", "\"\"" } + { "gen_ai.event.content", content } }) }; Assert.IsTrue(_traceVerifier.CheckSpanEvents(createAgentSpan, expectedCreateAgentEvents)); + } - // Verify create_thread span - var createThreadSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_thread"); + private void CheckCreateThreadSpan(Activity createThreadSpan, string modelName, RunStatus? status = null, string operation="create_thread") + { Assert.IsNotNull(createThreadSpan); - var expectedCreateThreadAttributes = new Dictionary + var expectedProcessThreadRunAttributes = new Dictionary { { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_thread" }, + { "gen_ai.operation.name", operation }, { "server.address", "*" }, { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" } + { "gen_ai.thread.id", "*" }, }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedCreateThreadAttributes)); + if (operation == "process_thread_run") + { + expectedProcessThreadRunAttributes["gen_ai.agent.id"] = "*"; + expectedProcessThreadRunAttributes["gen_ai.response.model"] = modelName; + expectedProcessThreadRunAttributes["gen_ai.thread.run.id"] = "*"; + expectedProcessThreadRunAttributes["gen_ai.thread.run.status"] = status.Value.ToString(); + } + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createThreadSpan, expectedProcessThreadRunAttributes)); + } - // Verify create_message span - var createMessageSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "create_message"); - Assert.IsNotNull(createMessageSpan); + private void CheckCreateMessageSpan(Activity createMessageActivity, string content) + { + Assert.IsNotNull(createMessageActivity); var expectedCreateMessageAttributes = new Dictionary { { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "create_message" }, - { "server.address", "*" }, { "az.namespace", "Microsoft.CognitiveServices" }, + { "server.address", "*" }, + { "gen_ai.operation.name", "create_message" }, { "gen_ai.thread.id", "*" }, { "gen_ai.message.id", "*" } }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageSpan, expectedCreateMessageAttributes)); + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(createMessageActivity, expectedCreateMessageAttributes)); var expectedCreateMessageEvents = new List<(string, Dictionary)> { @@ -2137,31 +1349,15 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string { { "gen_ai.system", "az.ai.agents" }, { "gen_ai.thread.id", "*" }, - { "gen_ai.event.content", "{\"role\": \"user\"}" } + { "gen_ai.event.content", content } }) }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageSpan, expectedCreateMessageEvents)); - - // Verify process_thread_run span - var processThreadRunSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "process_thread_run"); - Assert.IsNotNull(processThreadRunSpan); - var expectedProcessThreadRunAttributes = new Dictionary - { - { "gen_ai.system", "az.ai.agents" }, - { "gen_ai.operation.name", "process_thread_run" }, - { "server.address", "*" }, - { "az.namespace", "Microsoft.CognitiveServices" }, - { "gen_ai.thread.id", "*" }, - { "gen_ai.agent.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, - { "gen_ai.thread.run.id", "*" }, - { "gen_ai.thread.run.status", "requires_action" } - }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(processThreadRunSpan, expectedProcessThreadRunAttributes)); + Assert.IsTrue(_traceVerifier.CheckSpanEvents(createMessageActivity, expectedCreateMessageEvents)); + } - // Verify submit_tool_outputs span - var submitToolOutputsSpan = _exporter.GetExportedActivities().FirstOrDefault(s => s.DisplayName == "submit_tool_outputs"); - Assert.IsNotNull(submitToolOutputsSpan); + private void CheckSubmitToolOutputSpan(Activity submitActivity, string content) + { + Assert.IsNotNull(submitActivity); var expectedSubmitToolOutputsAttributes = new Dictionary { { "gen_ai.system", "az.ai.agents" }, @@ -2171,20 +1367,56 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string { "gen_ai.thread.id", "*" }, { "gen_ai.thread.run.id", "*" } }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(submitToolOutputsSpan, expectedSubmitToolOutputsAttributes)); + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(submitActivity, expectedSubmitToolOutputsAttributes)); var expectedSubmitToolOutputsEvents = new List<(string, Dictionary)> { ("gen_ai.tool.message", new Dictionary { - { "gen_ai.event.content", "{\"content\":\"\",\"id\":\"*\"}" } + { "gen_ai.event.content", content } }) }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(submitToolOutputsSpan, expectedSubmitToolOutputsEvents)); + Assert.IsTrue(_traceVerifier.CheckSpanEvents(submitActivity, expectedSubmitToolOutputsEvents)); + } - // Verify process_thread_run span after tool submission - var processThreadRunSpanAfterTool = _exporter.GetExportedActivities().LastOrDefault(s => s.DisplayName == "process_thread_run"); - Assert.IsNotNull(processThreadRunSpanAfterTool); + private void CheckListMessages(Activity listActivity, string[] contents, string[] roles) + { + Assert.That(contents.Length == roles.Length, "The list of contents must have the same length as the list of roles." ); + Assert.IsNotNull(listActivity); + var expectedListMessagesAttributes = new Dictionary + { + { "gen_ai.system", "az.ai.agents" }, + { "gen_ai.operation.name", "list_messages" }, + { "server.address", "*" }, + { "az.namespace", "Microsoft.CognitiveServices" }, + { "gen_ai.thread.id", "*" } + }; + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(listActivity, expectedListMessagesAttributes)); + + List<(string, Dictionary)> expectedListMessagesEvents = []; + for (int i = 0; i < contents.Length; i++) + { + var newData = new Dictionary + { + { "gen_ai.system", "az.ai.agents" }, + { "gen_ai.thread.id", "*" }, + { "gen_ai.message.id", "*" }, + { "gen_ai.event.content", contents[i] } + }; + if (string.Equals(roles[i], "gen_ai.assistant.message")) + { + newData["gen_ai.agent.id"] = "*"; + newData["gen_ai.thread.run.id"] = "*"; + } + expectedListMessagesEvents.Add((roles[i], newData)); + } + Assert.IsTrue(_traceVerifier.CheckSpanEvents(listActivity, expectedListMessagesEvents)); + } + + private void CheckProcessThreadRun(Activity threadRun, string modelName, string[] contents, string[] roles) + { + Assert.That(contents.Length == roles.Length, "The list of contents must have the same length as the list of roles."); + Assert.IsNotNull(threadRun); var expectedProcessThreadRunAttributesAfterTool = new Dictionary { { "gen_ai.system", "az.ai.agents" }, @@ -2193,30 +1425,62 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string { "az.namespace", "Microsoft.CognitiveServices" }, { "gen_ai.thread.id", "*" }, { "gen_ai.agent.id", "*" }, - { "gen_ai.response.model", modelDeploymentName }, + { "gen_ai.response.model", modelName }, { "gen_ai.usage.input_tokens", "+" }, { "gen_ai.usage.output_tokens", "+" }, { "gen_ai.thread.run.id", "*" }, { "gen_ai.thread.run.status", "completed" }, { "gen_ai.message.id", "*" } }; - Assert.IsTrue(_traceVerifier.CheckSpanAttributes(processThreadRunSpanAfterTool, expectedProcessThreadRunAttributesAfterTool)); - - var expectedProcessThreadRunEventsAfterTool = new List<(string, Dictionary)> + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(threadRun, expectedProcessThreadRunAttributesAfterTool)); + List<(string, Dictionary)> expectedProcessThreadRunEventsAfterTool = []; + for (int i=0; i + var newData = new Dictionary { { "gen_ai.system", "az.ai.agents" }, { "gen_ai.thread.id", "*" }, { "gen_ai.agent.id", "*" }, { "gen_ai.thread.run.id", "*" }, - { "gen_ai.message.status", "completed" }, - { "gen_ai.message.id", "*" }, + { "gen_ai.event.content", contents[i] }, { "gen_ai.usage.input_tokens", "+" }, { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"role\":\"assistant\"}" } - }), - ("gen_ai.tool.message", new Dictionary + }; + if (string.Equals(roles[i], "gen_ai.tool.message")) + { + newData["gen_ai.run_step.status"] = "completed"; + newData["gen_ai.run_step.start.timestamp"] = "+"; + newData["gen_ai.run_step.end.timestamp"] = "+"; + } + else + { + newData["gen_ai.message.id"] = "*"; + newData["gen_ai.message.status"] = "completed"; + } + expectedProcessThreadRunEventsAfterTool.Add((roles[i], newData)); + } + Assert.IsTrue(_traceVerifier.CheckSpanEvents(threadRun, expectedProcessThreadRunEventsAfterTool)); + } + + private void CheckRunSteps(Activity runStepActivity, string[] contents, string[] events) + { + Assert.That(contents.Length == events.Length, "The list of contents must have the same length as the list of events."); + Assert.IsNotNull(runStepActivity); + var expectedListRunStepsAttributes = new Dictionary + { + { "gen_ai.system", "az.ai.agents" }, + { "gen_ai.operation.name", "list_run_steps" }, + { "server.address", "*" }, + { "az.namespace", "Microsoft.CognitiveServices" }, + { "gen_ai.thread.id", "*" }, + { "gen_ai.thread.run.id", "*" } + }; + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(runStepActivity, expectedListRunStepsAttributes)); + + List<(string, Dictionary)> expectedListRunStepsEvents = []; + for (int i=0; i data = new() { { "gen_ai.system", "az.ai.agents" }, { "gen_ai.thread.id", "*" }, @@ -2226,10 +1490,51 @@ ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string { "gen_ai.run_step.start.timestamp", "+" }, { "gen_ai.run_step.end.timestamp", "+" }, { "gen_ai.usage.input_tokens", "+" }, - { "gen_ai.usage.output_tokens", "+" }, - { "gen_ai.event.content", "{\"tool_calls\":[{\"id\":\"*\",\"type\":\"function\"}]}" } - }) + { "gen_ai.usage.output_tokens", "+" } + }; + if (contents[i] is not null) + { + data["gen_ai.event.content"] = contents[i]; + } + if (string.Equals(events[i], "gen_ai.run_step.message_creation")) + { + data["gen_ai.message.id"] = "*"; + } + expectedListRunStepsEvents.Add((events[i], data)); + } + Assert.IsTrue(_traceVerifier.CheckSpanEvents(runStepActivity, expectedListRunStepsEvents)); + } + + public void CheckThreadRunAttribute(Activity threadRunActivity, string modelName, string operation= "get_thread_run", string status=default) + { + Assert.IsNotNull(threadRunActivity); + var expectedGetThreadRunAttributes = new Dictionary + { + { "gen_ai.system", "az.ai.agents" }, + { "gen_ai.operation.name", operation }, + { "server.address", "*" }, + { "az.namespace", "Microsoft.CognitiveServices" }, + { "gen_ai.thread.run.id", "*" }, + { "gen_ai.thread.id", "*" }, + { "gen_ai.response.model", modelName }, + { "gen_ai.agent.id", "*" }, }; - Assert.IsTrue(_traceVerifier.CheckSpanEvents(processThreadRunSpanAfterTool, expectedProcessThreadRunEventsAfterTool)); + if (operation == "get_thread_run") + { + expectedGetThreadRunAttributes["gen_ai.usage.input_tokens"] = "+"; + expectedGetThreadRunAttributes["gen_ai.usage.output_tokens"] = "+"; + expectedGetThreadRunAttributes["gen_ai.thread.run.status"] = "completed"; + } + if (status is not null) + { + expectedGetThreadRunAttributes["gen_ai.thread.run.status"] = status; + } + Assert.IsTrue(_traceVerifier.CheckSpanAttributes(threadRunActivity, expectedGetThreadRunAttributes)); + } + private async Task WaitMayBe(int timeout = 1000) + { + if (Mode != RecordedTestMode.Playback) + await Task.Delay(timeout); } + #endregion } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs index 92ded03283f4..bdeb8a052588 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs @@ -2306,6 +2306,58 @@ await ValidateStream( ); } + [RecordedTest] + [TestCase(true, "adani")] + //TODO: The Image URI is not supported, uncomment this text when the ICM 686545924 will be resolved. + //[TestCase(false, "trail")] + public async Task TestImageAsInput(bool useUploaded, string expectedWord) + { + PersistentAgentsClient client = GetClient(); + PersistentAgent agent = await GetAgent( + client: client, + model: "gpt-4o", + instruction: "Analyze images from internally uploaded files." + ); + PersistentAgentThread thread = client.Threads.CreateThread(); + var contentBlocks = new List + { + new MessageInputTextBlock("Here is an uploaded file. Please describe it:"), + }; + if (useUploaded) + { + // Note: To get the Image ID, please upload it using sample "Sample_PersistentAgents_ImageFileInputs." + contentBlocks.Add(new MessageInputImageFileBlock(new MessageImageFileParam(TestEnvironment.UPLOADED_IMAGE_ID))); + } + else + { + string uri = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"; + contentBlocks.Add(new MessageInputImageUriBlock(new MessageImageUriParam(uri))); + } + + PersistentThreadMessage imageMessage = client.Messages.CreateMessage( + threadId: thread.Id, + role: MessageRole.User, + contentBlocks: contentBlocks + ); + ThreadRun run = client.Runs.CreateRun( + threadId: thread.Id, + assistantId: agent.Id + ); + run = await WaitForRun(client, run); + List messages = await client.Messages.GetMessagesAsync(threadId: run.ThreadId).ToListAsync(); + Assert.Greater(messages.Count, 0); + StringBuilder sbResponse = new(); + foreach (PersistentThreadMessage msg in messages) + { + if (msg.Role == MessageRole.Agent) + { + msg.ContentItems.Where(x => x is MessageTextContent).Select(x => ((MessageTextContent)x).Text).Aggregate(sbResponse, (sbResponse, next) => sbResponse.Append(next)); + } + } + string response = sbResponse.ToString().ToLower(); + Assert.That(response.Contains(expectedWord), $"The word {expectedWord} was not found in the response: {response}"); + } + #region Helpers private static async Task ValidateStream( PersistentAgentsClient client, 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 25e45634fc7f..d4bbbd921410 100644 --- a/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj +++ b/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj @@ -9,6 +9,7 @@ true latest true + false diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.RestClient.cs index 1de470698629..2534b6d9e003 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.RestClient.cs @@ -2,10 +2,12 @@ #nullable disable +using System.ClientModel.Primitives; + namespace Azure.AI.Projects { /// - public partial class AIProjectClient + public partial class AIProjectClient : ClientConnectionProvider { } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs index 1e7d0e33a3b4..bfe9dc53d45c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Projects { /// The AIProjectClient. - public partial class AIProjectClient + public partial class AIProjectClient : ClientConnectionProvider { private readonly Uri _endpoint; /// A credential provider used to authenticate to the service. diff --git a/sdk/ai/Azure.AI.Projects/src/Properties/AssemblyInfo.cs b/sdk/ai/Azure.AI.Projects/src/Properties/AssemblyInfo.cs index e505526fd17e..147b2b39c2ea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Properties/AssemblyInfo.cs +++ b/sdk/ai/Azure.AI.Projects/src/Properties/AssemblyInfo.cs @@ -4,9 +4,3 @@ using Azure.Core; [assembly: AzureResourceProviderNamespace("Microsoft.CognitiveServices")] -[assembly: CodeGenSuppressType("Azure.AI.Projects.AgentObject")] -[assembly: CodeGenSuppressType("Azure.AI.Projects.AgentThreadObject")] -[assembly: CodeGenSuppressType("Azure.AI.Projects.OpenAIFileObject")] -[assembly: CodeGenSuppressType("Azure.AI.Projects.RunStepObject")] -[assembly: CodeGenSuppressType("Azure.AI.Projects.ThreadMessageObject")] -[assembly: CodeGenSuppressType("Azure.AI.Projects.ThreadRunObject")] diff --git a/sdk/ai/Azure.AI.Projects/tsp-location.yaml b/sdk/ai/Azure.AI.Projects/tsp-location.yaml index 7adb755af701..40c12924da1d 100644 --- a/sdk/ai/Azure.AI.Projects/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Projects/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Azure.AI.Projects -commit: d62e34a7aebd2a20d41832bc552d3b796695940c +commit: 681c15ad9028f91b3f4978625527fd461b57f4fa repo: Azure/azure-rest-api-specs emitterPackageJsonPath: eng/http-client-csharp-emitter-package.json diff --git a/sdk/ai/Azure.AI.VoiceLive/CHANGELOG.md b/sdk/ai/Azure.AI.VoiceLive/CHANGELOG.md index d309e9bab1b7..d693b973fea1 100644 --- a/sdk/ai/Azure.AI.VoiceLive/CHANGELOG.md +++ b/sdk/ai/Azure.AI.VoiceLive/CHANGELOG.md @@ -1,12 +1,16 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.2 (Unreleased) ### Features Added -Initial Addition of VoiceLiveClient and associated classes. ### Breaking Changes ### Bugs Fixed -### Other Changes \ No newline at end of file +### Other Changes + +## 1.0.0-beta.1 (2025-09-16) + +### Features Added +Initial Addition of VoiceLiveClient and associated classes. diff --git a/sdk/ai/Azure.AI.VoiceLive/README.md b/sdk/ai/Azure.AI.VoiceLive/README.md index cec38cc00970..e61c2d3d87d6 100644 --- a/sdk/ai/Azure.AI.VoiceLive/README.md +++ b/sdk/ai/Azure.AI.VoiceLive/README.md @@ -146,7 +146,7 @@ var model = "gpt-4o-mini-realtime-preview"; // Specify the model to use VoiceLiveSession session = await client.StartSessionAsync(model).ConfigureAwait(false); // Configure session for voice conversation -SessionOptions sessionOptions = new SessionOptions() +VoiceLiveSessionOptions sessionOptions = new() { Model = model, Instructions = "You are a helpful AI assistant. Respond naturally and conversationally.", @@ -188,7 +188,7 @@ await foreach (SessionUpdate serverEvent in session.GetUpdatesAsync().ConfigureA ### Configuring custom voice and advanced features ```C# Snippet:AdvancedVoiceConfiguration -SessionOptions sessionOptions = new SessionOptions() +VoiceLiveSessionOptions sessionOptions = new() { Model = model, Instructions = "You are a customer service representative. Be helpful and professional.", @@ -235,7 +235,7 @@ var getCurrentWeatherFunction = new VoiceLiveFunctionDefinition("get_current_wea """) }; -SessionOptions sessionOptions = new SessionOptions() +VoiceLiveSessionOptions sessionOptions = new() { Model = model, Instructions = "You are a weather assistant. Use the get_current_weather function to help users with weather information.", diff --git a/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.net8.0.cs b/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.net8.0.cs index ae76e62ac89e..9bf096094ee4 100644 --- a/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.net8.0.cs +++ b/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.net8.0.cs @@ -72,11 +72,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class AudioInputTranscriptionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model, bool enabled, bool customModel) { } - public bool CustomModel { get { throw null; } set { } } - public bool Enabled { get { throw null; } set { } } + public AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model) { } + public System.Collections.Generic.IDictionary CustomSpeech { get { throw null; } } public string Language { get { throw null; } set { } } public Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Model { get { throw null; } set { } } + public System.Collections.Generic.IList PhraseList { get { throw null; } } protected virtual Azure.AI.VoiceLive.AudioInputTranscriptionSettings 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.VoiceLive.AudioInputTranscriptionSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -95,7 +95,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public AudioInputTranscriptionSettingsModel(string value) { throw null; } public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel AzureFastTranscription { get { throw null; } } public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel AzureSpeech { get { throw null; } } - public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel S2sIngraph { get { throw null; } } + public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Gpt4oMiniTranscribe { get { throw null; } } + public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Gpt4oTranscribe { get { throw null; } } public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Whisper1 { get { throw null; } } public bool Equals(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -140,23 +141,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.VoiceLive.AudioTimestampType left, Azure.AI.VoiceLive.AudioTimestampType right) { throw null; } public override string ToString() { throw null; } } - public partial class AvatarConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AvatarConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AvatarConfig(string character, bool customized) { } + public AvatarConfiguration(string character, bool customized) { } public string Character { get { throw null; } set { } } public bool Customized { get { throw null; } set { } } public System.Collections.Generic.IList IceServers { get { throw null; } } public string Style { get { throw null; } set { } } public Azure.AI.VoiceLive.VideoParams Video { get { throw null; } set { } } - protected virtual Azure.AI.VoiceLive.AvatarConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.AvatarConfiguration 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.VoiceLive.AvatarConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.AvatarConfiguration 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.VoiceLive.AvatarConfig 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.VoiceLive.AvatarConfig 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.VoiceLive.AvatarConfiguration 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.VoiceLive.AvatarConfiguration 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 AzureAIVoiceLiveContext : System.ClientModel.Primitives.ModelReaderWriterContext { @@ -426,6 +427,21 @@ 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 CachedTokenDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CachedTokenDetails() { } + public int AudioTokens { get { throw null; } } + public int TextTokens { get { throw null; } } + protected virtual Azure.AI.VoiceLive.CachedTokenDetails 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.VoiceLive.CachedTokenDetails 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.VoiceLive.CachedTokenDetails 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.VoiceLive.CachedTokenDetails 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 abstract partial class ConversationRequestItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationRequestItem() { } @@ -587,6 +603,7 @@ public partial class InputTokenDetails : System.ClientModel.Primitives.IJsonMode internal InputTokenDetails() { } public int AudioTokens { get { throw null; } } public int CachedTokens { get { throw null; } } + public Azure.AI.VoiceLive.CachedTokenDetails CachedTokensDetails { get { throw null; } } public int TextTokens { get { throw null; } } protected virtual Azure.AI.VoiceLive.InputTokenDetails 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) { } @@ -639,7 +656,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class LogProbProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LogProbProperties() { } - public System.Collections.Generic.IList Bytes { get { throw null; } } + public System.BinaryData Bytes { get { throw null; } } public float Logprob { get { throw null; } } public string Token { get { throw null; } } protected virtual Azure.AI.VoiceLive.LogProbProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -763,38 +780,6 @@ 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 RequestSession : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RequestSession() { } - public Azure.AI.VoiceLive.AnimationOptions Animation { get { throw null; } set { } } - public Azure.AI.VoiceLive.AvatarConfig Avatar { get { throw null; } set { } } - public Azure.AI.VoiceLive.InputAudio InputAudio { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioEchoCancellation InputAudioEchoCancellation { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioNoiseReduction InputAudioNoiseReduction { get { throw null; } set { } } - public int? InputAudioSamplingRate { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } set { } } - public string Instructions { get { throw null; } set { } } - public int? MaxResponseOutputTokens { get { throw null; } set { } } - public System.Collections.Generic.IList Modalities { get { throw null; } } - public string Model { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } set { } } - public System.Collections.Generic.IList OutputAudioTimestampTypes { get { throw null; } } - public float? Temperature { get { throw null; } set { } } - public string ToolChoice { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } } - public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } set { } } - public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } set { } } - protected virtual Azure.AI.VoiceLive.RequestSession 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.VoiceLive.RequestSession 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.VoiceLive.RequestSession 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.VoiceLive.RequestSession 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 RequestTextContentPart : Azure.AI.VoiceLive.VoiceLiveContentPart, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RequestTextContentPart() { } @@ -809,23 +794,23 @@ 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 RespondingAgentConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RespondingAgentOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal RespondingAgentConfig() { } - public string AgentId { get { throw null; } } - public string Description { get { throw null; } } - public string Name { get { throw null; } } - public string ThreadId { get { throw null; } } + public RespondingAgentOptions(string name, string agentId, string threadId) { } + public string AgentId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ThreadId { get { throw null; } set { } } public string Type { get { throw null; } } - protected virtual Azure.AI.VoiceLive.RespondingAgentConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.RespondingAgentOptions 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.VoiceLive.RespondingAgentConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.RespondingAgentOptions 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.VoiceLive.RespondingAgentConfig 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.VoiceLive.RespondingAgentConfig 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.VoiceLive.RespondingAgentOptions 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.VoiceLive.RespondingAgentOptions 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 ResponseAudioContentPart : Azure.AI.VoiceLive.VoiceLiveContentPart, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -880,7 +865,7 @@ internal ResponseFunctionCallItem() { } public string Arguments { get { throw null; } } public string CallId { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.VoiceLive.ResponseItemStatus Status { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Status { get { throw null; } } protected override Azure.AI.VoiceLive.ResponseItem 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.VoiceLive.ResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -940,32 +925,26 @@ 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 ResponseItemStatus : System.IEquatable + public partial class ResponseMaxOutputTokensOption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResponseItemStatus(string value) { throw null; } - public static Azure.AI.VoiceLive.ResponseItemStatus Completed { get { throw null; } } - public static Azure.AI.VoiceLive.ResponseItemStatus Incomplete { get { throw null; } } - public static Azure.AI.VoiceLive.ResponseItemStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.VoiceLive.ResponseItemStatus 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.AI.VoiceLive.ResponseItemStatus left, Azure.AI.VoiceLive.ResponseItemStatus right) { throw null; } - public static implicit operator Azure.AI.VoiceLive.ResponseItemStatus (string value) { throw null; } - public static implicit operator Azure.AI.VoiceLive.ResponseItemStatus? (string value) { throw null; } - public static bool operator !=(Azure.AI.VoiceLive.ResponseItemStatus left, Azure.AI.VoiceLive.ResponseItemStatus right) { throw null; } - public override string ToString() { throw null; } + public ResponseMaxOutputTokensOption(int numberValue) { } + public int? NumericValue { get { throw null; } } + public static Azure.AI.VoiceLive.ResponseMaxOutputTokensOption CreateDefaultMaxTokensOption() { throw null; } + public static Azure.AI.VoiceLive.ResponseMaxOutputTokensOption CreateInfiniteMaxTokensOption() { throw null; } + public static Azure.AI.VoiceLive.ResponseMaxOutputTokensOption CreateNumericMaxTokensOption(int maxTokens) { throw null; } + public static implicit operator Azure.AI.VoiceLive.ResponseMaxOutputTokensOption (int maxTokens) { throw null; } + Azure.AI.VoiceLive.ResponseMaxOutputTokensOption 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.VoiceLive.ResponseMaxOutputTokensOption 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 ResponseMessageItem : Azure.AI.VoiceLive.ResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResponseMessageItem() { } public System.Collections.Generic.IList Content { get { throw null; } } public Azure.AI.VoiceLive.ResponseMessageRole Role { get { throw null; } } - public Azure.AI.VoiceLive.ResponseItemStatus Status { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Status { get { throw null; } } protected override Azure.AI.VoiceLive.ResponseItem 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.VoiceLive.ResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -996,45 +975,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.VoiceLive.ResponseMessageRole left, Azure.AI.VoiceLive.ResponseMessageRole right) { throw null; } public override string ToString() { throw null; } } - public enum ResponseOutputAudioFormat + public partial class ResponseSession { - Pcm16 = 0, - G711Ulaw = 1, - G711Alaw = 2, - } - public partial class ResponseSession : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ResponseSession() { } - public Azure.AI.VoiceLive.RespondingAgentConfig Agent { get { throw null; } } - public Azure.AI.VoiceLive.AnimationOptions Animation { get { throw null; } } - public Azure.AI.VoiceLive.AvatarConfig Avatar { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.VoiceLive.InputAudio InputAudio { get { throw null; } } - public Azure.AI.VoiceLive.AudioEchoCancellation InputAudioEchoCancellation { get { throw null; } } - public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } } - public Azure.AI.VoiceLive.AudioNoiseReduction InputAudioNoiseReduction { get { throw null; } } - public int? InputAudioSamplingRate { get { throw null; } } - public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } } - public string Instructions { get { throw null; } } - public System.BinaryData MaxResponseOutputTokens { get { throw null; } } - public System.Collections.Generic.IList Modalities { get { throw null; } } - public string Model { get { throw null; } } - public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } } - public System.Collections.Generic.IList OutputAudioTimestampTypes { get { throw null; } } - public float? Temperature { get { throw null; } } - public System.BinaryData ToolChoice { get { throw null; } } - public System.Collections.Generic.IList Tools { get { throw null; } } - public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } } + public ResponseSession() { } public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } } - protected virtual Azure.AI.VoiceLive.ResponseSession 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.VoiceLive.ResponseSession 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.VoiceLive.ResponseSession 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.VoiceLive.ResponseSession 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 abstract partial class ResponseStatusDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1081,24 +1025,6 @@ 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 ServerEventErrorError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ServerEventErrorError() { } - public string Code { get { throw null; } } - public string EventId { get { throw null; } } - public string Message { get { throw null; } } - public string Param { get { throw null; } } - public string Type { get { throw null; } } - protected virtual Azure.AI.VoiceLive.ServerEventErrorError 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.VoiceLive.ServerEventErrorError 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.VoiceLive.ServerEventErrorError 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.VoiceLive.ServerEventErrorError 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 ServerVad : Azure.AI.VoiceLive.TurnDetection, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServerVad() { } @@ -1117,29 +1043,6 @@ 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 SessionOptions - { - public SessionOptions() { } - public System.Collections.Generic.IList CustomVocabulary { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioEchoCancellation EchoCancellation { get { throw null; } set { } } - public bool IncludeConfidenceScores { get { throw null; } set { } } - public bool IncludeTimestamps { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } set { } } - public string Instructions { get { throw null; } set { } } - public string Language { get { throw null; } set { } } - public int? MaxResponseOutputTokens { get { throw null; } set { } } - public System.Collections.Generic.IList Modalities { get { throw null; } set { } } - public string Model { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioNoiseReduction NoiseReduction { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } set { } } - public bool ParallelToolCalls { get { throw null; } set { } } - public float? Temperature { get { throw null; } set { } } - public string ToolChoice { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } set { } } - public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } set { } } - public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } set { } } - } public abstract partial class SessionUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdate() { } @@ -1268,7 +1171,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateError : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateError() { } - public Azure.AI.VoiceLive.ServerEventErrorError Error { get { throw null; } } + public Azure.AI.VoiceLive.SessionUpdateErrorDetails Error { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1279,6 +1182,24 @@ 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 SessionUpdateErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SessionUpdateErrorDetails() { } + public string Code { get { throw null; } } + public string EventId { get { throw null; } } + public string Message { get { throw null; } } + public string Param { get { throw null; } } + public string Type { get { throw null; } } + protected virtual Azure.AI.VoiceLive.SessionUpdateErrorDetails 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.VoiceLive.SessionUpdateErrorDetails 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.VoiceLive.SessionUpdateErrorDetails 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.VoiceLive.SessionUpdateErrorDetails 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 SessionUpdateInputAudioBufferCleared : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateInputAudioBufferCleared() { } @@ -1310,7 +1231,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateInputAudioBufferSpeechStarted : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateInputAudioBufferSpeechStarted() { } - public int AudioStartMs { get { throw null; } } + public System.TimeSpan AudioStart { get { throw null; } } public string ItemId { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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) { } @@ -1325,6 +1246,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateInputAudioBufferSpeechStopped : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateInputAudioBufferSpeechStopped() { } + public System.TimeSpan AudioEnd { get { throw null; } } public int AudioEndMs { get { throw null; } } public string ItemId { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1406,7 +1328,6 @@ internal SessionUpdateResponseAnimationVisemeDone() { } public string ResponseId { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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) { } - public static explicit operator Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDone (Azure.Response result) { throw null; } protected override Azure.AI.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDone System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1420,7 +1341,6 @@ public partial class SessionUpdateResponseAudioDelta : Azure.AI.VoiceLive.Sessio internal SessionUpdateResponseAudioDelta() { } public int ContentIndex { get { throw null; } } public System.BinaryData Delta { get { throw null; } } - public override string EventId { get { throw null; } } public string ItemId { get { throw null; } } public int OutputIndex { get { throw null; } } public string ResponseId { get { throw null; } } @@ -1730,7 +1650,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateSessionCreated : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateSessionCreated() { } - public Azure.AI.VoiceLive.ResponseSession Session { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveSessionResponse Session { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1744,7 +1664,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateSessionUpdated : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateSessionUpdated() { } - public Azure.AI.VoiceLive.ResponseSession Session { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveSessionResponse Session { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1769,34 +1689,6 @@ 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 ToolChoiceFunctionObject : Azure.AI.VoiceLive.ToolChoiceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolChoiceFunctionObject(Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction function) { } - public Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction Function { get { throw null; } set { } } - protected override Azure.AI.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.VoiceLive.ToolChoiceFunctionObject 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.VoiceLive.ToolChoiceFunctionObject 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 ToolChoiceFunctionObjectFunction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolChoiceFunctionObjectFunction(string name) { } - public string Name { get { throw null; } set { } } - protected virtual Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction 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.VoiceLive.ToolChoiceFunctionObjectFunction 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.VoiceLive.ToolChoiceFunctionObjectFunction 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.VoiceLive.ToolChoiceFunctionObjectFunction 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 ToolChoiceLiteral : System.IEquatable { @@ -1817,18 +1709,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.VoiceLive.ToolChoiceLiteral left, Azure.AI.VoiceLive.ToolChoiceLiteral right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class ToolChoiceObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ToolChoiceOption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ToolChoiceObject() { } - protected virtual Azure.AI.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject 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 ToolChoiceOption(Azure.AI.VoiceLive.ToolChoiceLiteral toolChoiceLiteral) { } + public ToolChoiceOption(string stringValue) { } + public string FunctionName { get { throw null; } } + public Azure.AI.VoiceLive.ToolChoiceLiteral? ToolCallConstraint { get { throw null; } } + public static implicit operator Azure.AI.VoiceLive.ToolChoiceOption (Azure.AI.VoiceLive.ToolChoiceLiteral literal) { throw null; } + public static implicit operator Azure.AI.VoiceLive.ToolChoiceOption (string name) { throw null; } + Azure.AI.VoiceLive.ToolChoiceOption 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.VoiceLive.ToolChoiceOption 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 abstract partial class TurnDetection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1926,9 +1819,9 @@ public VoiceLiveClient(System.Uri endpoint, Azure.AzureKeyCredential credential, public VoiceLiveClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } public VoiceLiveClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.VoiceLive.VoiceLiveClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.AI.VoiceLive.VoiceLiveSession StartSession(Azure.AI.VoiceLive.RequestSession sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AI.VoiceLive.VoiceLiveSession StartSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AI.VoiceLive.VoiceLiveSession StartSession(string model, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartSessionAsync(Azure.AI.VoiceLive.RequestSession sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartSessionAsync(string model, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class VoiceLiveClientOptions : Azure.Core.ClientOptions @@ -1991,9 +1884,9 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.AnimationOptions AnimationOptions(string modelName = null, System.Collections.Generic.IEnumerable outputs = null, int? emotionDetectionIntervalMs = default(int?)) { throw null; } public static Azure.AI.VoiceLive.AssistantMessageItem AssistantMessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?), System.Collections.Generic.IEnumerable content = null) { throw null; } public static Azure.AI.VoiceLive.AudioEchoCancellation AudioEchoCancellation(string type = null) { throw null; } - public static Azure.AI.VoiceLive.AudioInputTranscriptionSettings AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model = default(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel), string language = null, bool enabled = false, bool customModel = false) { throw null; } + public static Azure.AI.VoiceLive.AudioInputTranscriptionSettings AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model = default(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel), string language = null, System.Collections.Generic.IDictionary customSpeech = null, System.Collections.Generic.IEnumerable phraseList = null) { throw null; } public static Azure.AI.VoiceLive.AudioNoiseReduction AudioNoiseReduction(string type = null) { throw null; } - public static Azure.AI.VoiceLive.AvatarConfig AvatarConfig(System.Collections.Generic.IEnumerable iceServers = null, string character = null, string style = null, bool customized = false, Azure.AI.VoiceLive.VideoParams video = null) { throw null; } + public static Azure.AI.VoiceLive.AvatarConfiguration AvatarConfiguration(System.Collections.Generic.IEnumerable iceServers = null, string character = null, string style = null, bool customized = false, Azure.AI.VoiceLive.VideoParams video = null) { throw null; } public static Azure.AI.VoiceLive.AzureCustomVoice AzureCustomVoice(string name = null, string endpointId = null, float? temperature = default(float?), string customLexiconUri = null, System.Collections.Generic.IEnumerable preferLocales = null, string locale = null, string style = null, string pitch = null, string rate = null, string volume = null) { throw null; } public static Azure.AI.VoiceLive.AzureMultilingualSemanticVad AzureMultilingualSemanticVad(float? threshold = default(float?), int? prefixPaddingMs = default(int?), int? silenceDurationMs = default(int?), Azure.AI.VoiceLive.EouDetection endOfUtteranceDetection = null, float? negThreshold = default(float?), int? speechDurationMs = default(int?), int? windowSize = default(int?), int? distinctCiPhones = default(int?), bool? requireVowel = default(bool?), bool? removeFillerWords = default(bool?), System.Collections.Generic.IEnumerable languages = null, bool? autoTruncate = default(bool?)) { throw null; } public static Azure.AI.VoiceLive.AzurePersonalVoice AzurePersonalVoice(string name = null, float? temperature = default(float?), Azure.AI.VoiceLive.AzurePersonalVoiceModel model = Azure.AI.VoiceLive.AzurePersonalVoiceModel.DragonLatestNeural) { throw null; } @@ -2006,6 +1899,7 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.AzureSemanticVadServer AzureSemanticVadServer(float? threshold = default(float?), int? prefixPaddingMs = default(int?), int? silenceDurationMs = default(int?), Azure.AI.VoiceLive.EouDetection endOfUtteranceDetection = null, float? negThreshold = default(float?), int? speechDurationMs = default(int?), int? windowSize = default(int?), int? distinctCiPhones = default(int?), bool? requireVowel = default(bool?), bool? removeFillerWords = default(bool?), System.Collections.Generic.IEnumerable languages = null, bool? autoTruncate = default(bool?)) { throw null; } public static Azure.AI.VoiceLive.AzureStandardVoice AzureStandardVoice(string name = null, float? temperature = default(float?), string customLexiconUrl = null, System.Collections.Generic.IEnumerable preferLocales = null, string locale = null, string style = null, string pitch = null, string rate = null, string volume = null) { throw null; } public static Azure.AI.VoiceLive.AzureVoice AzureVoice(string type = null) { throw null; } + public static Azure.AI.VoiceLive.CachedTokenDetails CachedTokenDetails(int textTokens = 0, int audioTokens = 0) { throw null; } public static Azure.AI.VoiceLive.ConversationRequestItem ConversationRequestItem(string type = null, string id = null) { throw null; } public static Azure.AI.VoiceLive.EmotionCandidate EmotionCandidate(string emotion = null, float confidence = 0f) { throw null; } public static Azure.AI.VoiceLive.EouDetection EouDetection(string model = null) { throw null; } @@ -2015,31 +1909,28 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.InputAudio InputAudio(string model = null, System.Collections.Generic.IEnumerable phraseList = null) { throw null; } public static Azure.AI.VoiceLive.InputAudioContentPart InputAudioContentPart(string audio = null, string transcript = null) { throw null; } public static Azure.AI.VoiceLive.InputTextContentPart InputTextContentPart(string text = null) { throw null; } - public static Azure.AI.VoiceLive.InputTokenDetails InputTokenDetails(int cachedTokens = 0, int textTokens = 0, int audioTokens = 0) { throw null; } + public static Azure.AI.VoiceLive.InputTokenDetails InputTokenDetails(int cachedTokens = 0, int textTokens = 0, int audioTokens = 0, Azure.AI.VoiceLive.CachedTokenDetails cachedTokensDetails = null) { throw null; } public static Azure.AI.VoiceLive.LlmVoice LlmVoice(string type = null, Azure.AI.VoiceLive.LlmVoiceName name = default(Azure.AI.VoiceLive.LlmVoiceName)) { throw null; } - public static Azure.AI.VoiceLive.LogProbProperties LogProbProperties(string token = null, float logprob = 0f, System.Collections.Generic.IEnumerable bytes = null) { throw null; } + public static Azure.AI.VoiceLive.LogProbProperties LogProbProperties(string token = null, float logprob = 0f, System.BinaryData bytes = null) { throw null; } public static Azure.AI.VoiceLive.MessageItem MessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?)) { throw null; } public static Azure.AI.VoiceLive.NoTurnDetection NoTurnDetection() { throw null; } public static Azure.AI.VoiceLive.OpenAIVoice OpenAIVoice(string type = null, Azure.AI.VoiceLive.OAIVoice name = default(Azure.AI.VoiceLive.OAIVoice)) { throw null; } public static Azure.AI.VoiceLive.OutputTextContentPart OutputTextContentPart(string type = null, string text = null) { throw null; } public static Azure.AI.VoiceLive.OutputTokenDetails OutputTokenDetails(int textTokens = 0, int audioTokens = 0) { throw null; } public static Azure.AI.VoiceLive.RequestAudioContentPart RequestAudioContentPart(string transcript = null) { throw null; } - public static Azure.AI.VoiceLive.RequestSession RequestSession(string model = null, System.Collections.Generic.IEnumerable modalities = null, Azure.AI.VoiceLive.AnimationOptions animation = null, string instructions = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfig avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, float? temperature = default(float?), System.BinaryData serviceVoice = null, System.BinaryData maxResponseOutputTokens = null, System.BinaryData toolChoice = null) { throw null; } public static Azure.AI.VoiceLive.RequestTextContentPart RequestTextContentPart(string text = null) { throw null; } - public static Azure.AI.VoiceLive.RespondingAgentConfig RespondingAgentConfig(string type = null, string name = null, string description = null, string agentId = null, string threadId = null) { throw null; } + public static Azure.AI.VoiceLive.RespondingAgentOptions RespondingAgentOptions(string type = null, string name = null, string description = null, string agentId = null, string threadId = null) { throw null; } public static Azure.AI.VoiceLive.ResponseAudioContentPart ResponseAudioContentPart(string transcript = null) { throw null; } public static Azure.AI.VoiceLive.ResponseCancelledDetails ResponseCancelledDetails(Azure.AI.VoiceLive.ResponseCancelledDetailsReason reason = Azure.AI.VoiceLive.ResponseCancelledDetailsReason.TurnDetected) { throw null; } public static Azure.AI.VoiceLive.ResponseFailedDetails ResponseFailedDetails(System.BinaryData error = null) { throw null; } - public static Azure.AI.VoiceLive.ResponseFunctionCallItem ResponseFunctionCallItem(string id = null, string @object = null, string name = null, string callId = null, string arguments = null, Azure.AI.VoiceLive.ResponseItemStatus status = default(Azure.AI.VoiceLive.ResponseItemStatus)) { throw null; } + public static Azure.AI.VoiceLive.ResponseFunctionCallItem ResponseFunctionCallItem(string id = null, string @object = null, string name = null, string callId = null, string arguments = null, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus status = default(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus)) { throw null; } public static Azure.AI.VoiceLive.ResponseFunctionCallOutputItem ResponseFunctionCallOutputItem(string id = null, string @object = null, string callId = null, string output = null) { throw null; } public static Azure.AI.VoiceLive.ResponseIncompleteDetails ResponseIncompleteDetails(Azure.AI.VoiceLive.ResponseIncompleteDetailsReason reason = Azure.AI.VoiceLive.ResponseIncompleteDetailsReason.MaxOutputTokens) { throw null; } public static Azure.AI.VoiceLive.ResponseItem ResponseItem(string type = null, string id = null, string @object = null) { throw null; } - public static Azure.AI.VoiceLive.ResponseMessageItem ResponseMessageItem(string id = null, string @object = null, Azure.AI.VoiceLive.ResponseMessageRole role = default(Azure.AI.VoiceLive.ResponseMessageRole), System.Collections.Generic.IEnumerable content = null, Azure.AI.VoiceLive.ResponseItemStatus status = default(Azure.AI.VoiceLive.ResponseItemStatus)) { throw null; } - public static Azure.AI.VoiceLive.ResponseSession ResponseSession(string id = null, string model = null, System.Collections.Generic.IEnumerable modalities = null, string instructions = null, Azure.AI.VoiceLive.AnimationOptions animation = null, System.BinaryData voiceInternal = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfig avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, System.BinaryData toolChoice = null, float? temperature = default(float?), System.BinaryData maxResponseOutputTokens = null, Azure.AI.VoiceLive.RespondingAgentConfig agent = null) { throw null; } + public static Azure.AI.VoiceLive.ResponseMessageItem ResponseMessageItem(string id = null, string @object = null, Azure.AI.VoiceLive.ResponseMessageRole role = default(Azure.AI.VoiceLive.ResponseMessageRole), System.Collections.Generic.IEnumerable content = null, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus status = default(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus)) { throw null; } public static Azure.AI.VoiceLive.ResponseStatusDetails ResponseStatusDetails(string type = null) { throw null; } public static Azure.AI.VoiceLive.ResponseTextContentPart ResponseTextContentPart(string text = null) { throw null; } public static Azure.AI.VoiceLive.ResponseTokenStatistics ResponseTokenStatistics(int totalTokens = 0, int inputTokens = 0, int outputTokens = 0, Azure.AI.VoiceLive.InputTokenDetails inputTokenDetails = null, Azure.AI.VoiceLive.OutputTokenDetails outputTokenDetails = null) { throw null; } - public static Azure.AI.VoiceLive.ServerEventErrorError ServerEventErrorError(string type = null, string code = null, string message = null, string param = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.ServerVad ServerVad(float? threshold = default(float?), int? prefixPaddingMs = default(int?), int? silenceDurationMs = default(int?), Azure.AI.VoiceLive.EouDetection endOfUtteranceDetection = null, bool? autoTruncate = default(bool?)) { throw null; } public static Azure.AI.VoiceLive.SessionUpdate SessionUpdate(string type = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateConversationItemCreated SessionUpdateConversationItemCreated(string eventId = null, string previousItemId = null, Azure.AI.VoiceLive.ResponseItem item = null) { throw null; } @@ -2049,7 +1940,8 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.SessionUpdateConversationItemInputAudioTranscriptionFailed SessionUpdateConversationItemInputAudioTranscriptionFailed(string eventId = null, string itemId = null, int contentIndex = 0, Azure.AI.VoiceLive.VoiceLiveErrorDetails error = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateConversationItemRetrieved SessionUpdateConversationItemRetrieved(Azure.AI.VoiceLive.ResponseItem item = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateConversationItemTruncated SessionUpdateConversationItemTruncated(string itemId = null, int contentIndex = 0, int audioEndMs = 0, string eventId = null) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateError SessionUpdateError(string eventId = null, Azure.AI.VoiceLive.ServerEventErrorError error = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateError SessionUpdateError(string eventId = null, Azure.AI.VoiceLive.SessionUpdateErrorDetails error = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateErrorDetails SessionUpdateErrorDetails(string type = null, string code = null, string message = null, string param = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateInputAudioBufferCleared SessionUpdateInputAudioBufferCleared(string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateInputAudioBufferCommitted SessionUpdateInputAudioBufferCommitted(string eventId = null, string previousItemId = null, string itemId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateInputAudioBufferSpeechStarted SessionUpdateInputAudioBufferSpeechStarted(string eventId = null, int audioStartMs = 0, string itemId = null) { throw null; } @@ -2058,7 +1950,7 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.SessionUpdateResponseAnimationBlendshapeDone SessionUpdateResponseAnimationBlendshapeDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDelta SessionUpdateResponseAnimationVisemeDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, int audioOffsetMs = 0, int visemeId = 0) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDone SessionUpdateResponseAnimationVisemeDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateResponseAudioDelta SessionUpdateResponseAudioDelta(string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, System.BinaryData delta = null, string eventId = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateResponseAudioDelta SessionUpdateResponseAudioDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, System.BinaryData delta = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAudioDone SessionUpdateResponseAudioDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAudioTimestampDelta SessionUpdateResponseAudioTimestampDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, int audioOffsetMs = 0, int audioDurationMs = 0, string text = null, string timestampType = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAudioTimestampDone SessionUpdateResponseAudioTimestampDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0) { throw null; } @@ -2076,12 +1968,9 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.SessionUpdateResponseTextDelta SessionUpdateResponseTextDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, string delta = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseTextDone SessionUpdateResponseTextDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, string text = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateSessionAvatarConnecting SessionUpdateSessionAvatarConnecting(string eventId = null, string serverSdp = null) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateSessionCreated SessionUpdateSessionCreated(string eventId = null, Azure.AI.VoiceLive.ResponseSession session = null) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eventId = null, Azure.AI.VoiceLive.ResponseSession session = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateSessionCreated SessionUpdateSessionCreated(string eventId = null, Azure.AI.VoiceLive.VoiceLiveSessionResponse session = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eventId = null, Azure.AI.VoiceLive.VoiceLiveSessionResponse session = null) { throw null; } public static Azure.AI.VoiceLive.SystemMessageItem SystemMessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?), System.Collections.Generic.IEnumerable content = null) { throw null; } - public static Azure.AI.VoiceLive.ToolChoiceFunctionObject ToolChoiceFunctionObject(Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction function = null) { throw null; } - public static Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction ToolChoiceFunctionObjectFunction(string name = null) { throw null; } - public static Azure.AI.VoiceLive.ToolChoiceObject ToolChoiceObject(string type = null) { throw null; } public static Azure.AI.VoiceLive.TurnDetection TurnDetection(string type = null) { throw null; } public static Azure.AI.VoiceLive.UserContentPart UserContentPart(string type = null) { throw null; } public static Azure.AI.VoiceLive.UserMessageItem UserMessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?), System.Collections.Generic.IEnumerable content = null) { throw null; } @@ -2091,6 +1980,8 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.VoiceLiveContentPart VoiceLiveContentPart(string type = null) { throw null; } public static Azure.AI.VoiceLive.VoiceLiveErrorDetails VoiceLiveErrorDetails(string code = null, string message = null, string param = null, string type = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.VoiceLiveFunctionDefinition VoiceLiveFunctionDefinition(string name = null, string description = null, System.BinaryData parameters = null) { throw null; } + public static Azure.AI.VoiceLive.VoiceLiveSessionOptions VoiceLiveSessionOptions(string model = null, System.Collections.Generic.IEnumerable modalities = null, Azure.AI.VoiceLive.AnimationOptions animation = null, string instructions = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfiguration avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, float? temperature = default(float?), Azure.AI.VoiceLive.RespondingAgentOptions agent = null, System.BinaryData voiceInternal = null, System.BinaryData maxResponseOutputTokens = null, System.BinaryData toolChoice = null) { throw null; } + public static Azure.AI.VoiceLive.VoiceLiveSessionResponse VoiceLiveSessionResponse(string model = null, System.Collections.Generic.IEnumerable modalities = null, Azure.AI.VoiceLive.AnimationOptions animation = null, string instructions = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfiguration avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, float? temperature = default(float?), Azure.AI.VoiceLive.RespondingAgentOptions agent = null, System.BinaryData voiceInternal = null, System.BinaryData maxResponseOutputTokens = null, System.BinaryData toolChoice = null, string id = null) { throw null; } public static Azure.AI.VoiceLive.VoiceLiveToolDefinition VoiceLiveToolDefinition(string type = null) { throw null; } } public partial class VoiceLiveResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -2098,11 +1989,11 @@ public partial class VoiceLiveResponse : System.ClientModel.Primitives.IJsonMode internal VoiceLiveResponse() { } public string ConversationId { get { throw null; } } public string Id { get { throw null; } } - public System.BinaryData MaxOutputTokens { get { throw null; } } + public Azure.AI.VoiceLive.ResponseMaxOutputTokensOption MaxOutputTokens { get { throw null; } } public Azure.AI.VoiceLive.SessionUpdateModality Modalities { get { throw null; } } public string Object { get { throw null; } } public System.Collections.Generic.IList Output { get { throw null; } } - public Azure.AI.VoiceLive.ResponseOutputAudioFormat? OutputAudioFormat { get { throw null; } } + public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } } public Azure.AI.VoiceLive.VoiceLiveResponseStatus? Status { get { throw null; } } public Azure.AI.VoiceLive.ResponseStatusDetails StatusDetails { get { throw null; } } public float? Temperature { get { throw null; } } @@ -2118,6 +2009,26 @@ 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 VoiceLiveResponseItemStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VoiceLiveResponseItemStatus(string value) { throw null; } + public static Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Completed { get { throw null; } } + public static Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Incomplete { get { throw null; } } + public static Azure.AI.VoiceLive.VoiceLiveResponseItemStatus InProgress { get { throw null; } } + public bool Equals(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus 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.AI.VoiceLive.VoiceLiveResponseItemStatus left, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus right) { throw null; } + public static implicit operator Azure.AI.VoiceLive.VoiceLiveResponseItemStatus (string value) { throw null; } + public static implicit operator Azure.AI.VoiceLive.VoiceLiveResponseItemStatus? (string value) { throw null; } + public static bool operator !=(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus left, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus right) { throw null; } + public override string ToString() { throw null; } + } public enum VoiceLiveResponseStatus { Completed = 0, @@ -2153,12 +2064,12 @@ protected internal VoiceLiveSession(Azure.AI.VoiceLive.VoiceLiveClient parentCli public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual void CommitInputAudio(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } public virtual System.Threading.Tasks.Task CommitInputAudioAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual void ConfigureConversationSession(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } - public virtual System.Threading.Tasks.Task ConfigureConversationSessionAsync(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual void ConfigureSession(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } - public virtual System.Threading.Tasks.Task ConfigureSessionAsync(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual void ConfigureTranscriptionSession(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } - public virtual System.Threading.Tasks.Task ConfigureTranscriptionSessionAsync(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void ConfigureConversationSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task ConfigureConversationSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void ConfigureSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task ConfigureSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void ConfigureTranscriptionSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task ConfigureTranscriptionSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } protected internal virtual void Connect(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } protected internal virtual System.Threading.Tasks.Task ConnectAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual void ConnectAvatar(string clientSdp, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } @@ -2199,19 +2110,52 @@ protected virtual void Dispose(bool disposing) { } public virtual System.Threading.Tasks.Task TruncateConversationAsync(string itemId, int contentIndex, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public System.Threading.Tasks.Task WaitForUpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : Azure.AI.VoiceLive.SessionUpdate { throw null; } } - public partial class VoiceLiveSessionOptions + public partial class VoiceLiveSessionOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VoiceLiveSessionOptions() { } - public bool? CancelPrevious { get { throw null; } set { } } - public bool? Commit { get { throw null; } set { } } + public Azure.AI.VoiceLive.RespondingAgentOptions Agent { get { throw null; } set { } } + public Azure.AI.VoiceLive.AnimationOptions Animation { get { throw null; } set { } } + public Azure.AI.VoiceLive.AvatarConfiguration Avatar { get { throw null; } set { } } + public Azure.AI.VoiceLive.InputAudio InputAudio { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioEchoCancellation InputAudioEchoCancellation { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioNoiseReduction InputAudioNoiseReduction { get { throw null; } set { } } + public int? InputAudioSamplingRate { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } set { } } public string Instructions { get { throw null; } set { } } - public int? MaxOutputTokens { get { throw null; } set { } } - public System.Collections.Generic.IList Modalities { get { throw null; } set { } } + public Azure.AI.VoiceLive.ResponseMaxOutputTokensOption MaxResponseOutputTokens { get { throw null; } set { } } + public System.Collections.Generic.IList Modalities { get { throw null; } } + public string Model { get { throw null; } set { } } public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } set { } } + public System.Collections.Generic.IList OutputAudioTimestampTypes { get { throw null; } } public float? Temperature { get { throw null; } set { } } - public string ToolChoice { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } set { } } + public Azure.AI.VoiceLive.ToolChoiceOption ToolChoice { get { throw null; } set { } } + public System.Collections.Generic.IList Tools { get { throw null; } } + public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } set { } } public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } set { } } + protected virtual Azure.AI.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions 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 VoiceLiveSessionResponse : Azure.AI.VoiceLive.VoiceLiveSessionOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VoiceLiveSessionResponse() { } + public string Id { get { throw null; } } + protected override Azure.AI.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.VoiceLive.VoiceLiveSessionResponse 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.VoiceLive.VoiceLiveSessionResponse 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 abstract partial class VoiceLiveToolDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { diff --git a/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.netstandard2.0.cs b/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.netstandard2.0.cs index a8854545435b..60a9dbddc894 100644 --- a/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.netstandard2.0.cs @@ -72,11 +72,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class AudioInputTranscriptionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model, bool enabled, bool customModel) { } - public bool CustomModel { get { throw null; } set { } } - public bool Enabled { get { throw null; } set { } } + public AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model) { } + public System.Collections.Generic.IDictionary CustomSpeech { get { throw null; } } public string Language { get { throw null; } set { } } public Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Model { get { throw null; } set { } } + public System.Collections.Generic.IList PhraseList { get { throw null; } } protected virtual Azure.AI.VoiceLive.AudioInputTranscriptionSettings 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.VoiceLive.AudioInputTranscriptionSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -95,7 +95,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public AudioInputTranscriptionSettingsModel(string value) { throw null; } public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel AzureFastTranscription { get { throw null; } } public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel AzureSpeech { get { throw null; } } - public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel S2sIngraph { get { throw null; } } + public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Gpt4oMiniTranscribe { get { throw null; } } + public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Gpt4oTranscribe { get { throw null; } } public static Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel Whisper1 { get { throw null; } } public bool Equals(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -140,23 +141,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.VoiceLive.AudioTimestampType left, Azure.AI.VoiceLive.AudioTimestampType right) { throw null; } public override string ToString() { throw null; } } - public partial class AvatarConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AvatarConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AvatarConfig(string character, bool customized) { } + public AvatarConfiguration(string character, bool customized) { } public string Character { get { throw null; } set { } } public bool Customized { get { throw null; } set { } } public System.Collections.Generic.IList IceServers { get { throw null; } } public string Style { get { throw null; } set { } } public Azure.AI.VoiceLive.VideoParams Video { get { throw null; } set { } } - protected virtual Azure.AI.VoiceLive.AvatarConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.AvatarConfiguration 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.VoiceLive.AvatarConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.AvatarConfiguration 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.VoiceLive.AvatarConfig 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.VoiceLive.AvatarConfig 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.VoiceLive.AvatarConfiguration 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.VoiceLive.AvatarConfiguration 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 AzureAIVoiceLiveContext : System.ClientModel.Primitives.ModelReaderWriterContext { @@ -426,6 +427,21 @@ 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 CachedTokenDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CachedTokenDetails() { } + public int AudioTokens { get { throw null; } } + public int TextTokens { get { throw null; } } + protected virtual Azure.AI.VoiceLive.CachedTokenDetails 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.VoiceLive.CachedTokenDetails 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.VoiceLive.CachedTokenDetails 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.VoiceLive.CachedTokenDetails 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 abstract partial class ConversationRequestItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationRequestItem() { } @@ -587,6 +603,7 @@ public partial class InputTokenDetails : System.ClientModel.Primitives.IJsonMode internal InputTokenDetails() { } public int AudioTokens { get { throw null; } } public int CachedTokens { get { throw null; } } + public Azure.AI.VoiceLive.CachedTokenDetails CachedTokensDetails { get { throw null; } } public int TextTokens { get { throw null; } } protected virtual Azure.AI.VoiceLive.InputTokenDetails 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) { } @@ -639,7 +656,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class LogProbProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LogProbProperties() { } - public System.Collections.Generic.IList Bytes { get { throw null; } } + public System.BinaryData Bytes { get { throw null; } } public float Logprob { get { throw null; } } public string Token { get { throw null; } } protected virtual Azure.AI.VoiceLive.LogProbProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -763,38 +780,6 @@ 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 RequestSession : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RequestSession() { } - public Azure.AI.VoiceLive.AnimationOptions Animation { get { throw null; } set { } } - public Azure.AI.VoiceLive.AvatarConfig Avatar { get { throw null; } set { } } - public Azure.AI.VoiceLive.InputAudio InputAudio { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioEchoCancellation InputAudioEchoCancellation { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioNoiseReduction InputAudioNoiseReduction { get { throw null; } set { } } - public int? InputAudioSamplingRate { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } set { } } - public string Instructions { get { throw null; } set { } } - public int? MaxResponseOutputTokens { get { throw null; } set { } } - public System.Collections.Generic.IList Modalities { get { throw null; } } - public string Model { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } set { } } - public System.Collections.Generic.IList OutputAudioTimestampTypes { get { throw null; } } - public float? Temperature { get { throw null; } set { } } - public string ToolChoice { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } } - public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } set { } } - public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } set { } } - protected virtual Azure.AI.VoiceLive.RequestSession 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.VoiceLive.RequestSession 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.VoiceLive.RequestSession 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.VoiceLive.RequestSession 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 RequestTextContentPart : Azure.AI.VoiceLive.VoiceLiveContentPart, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RequestTextContentPart() { } @@ -809,23 +794,23 @@ 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 RespondingAgentConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RespondingAgentOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal RespondingAgentConfig() { } - public string AgentId { get { throw null; } } - public string Description { get { throw null; } } - public string Name { get { throw null; } } - public string ThreadId { get { throw null; } } + public RespondingAgentOptions(string name, string agentId, string threadId) { } + public string AgentId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ThreadId { get { throw null; } set { } } public string Type { get { throw null; } } - protected virtual Azure.AI.VoiceLive.RespondingAgentConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.RespondingAgentOptions 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.VoiceLive.RespondingAgentConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.VoiceLive.RespondingAgentOptions 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.VoiceLive.RespondingAgentConfig 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.VoiceLive.RespondingAgentConfig 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.VoiceLive.RespondingAgentOptions 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.VoiceLive.RespondingAgentOptions 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 ResponseAudioContentPart : Azure.AI.VoiceLive.VoiceLiveContentPart, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -880,7 +865,7 @@ internal ResponseFunctionCallItem() { } public string Arguments { get { throw null; } } public string CallId { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.VoiceLive.ResponseItemStatus Status { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Status { get { throw null; } } protected override Azure.AI.VoiceLive.ResponseItem 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.VoiceLive.ResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -940,32 +925,26 @@ 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 ResponseItemStatus : System.IEquatable + public partial class ResponseMaxOutputTokensOption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResponseItemStatus(string value) { throw null; } - public static Azure.AI.VoiceLive.ResponseItemStatus Completed { get { throw null; } } - public static Azure.AI.VoiceLive.ResponseItemStatus Incomplete { get { throw null; } } - public static Azure.AI.VoiceLive.ResponseItemStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.VoiceLive.ResponseItemStatus 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.AI.VoiceLive.ResponseItemStatus left, Azure.AI.VoiceLive.ResponseItemStatus right) { throw null; } - public static implicit operator Azure.AI.VoiceLive.ResponseItemStatus (string value) { throw null; } - public static implicit operator Azure.AI.VoiceLive.ResponseItemStatus? (string value) { throw null; } - public static bool operator !=(Azure.AI.VoiceLive.ResponseItemStatus left, Azure.AI.VoiceLive.ResponseItemStatus right) { throw null; } - public override string ToString() { throw null; } + public ResponseMaxOutputTokensOption(int numberValue) { } + public int? NumericValue { get { throw null; } } + public static Azure.AI.VoiceLive.ResponseMaxOutputTokensOption CreateDefaultMaxTokensOption() { throw null; } + public static Azure.AI.VoiceLive.ResponseMaxOutputTokensOption CreateInfiniteMaxTokensOption() { throw null; } + public static Azure.AI.VoiceLive.ResponseMaxOutputTokensOption CreateNumericMaxTokensOption(int maxTokens) { throw null; } + public static implicit operator Azure.AI.VoiceLive.ResponseMaxOutputTokensOption (int maxTokens) { throw null; } + Azure.AI.VoiceLive.ResponseMaxOutputTokensOption 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.VoiceLive.ResponseMaxOutputTokensOption 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 ResponseMessageItem : Azure.AI.VoiceLive.ResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResponseMessageItem() { } public System.Collections.Generic.IList Content { get { throw null; } } public Azure.AI.VoiceLive.ResponseMessageRole Role { get { throw null; } } - public Azure.AI.VoiceLive.ResponseItemStatus Status { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Status { get { throw null; } } protected override Azure.AI.VoiceLive.ResponseItem 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.VoiceLive.ResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -996,45 +975,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.VoiceLive.ResponseMessageRole left, Azure.AI.VoiceLive.ResponseMessageRole right) { throw null; } public override string ToString() { throw null; } } - public enum ResponseOutputAudioFormat + public partial class ResponseSession { - Pcm16 = 0, - G711Ulaw = 1, - G711Alaw = 2, - } - public partial class ResponseSession : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ResponseSession() { } - public Azure.AI.VoiceLive.RespondingAgentConfig Agent { get { throw null; } } - public Azure.AI.VoiceLive.AnimationOptions Animation { get { throw null; } } - public Azure.AI.VoiceLive.AvatarConfig Avatar { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.VoiceLive.InputAudio InputAudio { get { throw null; } } - public Azure.AI.VoiceLive.AudioEchoCancellation InputAudioEchoCancellation { get { throw null; } } - public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } } - public Azure.AI.VoiceLive.AudioNoiseReduction InputAudioNoiseReduction { get { throw null; } } - public int? InputAudioSamplingRate { get { throw null; } } - public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } } - public string Instructions { get { throw null; } } - public System.BinaryData MaxResponseOutputTokens { get { throw null; } } - public System.Collections.Generic.IList Modalities { get { throw null; } } - public string Model { get { throw null; } } - public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } } - public System.Collections.Generic.IList OutputAudioTimestampTypes { get { throw null; } } - public float? Temperature { get { throw null; } } - public System.BinaryData ToolChoice { get { throw null; } } - public System.Collections.Generic.IList Tools { get { throw null; } } - public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } } + public ResponseSession() { } public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } } - protected virtual Azure.AI.VoiceLive.ResponseSession 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.VoiceLive.ResponseSession 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.VoiceLive.ResponseSession 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.VoiceLive.ResponseSession 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 abstract partial class ResponseStatusDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1081,24 +1025,6 @@ 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 ServerEventErrorError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ServerEventErrorError() { } - public string Code { get { throw null; } } - public string EventId { get { throw null; } } - public string Message { get { throw null; } } - public string Param { get { throw null; } } - public string Type { get { throw null; } } - protected virtual Azure.AI.VoiceLive.ServerEventErrorError 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.VoiceLive.ServerEventErrorError 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.VoiceLive.ServerEventErrorError 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.VoiceLive.ServerEventErrorError 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 ServerVad : Azure.AI.VoiceLive.TurnDetection, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServerVad() { } @@ -1117,29 +1043,6 @@ 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 SessionOptions - { - public SessionOptions() { } - public System.Collections.Generic.IList CustomVocabulary { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioEchoCancellation EchoCancellation { get { throw null; } set { } } - public bool IncludeConfidenceScores { get { throw null; } set { } } - public bool IncludeTimestamps { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } set { } } - public string Instructions { get { throw null; } set { } } - public string Language { get { throw null; } set { } } - public int? MaxResponseOutputTokens { get { throw null; } set { } } - public System.Collections.Generic.IList Modalities { get { throw null; } set { } } - public string Model { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioNoiseReduction NoiseReduction { get { throw null; } set { } } - public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } set { } } - public bool ParallelToolCalls { get { throw null; } set { } } - public float? Temperature { get { throw null; } set { } } - public string ToolChoice { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } set { } } - public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } set { } } - public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } set { } } - } public abstract partial class SessionUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdate() { } @@ -1268,7 +1171,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateError : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateError() { } - public Azure.AI.VoiceLive.ServerEventErrorError Error { get { throw null; } } + public Azure.AI.VoiceLive.SessionUpdateErrorDetails Error { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1279,6 +1182,24 @@ 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 SessionUpdateErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SessionUpdateErrorDetails() { } + public string Code { get { throw null; } } + public string EventId { get { throw null; } } + public string Message { get { throw null; } } + public string Param { get { throw null; } } + public string Type { get { throw null; } } + protected virtual Azure.AI.VoiceLive.SessionUpdateErrorDetails 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.VoiceLive.SessionUpdateErrorDetails 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.VoiceLive.SessionUpdateErrorDetails 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.VoiceLive.SessionUpdateErrorDetails 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 SessionUpdateInputAudioBufferCleared : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateInputAudioBufferCleared() { } @@ -1310,7 +1231,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateInputAudioBufferSpeechStarted : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateInputAudioBufferSpeechStarted() { } - public int AudioStartMs { get { throw null; } } + public System.TimeSpan AudioStart { get { throw null; } } public string ItemId { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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) { } @@ -1325,6 +1246,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateInputAudioBufferSpeechStopped : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateInputAudioBufferSpeechStopped() { } + public System.TimeSpan AudioEnd { get { throw null; } } public int AudioEndMs { get { throw null; } } public string ItemId { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1406,7 +1328,6 @@ internal SessionUpdateResponseAnimationVisemeDone() { } public string ResponseId { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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) { } - public static explicit operator Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDone (Azure.Response result) { throw null; } protected override Azure.AI.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDone System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1420,7 +1341,6 @@ public partial class SessionUpdateResponseAudioDelta : Azure.AI.VoiceLive.Sessio internal SessionUpdateResponseAudioDelta() { } public int ContentIndex { get { throw null; } } public System.BinaryData Delta { get { throw null; } } - public override string EventId { get { throw null; } } public string ItemId { get { throw null; } } public int OutputIndex { get { throw null; } } public string ResponseId { get { throw null; } } @@ -1730,7 +1650,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateSessionCreated : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateSessionCreated() { } - public Azure.AI.VoiceLive.ResponseSession Session { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveSessionResponse Session { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1744,7 +1664,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SessionUpdateSessionUpdated : Azure.AI.VoiceLive.SessionUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SessionUpdateSessionUpdated() { } - public Azure.AI.VoiceLive.ResponseSession Session { get { throw null; } } + public Azure.AI.VoiceLive.VoiceLiveSessionResponse Session { get { throw null; } } protected override Azure.AI.VoiceLive.SessionUpdate 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.VoiceLive.SessionUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1769,34 +1689,6 @@ 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 ToolChoiceFunctionObject : Azure.AI.VoiceLive.ToolChoiceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolChoiceFunctionObject(Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction function) { } - public Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction Function { get { throw null; } set { } } - protected override Azure.AI.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.VoiceLive.ToolChoiceFunctionObject 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.VoiceLive.ToolChoiceFunctionObject 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 ToolChoiceFunctionObjectFunction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolChoiceFunctionObjectFunction(string name) { } - public string Name { get { throw null; } set { } } - protected virtual Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction 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.VoiceLive.ToolChoiceFunctionObjectFunction 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.VoiceLive.ToolChoiceFunctionObjectFunction 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.VoiceLive.ToolChoiceFunctionObjectFunction 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 ToolChoiceLiteral : System.IEquatable { @@ -1817,18 +1709,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.VoiceLive.ToolChoiceLiteral left, Azure.AI.VoiceLive.ToolChoiceLiteral right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class ToolChoiceObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ToolChoiceOption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ToolChoiceObject() { } - protected virtual Azure.AI.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject 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.VoiceLive.ToolChoiceObject 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 ToolChoiceOption(Azure.AI.VoiceLive.ToolChoiceLiteral toolChoiceLiteral) { } + public ToolChoiceOption(string stringValue) { } + public string FunctionName { get { throw null; } } + public Azure.AI.VoiceLive.ToolChoiceLiteral? ToolCallConstraint { get { throw null; } } + public static implicit operator Azure.AI.VoiceLive.ToolChoiceOption (Azure.AI.VoiceLive.ToolChoiceLiteral literal) { throw null; } + public static implicit operator Azure.AI.VoiceLive.ToolChoiceOption (string name) { throw null; } + Azure.AI.VoiceLive.ToolChoiceOption 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.VoiceLive.ToolChoiceOption 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 abstract partial class TurnDetection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1926,9 +1819,9 @@ public VoiceLiveClient(System.Uri endpoint, Azure.AzureKeyCredential credential, public VoiceLiveClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } public VoiceLiveClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.VoiceLive.VoiceLiveClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.AI.VoiceLive.VoiceLiveSession StartSession(Azure.AI.VoiceLive.RequestSession sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AI.VoiceLive.VoiceLiveSession StartSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AI.VoiceLive.VoiceLiveSession StartSession(string model, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartSessionAsync(Azure.AI.VoiceLive.RequestSession sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartSessionAsync(string model, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class VoiceLiveClientOptions : Azure.Core.ClientOptions @@ -1991,9 +1884,9 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.AnimationOptions AnimationOptions(string modelName = null, System.Collections.Generic.IEnumerable outputs = null, int? emotionDetectionIntervalMs = default(int?)) { throw null; } public static Azure.AI.VoiceLive.AssistantMessageItem AssistantMessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?), System.Collections.Generic.IEnumerable content = null) { throw null; } public static Azure.AI.VoiceLive.AudioEchoCancellation AudioEchoCancellation(string type = null) { throw null; } - public static Azure.AI.VoiceLive.AudioInputTranscriptionSettings AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model = default(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel), string language = null, bool enabled = false, bool customModel = false) { throw null; } + public static Azure.AI.VoiceLive.AudioInputTranscriptionSettings AudioInputTranscriptionSettings(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel model = default(Azure.AI.VoiceLive.AudioInputTranscriptionSettingsModel), string language = null, System.Collections.Generic.IDictionary customSpeech = null, System.Collections.Generic.IEnumerable phraseList = null) { throw null; } public static Azure.AI.VoiceLive.AudioNoiseReduction AudioNoiseReduction(string type = null) { throw null; } - public static Azure.AI.VoiceLive.AvatarConfig AvatarConfig(System.Collections.Generic.IEnumerable iceServers = null, string character = null, string style = null, bool customized = false, Azure.AI.VoiceLive.VideoParams video = null) { throw null; } + public static Azure.AI.VoiceLive.AvatarConfiguration AvatarConfiguration(System.Collections.Generic.IEnumerable iceServers = null, string character = null, string style = null, bool customized = false, Azure.AI.VoiceLive.VideoParams video = null) { throw null; } public static Azure.AI.VoiceLive.AzureCustomVoice AzureCustomVoice(string name = null, string endpointId = null, float? temperature = default(float?), string customLexiconUri = null, System.Collections.Generic.IEnumerable preferLocales = null, string locale = null, string style = null, string pitch = null, string rate = null, string volume = null) { throw null; } public static Azure.AI.VoiceLive.AzureMultilingualSemanticVad AzureMultilingualSemanticVad(float? threshold = default(float?), int? prefixPaddingMs = default(int?), int? silenceDurationMs = default(int?), Azure.AI.VoiceLive.EouDetection endOfUtteranceDetection = null, float? negThreshold = default(float?), int? speechDurationMs = default(int?), int? windowSize = default(int?), int? distinctCiPhones = default(int?), bool? requireVowel = default(bool?), bool? removeFillerWords = default(bool?), System.Collections.Generic.IEnumerable languages = null, bool? autoTruncate = default(bool?)) { throw null; } public static Azure.AI.VoiceLive.AzurePersonalVoice AzurePersonalVoice(string name = null, float? temperature = default(float?), Azure.AI.VoiceLive.AzurePersonalVoiceModel model = Azure.AI.VoiceLive.AzurePersonalVoiceModel.DragonLatestNeural) { throw null; } @@ -2006,6 +1899,7 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.AzureSemanticVadServer AzureSemanticVadServer(float? threshold = default(float?), int? prefixPaddingMs = default(int?), int? silenceDurationMs = default(int?), Azure.AI.VoiceLive.EouDetection endOfUtteranceDetection = null, float? negThreshold = default(float?), int? speechDurationMs = default(int?), int? windowSize = default(int?), int? distinctCiPhones = default(int?), bool? requireVowel = default(bool?), bool? removeFillerWords = default(bool?), System.Collections.Generic.IEnumerable languages = null, bool? autoTruncate = default(bool?)) { throw null; } public static Azure.AI.VoiceLive.AzureStandardVoice AzureStandardVoice(string name = null, float? temperature = default(float?), string customLexiconUrl = null, System.Collections.Generic.IEnumerable preferLocales = null, string locale = null, string style = null, string pitch = null, string rate = null, string volume = null) { throw null; } public static Azure.AI.VoiceLive.AzureVoice AzureVoice(string type = null) { throw null; } + public static Azure.AI.VoiceLive.CachedTokenDetails CachedTokenDetails(int textTokens = 0, int audioTokens = 0) { throw null; } public static Azure.AI.VoiceLive.ConversationRequestItem ConversationRequestItem(string type = null, string id = null) { throw null; } public static Azure.AI.VoiceLive.EmotionCandidate EmotionCandidate(string emotion = null, float confidence = 0f) { throw null; } public static Azure.AI.VoiceLive.EouDetection EouDetection(string model = null) { throw null; } @@ -2015,31 +1909,28 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.InputAudio InputAudio(string model = null, System.Collections.Generic.IEnumerable phraseList = null) { throw null; } public static Azure.AI.VoiceLive.InputAudioContentPart InputAudioContentPart(string audio = null, string transcript = null) { throw null; } public static Azure.AI.VoiceLive.InputTextContentPart InputTextContentPart(string text = null) { throw null; } - public static Azure.AI.VoiceLive.InputTokenDetails InputTokenDetails(int cachedTokens = 0, int textTokens = 0, int audioTokens = 0) { throw null; } + public static Azure.AI.VoiceLive.InputTokenDetails InputTokenDetails(int cachedTokens = 0, int textTokens = 0, int audioTokens = 0, Azure.AI.VoiceLive.CachedTokenDetails cachedTokensDetails = null) { throw null; } public static Azure.AI.VoiceLive.LlmVoice LlmVoice(string type = null, Azure.AI.VoiceLive.LlmVoiceName name = default(Azure.AI.VoiceLive.LlmVoiceName)) { throw null; } - public static Azure.AI.VoiceLive.LogProbProperties LogProbProperties(string token = null, float logprob = 0f, System.Collections.Generic.IEnumerable bytes = null) { throw null; } + public static Azure.AI.VoiceLive.LogProbProperties LogProbProperties(string token = null, float logprob = 0f, System.BinaryData bytes = null) { throw null; } public static Azure.AI.VoiceLive.MessageItem MessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?)) { throw null; } public static Azure.AI.VoiceLive.NoTurnDetection NoTurnDetection() { throw null; } public static Azure.AI.VoiceLive.OpenAIVoice OpenAIVoice(string type = null, Azure.AI.VoiceLive.OAIVoice name = default(Azure.AI.VoiceLive.OAIVoice)) { throw null; } public static Azure.AI.VoiceLive.OutputTextContentPart OutputTextContentPart(string type = null, string text = null) { throw null; } public static Azure.AI.VoiceLive.OutputTokenDetails OutputTokenDetails(int textTokens = 0, int audioTokens = 0) { throw null; } public static Azure.AI.VoiceLive.RequestAudioContentPart RequestAudioContentPart(string transcript = null) { throw null; } - public static Azure.AI.VoiceLive.RequestSession RequestSession(string model = null, System.Collections.Generic.IEnumerable modalities = null, Azure.AI.VoiceLive.AnimationOptions animation = null, string instructions = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfig avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, float? temperature = default(float?), System.BinaryData serviceVoice = null, System.BinaryData maxResponseOutputTokens = null, System.BinaryData toolChoice = null) { throw null; } public static Azure.AI.VoiceLive.RequestTextContentPart RequestTextContentPart(string text = null) { throw null; } - public static Azure.AI.VoiceLive.RespondingAgentConfig RespondingAgentConfig(string type = null, string name = null, string description = null, string agentId = null, string threadId = null) { throw null; } + public static Azure.AI.VoiceLive.RespondingAgentOptions RespondingAgentOptions(string type = null, string name = null, string description = null, string agentId = null, string threadId = null) { throw null; } public static Azure.AI.VoiceLive.ResponseAudioContentPart ResponseAudioContentPart(string transcript = null) { throw null; } public static Azure.AI.VoiceLive.ResponseCancelledDetails ResponseCancelledDetails(Azure.AI.VoiceLive.ResponseCancelledDetailsReason reason = Azure.AI.VoiceLive.ResponseCancelledDetailsReason.TurnDetected) { throw null; } public static Azure.AI.VoiceLive.ResponseFailedDetails ResponseFailedDetails(System.BinaryData error = null) { throw null; } - public static Azure.AI.VoiceLive.ResponseFunctionCallItem ResponseFunctionCallItem(string id = null, string @object = null, string name = null, string callId = null, string arguments = null, Azure.AI.VoiceLive.ResponseItemStatus status = default(Azure.AI.VoiceLive.ResponseItemStatus)) { throw null; } + public static Azure.AI.VoiceLive.ResponseFunctionCallItem ResponseFunctionCallItem(string id = null, string @object = null, string name = null, string callId = null, string arguments = null, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus status = default(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus)) { throw null; } public static Azure.AI.VoiceLive.ResponseFunctionCallOutputItem ResponseFunctionCallOutputItem(string id = null, string @object = null, string callId = null, string output = null) { throw null; } public static Azure.AI.VoiceLive.ResponseIncompleteDetails ResponseIncompleteDetails(Azure.AI.VoiceLive.ResponseIncompleteDetailsReason reason = Azure.AI.VoiceLive.ResponseIncompleteDetailsReason.MaxOutputTokens) { throw null; } public static Azure.AI.VoiceLive.ResponseItem ResponseItem(string type = null, string id = null, string @object = null) { throw null; } - public static Azure.AI.VoiceLive.ResponseMessageItem ResponseMessageItem(string id = null, string @object = null, Azure.AI.VoiceLive.ResponseMessageRole role = default(Azure.AI.VoiceLive.ResponseMessageRole), System.Collections.Generic.IEnumerable content = null, Azure.AI.VoiceLive.ResponseItemStatus status = default(Azure.AI.VoiceLive.ResponseItemStatus)) { throw null; } - public static Azure.AI.VoiceLive.ResponseSession ResponseSession(string id = null, string model = null, System.Collections.Generic.IEnumerable modalities = null, string instructions = null, Azure.AI.VoiceLive.AnimationOptions animation = null, System.BinaryData voiceInternal = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfig avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, System.BinaryData toolChoice = null, float? temperature = default(float?), System.BinaryData maxResponseOutputTokens = null, Azure.AI.VoiceLive.RespondingAgentConfig agent = null) { throw null; } + public static Azure.AI.VoiceLive.ResponseMessageItem ResponseMessageItem(string id = null, string @object = null, Azure.AI.VoiceLive.ResponseMessageRole role = default(Azure.AI.VoiceLive.ResponseMessageRole), System.Collections.Generic.IEnumerable content = null, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus status = default(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus)) { throw null; } public static Azure.AI.VoiceLive.ResponseStatusDetails ResponseStatusDetails(string type = null) { throw null; } public static Azure.AI.VoiceLive.ResponseTextContentPart ResponseTextContentPart(string text = null) { throw null; } public static Azure.AI.VoiceLive.ResponseTokenStatistics ResponseTokenStatistics(int totalTokens = 0, int inputTokens = 0, int outputTokens = 0, Azure.AI.VoiceLive.InputTokenDetails inputTokenDetails = null, Azure.AI.VoiceLive.OutputTokenDetails outputTokenDetails = null) { throw null; } - public static Azure.AI.VoiceLive.ServerEventErrorError ServerEventErrorError(string type = null, string code = null, string message = null, string param = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.ServerVad ServerVad(float? threshold = default(float?), int? prefixPaddingMs = default(int?), int? silenceDurationMs = default(int?), Azure.AI.VoiceLive.EouDetection endOfUtteranceDetection = null, bool? autoTruncate = default(bool?)) { throw null; } public static Azure.AI.VoiceLive.SessionUpdate SessionUpdate(string type = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateConversationItemCreated SessionUpdateConversationItemCreated(string eventId = null, string previousItemId = null, Azure.AI.VoiceLive.ResponseItem item = null) { throw null; } @@ -2049,7 +1940,8 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.SessionUpdateConversationItemInputAudioTranscriptionFailed SessionUpdateConversationItemInputAudioTranscriptionFailed(string eventId = null, string itemId = null, int contentIndex = 0, Azure.AI.VoiceLive.VoiceLiveErrorDetails error = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateConversationItemRetrieved SessionUpdateConversationItemRetrieved(Azure.AI.VoiceLive.ResponseItem item = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateConversationItemTruncated SessionUpdateConversationItemTruncated(string itemId = null, int contentIndex = 0, int audioEndMs = 0, string eventId = null) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateError SessionUpdateError(string eventId = null, Azure.AI.VoiceLive.ServerEventErrorError error = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateError SessionUpdateError(string eventId = null, Azure.AI.VoiceLive.SessionUpdateErrorDetails error = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateErrorDetails SessionUpdateErrorDetails(string type = null, string code = null, string message = null, string param = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateInputAudioBufferCleared SessionUpdateInputAudioBufferCleared(string eventId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateInputAudioBufferCommitted SessionUpdateInputAudioBufferCommitted(string eventId = null, string previousItemId = null, string itemId = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateInputAudioBufferSpeechStarted SessionUpdateInputAudioBufferSpeechStarted(string eventId = null, int audioStartMs = 0, string itemId = null) { throw null; } @@ -2058,7 +1950,7 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.SessionUpdateResponseAnimationBlendshapeDone SessionUpdateResponseAnimationBlendshapeDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDelta SessionUpdateResponseAnimationVisemeDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, int audioOffsetMs = 0, int visemeId = 0) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAnimationVisemeDone SessionUpdateResponseAnimationVisemeDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateResponseAudioDelta SessionUpdateResponseAudioDelta(string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, System.BinaryData delta = null, string eventId = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateResponseAudioDelta SessionUpdateResponseAudioDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, System.BinaryData delta = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAudioDone SessionUpdateResponseAudioDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAudioTimestampDelta SessionUpdateResponseAudioTimestampDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, int audioOffsetMs = 0, int audioDurationMs = 0, string text = null, string timestampType = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseAudioTimestampDone SessionUpdateResponseAudioTimestampDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0) { throw null; } @@ -2076,12 +1968,9 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.SessionUpdateResponseTextDelta SessionUpdateResponseTextDelta(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, string delta = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateResponseTextDone SessionUpdateResponseTextDone(string eventId = null, string responseId = null, string itemId = null, int outputIndex = 0, int contentIndex = 0, string text = null) { throw null; } public static Azure.AI.VoiceLive.SessionUpdateSessionAvatarConnecting SessionUpdateSessionAvatarConnecting(string eventId = null, string serverSdp = null) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateSessionCreated SessionUpdateSessionCreated(string eventId = null, Azure.AI.VoiceLive.ResponseSession session = null) { throw null; } - public static Azure.AI.VoiceLive.SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eventId = null, Azure.AI.VoiceLive.ResponseSession session = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateSessionCreated SessionUpdateSessionCreated(string eventId = null, Azure.AI.VoiceLive.VoiceLiveSessionResponse session = null) { throw null; } + public static Azure.AI.VoiceLive.SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eventId = null, Azure.AI.VoiceLive.VoiceLiveSessionResponse session = null) { throw null; } public static Azure.AI.VoiceLive.SystemMessageItem SystemMessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?), System.Collections.Generic.IEnumerable content = null) { throw null; } - public static Azure.AI.VoiceLive.ToolChoiceFunctionObject ToolChoiceFunctionObject(Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction function = null) { throw null; } - public static Azure.AI.VoiceLive.ToolChoiceFunctionObjectFunction ToolChoiceFunctionObjectFunction(string name = null) { throw null; } - public static Azure.AI.VoiceLive.ToolChoiceObject ToolChoiceObject(string type = null) { throw null; } public static Azure.AI.VoiceLive.TurnDetection TurnDetection(string type = null) { throw null; } public static Azure.AI.VoiceLive.UserContentPart UserContentPart(string type = null) { throw null; } public static Azure.AI.VoiceLive.UserMessageItem UserMessageItem(string id = null, Azure.AI.VoiceLive.ItemParamStatus? status = default(Azure.AI.VoiceLive.ItemParamStatus?), System.Collections.Generic.IEnumerable content = null) { throw null; } @@ -2091,6 +1980,8 @@ public static partial class VoiceLiveModelFactory public static Azure.AI.VoiceLive.VoiceLiveContentPart VoiceLiveContentPart(string type = null) { throw null; } public static Azure.AI.VoiceLive.VoiceLiveErrorDetails VoiceLiveErrorDetails(string code = null, string message = null, string param = null, string type = null, string eventId = null) { throw null; } public static Azure.AI.VoiceLive.VoiceLiveFunctionDefinition VoiceLiveFunctionDefinition(string name = null, string description = null, System.BinaryData parameters = null) { throw null; } + public static Azure.AI.VoiceLive.VoiceLiveSessionOptions VoiceLiveSessionOptions(string model = null, System.Collections.Generic.IEnumerable modalities = null, Azure.AI.VoiceLive.AnimationOptions animation = null, string instructions = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfiguration avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, float? temperature = default(float?), Azure.AI.VoiceLive.RespondingAgentOptions agent = null, System.BinaryData voiceInternal = null, System.BinaryData maxResponseOutputTokens = null, System.BinaryData toolChoice = null) { throw null; } + public static Azure.AI.VoiceLive.VoiceLiveSessionResponse VoiceLiveSessionResponse(string model = null, System.Collections.Generic.IEnumerable modalities = null, Azure.AI.VoiceLive.AnimationOptions animation = null, string instructions = null, Azure.AI.VoiceLive.InputAudio inputAudio = null, int? inputAudioSamplingRate = default(int?), Azure.AI.VoiceLive.AudioFormat? inputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.AudioFormat? outputAudioFormat = default(Azure.AI.VoiceLive.AudioFormat?), Azure.AI.VoiceLive.TurnDetection turnDetection = null, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = null, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = null, Azure.AI.VoiceLive.AvatarConfiguration avatar = null, Azure.AI.VoiceLive.AudioInputTranscriptionSettings inputAudioTranscription = null, System.Collections.Generic.IEnumerable outputAudioTimestampTypes = null, System.Collections.Generic.IEnumerable tools = null, float? temperature = default(float?), Azure.AI.VoiceLive.RespondingAgentOptions agent = null, System.BinaryData voiceInternal = null, System.BinaryData maxResponseOutputTokens = null, System.BinaryData toolChoice = null, string id = null) { throw null; } public static Azure.AI.VoiceLive.VoiceLiveToolDefinition VoiceLiveToolDefinition(string type = null) { throw null; } } public partial class VoiceLiveResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -2098,11 +1989,11 @@ public partial class VoiceLiveResponse : System.ClientModel.Primitives.IJsonMode internal VoiceLiveResponse() { } public string ConversationId { get { throw null; } } public string Id { get { throw null; } } - public System.BinaryData MaxOutputTokens { get { throw null; } } + public Azure.AI.VoiceLive.ResponseMaxOutputTokensOption MaxOutputTokens { get { throw null; } } public Azure.AI.VoiceLive.SessionUpdateModality Modalities { get { throw null; } } public string Object { get { throw null; } } public System.Collections.Generic.IList Output { get { throw null; } } - public Azure.AI.VoiceLive.ResponseOutputAudioFormat? OutputAudioFormat { get { throw null; } } + public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } } public Azure.AI.VoiceLive.VoiceLiveResponseStatus? Status { get { throw null; } } public Azure.AI.VoiceLive.ResponseStatusDetails StatusDetails { get { throw null; } } public float? Temperature { get { throw null; } } @@ -2118,6 +2009,26 @@ 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 VoiceLiveResponseItemStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VoiceLiveResponseItemStatus(string value) { throw null; } + public static Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Completed { get { throw null; } } + public static Azure.AI.VoiceLive.VoiceLiveResponseItemStatus Incomplete { get { throw null; } } + public static Azure.AI.VoiceLive.VoiceLiveResponseItemStatus InProgress { get { throw null; } } + public bool Equals(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus 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.AI.VoiceLive.VoiceLiveResponseItemStatus left, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus right) { throw null; } + public static implicit operator Azure.AI.VoiceLive.VoiceLiveResponseItemStatus (string value) { throw null; } + public static implicit operator Azure.AI.VoiceLive.VoiceLiveResponseItemStatus? (string value) { throw null; } + public static bool operator !=(Azure.AI.VoiceLive.VoiceLiveResponseItemStatus left, Azure.AI.VoiceLive.VoiceLiveResponseItemStatus right) { throw null; } + public override string ToString() { throw null; } + } public enum VoiceLiveResponseStatus { Completed = 0, @@ -2153,12 +2064,12 @@ protected internal VoiceLiveSession(Azure.AI.VoiceLive.VoiceLiveClient parentCli public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual void CommitInputAudio(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } public virtual System.Threading.Tasks.Task CommitInputAudioAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual void ConfigureConversationSession(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } - public virtual System.Threading.Tasks.Task ConfigureConversationSessionAsync(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual void ConfigureSession(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } - public virtual System.Threading.Tasks.Task ConfigureSessionAsync(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual void ConfigureTranscriptionSession(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } - public virtual System.Threading.Tasks.Task ConfigureTranscriptionSessionAsync(Azure.AI.VoiceLive.SessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void ConfigureConversationSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task ConfigureConversationSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void ConfigureSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task ConfigureSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void ConfigureTranscriptionSession(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task ConfigureTranscriptionSessionAsync(Azure.AI.VoiceLive.VoiceLiveSessionOptions sessionOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } protected internal virtual void Connect(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } protected internal virtual System.Threading.Tasks.Task ConnectAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual void ConnectAvatar(string clientSdp, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } @@ -2199,19 +2110,52 @@ protected virtual void Dispose(bool disposing) { } public virtual System.Threading.Tasks.Task TruncateConversationAsync(string itemId, int contentIndex, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public System.Threading.Tasks.Task WaitForUpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : Azure.AI.VoiceLive.SessionUpdate { throw null; } } - public partial class VoiceLiveSessionOptions + public partial class VoiceLiveSessionOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VoiceLiveSessionOptions() { } - public bool? CancelPrevious { get { throw null; } set { } } - public bool? Commit { get { throw null; } set { } } + public Azure.AI.VoiceLive.RespondingAgentOptions Agent { get { throw null; } set { } } + public Azure.AI.VoiceLive.AnimationOptions Animation { get { throw null; } set { } } + public Azure.AI.VoiceLive.AvatarConfiguration Avatar { get { throw null; } set { } } + public Azure.AI.VoiceLive.InputAudio InputAudio { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioEchoCancellation InputAudioEchoCancellation { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioFormat? InputAudioFormat { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioNoiseReduction InputAudioNoiseReduction { get { throw null; } set { } } + public int? InputAudioSamplingRate { get { throw null; } set { } } + public Azure.AI.VoiceLive.AudioInputTranscriptionSettings InputAudioTranscription { get { throw null; } set { } } public string Instructions { get { throw null; } set { } } - public int? MaxOutputTokens { get { throw null; } set { } } - public System.Collections.Generic.IList Modalities { get { throw null; } set { } } + public Azure.AI.VoiceLive.ResponseMaxOutputTokensOption MaxResponseOutputTokens { get { throw null; } set { } } + public System.Collections.Generic.IList Modalities { get { throw null; } } + public string Model { get { throw null; } set { } } public Azure.AI.VoiceLive.AudioFormat? OutputAudioFormat { get { throw null; } set { } } + public System.Collections.Generic.IList OutputAudioTimestampTypes { get { throw null; } } public float? Temperature { get { throw null; } set { } } - public string ToolChoice { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } set { } } + public Azure.AI.VoiceLive.ToolChoiceOption ToolChoice { get { throw null; } set { } } + public System.Collections.Generic.IList Tools { get { throw null; } } + public Azure.AI.VoiceLive.TurnDetection TurnDetection { get { throw null; } set { } } public Azure.AI.VoiceLive.VoiceProvider Voice { get { throw null; } set { } } + protected virtual Azure.AI.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions 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 VoiceLiveSessionResponse : Azure.AI.VoiceLive.VoiceLiveSessionOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VoiceLiveSessionResponse() { } + public string Id { get { throw null; } } + protected override Azure.AI.VoiceLive.VoiceLiveSessionOptions 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.VoiceLive.VoiceLiveSessionOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.VoiceLive.VoiceLiveSessionResponse 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.VoiceLive.VoiceLiveSessionResponse 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 abstract partial class VoiceLiveToolDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.cs b/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.cs index dba4575d1470..72ea927376af 100644 --- a/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.cs +++ b/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.cs @@ -131,9 +131,9 @@ private async Task SetupSessionAsync(CancellationToken cancellationToken) }; // Create conversation session options - var sessionOptions = new SessionOptions + var sessionOptions = new VoiceLiveSessionOptions { - EchoCancellation = new AudioEchoCancellation(), + InputAudioEchoCancellation = new AudioEchoCancellation(), Model = _model, Instructions = _instructions, Voice = azureVoice, diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.cs b/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.cs index bb40044026e7..7533383430fd 100644 --- a/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.cs +++ b/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.cs @@ -134,7 +134,7 @@ private async Task SetupSessionAsync(CancellationToken cancellationToken) }; // Create conversation session options with function tools - var sessionOptions = new SessionOptions + var sessionOptions = new VoiceLiveSessionOptions { Model = _model, Instructions = _instructions, diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/snippets/BasicUsageSnippets.cs b/sdk/ai/Azure.AI.VoiceLive/samples/snippets/BasicUsageSnippets.cs index 0f5e60755568..af6d7a6b33f6 100644 --- a/sdk/ai/Azure.AI.VoiceLive/samples/snippets/BasicUsageSnippets.cs +++ b/sdk/ai/Azure.AI.VoiceLive/samples/snippets/BasicUsageSnippets.cs @@ -30,7 +30,7 @@ public async Task BasicVoiceAssistantExample() VoiceLiveSession session = await client.StartSessionAsync(model).ConfigureAwait(false); // Configure session for voice conversation - SessionOptions sessionOptions = new SessionOptions() + VoiceLiveSessionOptions sessionOptions = new() { Model = model, Instructions = "You are a helpful AI assistant. Respond naturally and conversationally.", @@ -84,7 +84,7 @@ public async Task AdvancedVoiceConfiguration() VoiceLiveSession session = await client.StartSessionAsync(model).ConfigureAwait(false); #region Snippet:AdvancedVoiceConfiguration - SessionOptions sessionOptions = new SessionOptions() + VoiceLiveSessionOptions sessionOptions = new() { Model = model, Instructions = "You are a customer service representative. Be helpful and professional.", @@ -143,7 +143,7 @@ public async Task FunctionCallingExample() """) }; - SessionOptions sessionOptions = new SessionOptions() + VoiceLiveSessionOptions sessionOptions = new() { Model = model, Instructions = "You are a weather assistant. Use the get_current_weather function to help users with weather information.", diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj b/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj index 48d9e792b9c0..b7e507ee0af5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj +++ b/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj @@ -17,7 +17,7 @@ See https://aka.ms/voicelivesdk-net for more inforamtion. Microsoft Azure.AI.VoiceLive client library - 1.0.0-beta.1 + 1.0.0-beta.2 Azure.AI.VoiceLive $(RequiredTargetFrameworks) true diff --git a/sdk/ai/Azure.AI.VoiceLive/src/AzureCustomVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzureCustomVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/AzureCustomVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzureCustomVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/AzurePersonalVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzurePersonalVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/AzurePersonalVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzurePersonalVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/AzurePlatformVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzurePlatformVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/AzurePlatformVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzurePlatformVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/AzureStandardVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzureStandardVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/AzureStandardVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzureStandardVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/AzureVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzureVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/AzureVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/AzureVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/LLMVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/LLMVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/LLMVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/LLMVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/LogProbProperties.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/LogProbProperties.cs new file mode 100644 index 000000000000..c88f85e0b1ab --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/LogProbProperties.cs @@ -0,0 +1,19 @@ +// 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.AI.VoiceLive +{ + /// A single log probability entry for a token. + public partial class LogProbProperties + { + /// The bytes that were used to generate the log probability. + [CodeGenMember("Bytes")] + public BinaryData Bytes { get; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/OpenAIVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/OpenAIVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/OpenAIVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/OpenAIVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseMaxOutputTokenOption.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseMaxOutputTokenOption.Serialization.cs new file mode 100644 index 000000000000..acd740109876 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseMaxOutputTokenOption.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.VoiceLive +{ + /// + /// + /// + public partial class ResponseMaxOutputTokensOption : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + => SerializeConversationMaxTokensChoice(this, writer, options); + + ResponseMaxOutputTokensOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationMaxTokensChoice(document.RootElement, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + return ModelReaderWriter.Write(this, options, null); + } + + ResponseMaxOutputTokensOption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + => FromBinaryData(data); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + internal static void SerializeConversationMaxTokensChoice(ResponseMaxOutputTokensOption instance, Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + if (instance._isDefaultNullValue == true) + { + writer.WriteNullValue(); + } + else if (instance._stringValue is not null) + { + writer.WriteStringValue(instance._stringValue); + } + else if (instance.NumericValue.HasValue) + { + writer.WriteNumberValue(instance.NumericValue.Value); + } + } + + internal static ResponseMaxOutputTokensOption DeserializeConversationMaxTokensChoice(JsonElement element, ModelReaderWriterOptions options = null) + { + if (element.ValueKind == JsonValueKind.Null) + { + return new ResponseMaxOutputTokensOption(isDefaultNullValue: true); + } + if (element.ValueKind == JsonValueKind.String) + { + return new ResponseMaxOutputTokensOption(stringValue: element.GetString()); + } + if (element.ValueKind == JsonValueKind.Number) + { + return new ResponseMaxOutputTokensOption(numberValue: element.GetInt32()); + } + return null; + } + + internal static ResponseMaxOutputTokensOption FromBinaryData(BinaryData bytes) + { + if (bytes is null) + { + return new ResponseMaxOutputTokensOption(isDefaultNullValue: true); + } + using JsonDocument document = JsonDocument.Parse(bytes); + return DeserializeConversationMaxTokensChoice(document.RootElement); + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseMaxOutputTokensOption.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseMaxOutputTokensOption.cs new file mode 100644 index 000000000000..e1b6b8bda14e --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseMaxOutputTokensOption.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.VoiceLive +{ + /// + /// Represents the maximum number of tokens that may be generated in a response. + /// + public partial class ResponseMaxOutputTokensOption + { + /// + /// The numeric equivlant for the number of tokens. + /// + public int? NumericValue { get; } + private readonly bool? _isDefaultNullValue; + private readonly string _stringValue; + + /// + /// Creates an options class with infinite tokens possible. + /// + /// + public static ResponseMaxOutputTokensOption CreateInfiniteMaxTokensOption() + => new("inf"); + /// + /// Creates an options class with the default number of possible tokens. + /// + /// + public static ResponseMaxOutputTokensOption CreateDefaultMaxTokensOption() + => new(isDefaultNullValue: true); + /// + /// Creates an options class with a fixed number of tokens. + /// + /// + /// + public static ResponseMaxOutputTokensOption CreateNumericMaxTokensOption(int maxTokens) + => new(numberValue: maxTokens); + /// + /// Creates an options class with a fixed number of tokens. + /// + /// + public ResponseMaxOutputTokensOption(int numberValue) + { + NumericValue = numberValue; + } + + internal ResponseMaxOutputTokensOption(string stringValue) + { + _stringValue = stringValue; + } + + internal ResponseMaxOutputTokensOption(bool isDefaultNullValue) + { + _isDefaultNullValue = true; + } + + internal ResponseMaxOutputTokensOption() { } + + /// + /// Creates a ResponseMaxOutputTokensOptions class from an integer value. + /// + /// + public static implicit operator ResponseMaxOutputTokensOption(int maxTokens) + => CreateNumericMaxTokensOption(maxTokens); + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/ResponseSession.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseSession.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/ResponseSession.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/ResponseSession.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateInputAudioBufferSpeechStarted.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateInputAudioBufferSpeechStarted.cs new file mode 100644 index 000000000000..c91baa32d548 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateInputAudioBufferSpeechStarted.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// The SessionUpdateInputAudioBufferSpeechStopped. + public partial class SessionUpdateInputAudioBufferSpeechStopped + { + /// + /// Time from the start of all audio written to the buffer during the + /// session when speech was first detected. This will correspond to the + /// beginning of audio sent to the model, and thus includes the + /// `prefix_padding_ms` configured in the Session. + /// + public TimeSpan AudioEnd { get => TimeSpan.FromMilliseconds(AudioEndMs); } + + internal int AudioEndMsAs { get; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateInputAudioBufferSpeechStopped.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateInputAudioBufferSpeechStopped.cs new file mode 100644 index 000000000000..72fb5995d97a --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateInputAudioBufferSpeechStopped.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// The SessionUpdateInputAudioBufferSpeechStarted. + public partial class SessionUpdateInputAudioBufferSpeechStarted + { + /// + /// Time from the start of all audio written to the buffer during the + /// session when speech was first detected. This will correspond to the + /// beginning of audio sent to the model, and thus includes the + /// `prefix_padding_ms` configured in the Session. + /// + public TimeSpan AudioStart { get => TimeSpan.FromMilliseconds(AudioStartMs); } + + internal int AudioStartMs { get; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/SessionUpdateModality.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateModality.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/SessionUpdateModality.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/SessionUpdateModality.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ToolChoiceOption.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ToolChoiceOption.Serialization.cs new file mode 100644 index 000000000000..899d2e6924c9 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ToolChoiceOption.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.VoiceLive +{ + /// + /// + /// + public partial class ToolChoiceOption : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + => SerializeConversationToolChoiceOption(this, writer, options); + + ToolChoiceOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationToolChoiceOption(document.RootElement, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + return ModelReaderWriter.Write(this, options, null); + } + + ToolChoiceOption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + => FromBinaryData(data); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + internal static void SerializeConversationToolChoiceOption(ToolChoiceOption instance, Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + if (instance.ToolCallConstraint.HasValue) + { + writer.WriteStringValue(instance.ToolCallConstraint.Value.ToString()); + } + else if (instance.FunctionName is not null) + { + var functionObject = new ToolChoiceFunctionObjectFunction(name: instance.FunctionName); + writer.WriteObjectValue(functionObject, options); + } + } + + internal static ToolChoiceOption DeserializeConversationToolChoiceOption(JsonElement element, ModelReaderWriterOptions options = null) + { + if (element.ValueKind == JsonValueKind.Object) + { + var functionObject = ToolChoiceFunctionObjectFunction.DeserializeToolChoiceFunctionObjectFunction(element, options); + return new ToolChoiceOption(functionObject.Name); + } + if (element.ValueKind == JsonValueKind.String) + { + return new ToolChoiceOption(new ToolChoiceLiteral(element.GetString())); + } + return null; + } + + internal static ToolChoiceOption FromBinaryData(BinaryData bytes) + { + if (bytes is null) + { + return new ToolChoiceOption(); + } + using JsonDocument document = JsonDocument.Parse(bytes); + return DeserializeConversationToolChoiceOption(document.RootElement); + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ToolChoiceOption.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ToolChoiceOption.cs new file mode 100644 index 000000000000..f3a323bfe37f --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/ToolChoiceOption.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.VoiceLive +{ + /// + /// Represents constraints placed on tool calls made by the model. + /// + public partial class ToolChoiceOption + { + /// + /// The name of a single function the model is allowed to call. + /// + public string FunctionName { get; } + + /// + /// Constraint applied to the ability of the model to call tools. + /// + public ToolChoiceLiteral? ToolCallConstraint { get; } + + /// + /// Creates an options class with a fixed number of tokens. + /// + /// + public ToolChoiceOption(ToolChoiceLiteral toolChoiceLiteral) + { + ToolCallConstraint = toolChoiceLiteral; + } + + /// + /// Creates an options class with single tool name. + /// + /// + public ToolChoiceOption(string stringValue) + { + FunctionName = stringValue; + } + + internal ToolChoiceOption() { } + + /// + /// Creates a ToolChoiceOption class from an integer value. + /// + /// The name of the tool to be called. + public static implicit operator ToolChoiceOption(string name) + => new(name); + + /// + /// Creates a ToolChoiceOption class from an integer value. + /// + /// Literal describing the tool constraints + public static implicit operator ToolChoiceOption(ToolChoiceLiteral literal) + => new(literal); + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/UnknownAzureVoice.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/UnknownAzureVoice.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/UnknownAzureVoice.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/UnknownAzureVoice.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VideoCrop.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VideoCrop.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/VideoCrop.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VideoCrop.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveResponse.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveResponse.cs similarity index 89% rename from sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveResponse.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveResponse.cs index a8410ba57487..80b2fca4b5b3 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveResponse.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveResponse.cs @@ -90,5 +90,17 @@ public SessionUpdateModality Modalities return modalities; ; } } + + [CodeGenMember("MaxOutputTokens")] + private BinaryData _MaxOutputTokens { get; } + + /// + /// Maximum number of output tokens for a single assistant response, + /// inclusive of tool calls, that was used in this response. + /// + public ResponseMaxOutputTokensOption MaxOutputTokens + { + get; + } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Commands.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Commands.cs similarity index 97% rename from sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Commands.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Commands.cs index fd85742b6810..c896750f0539 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Commands.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Commands.cs @@ -324,13 +324,12 @@ public virtual void CancelAudioTurn(string turnId, CancellationToken cancellatio /// An optional cancellation token. /// Thrown when is null. /// A task that represents the asynchronous operation. - public virtual async Task ConfigureSessionAsync(SessionOptions sessionOptions, CancellationToken cancellationToken = default) + public virtual async Task ConfigureSessionAsync(VoiceLiveSessionOptions sessionOptions, CancellationToken cancellationToken = default) { Argument.AssertNotNull(sessionOptions, nameof(sessionOptions)); ThrowIfDisposed(); - RequestSession requestSession = sessionOptions.ToRequestSession(); - ClientEventSessionUpdate updateCommand = new(requestSession); + ClientEventSessionUpdate updateCommand = new(sessionOptions); await SendCommandAsync(updateCommand, cancellationToken).ConfigureAwait(false); } @@ -340,7 +339,7 @@ public virtual async Task ConfigureSessionAsync(SessionOptions sessionOptions, C /// The session configuration options. /// An optional cancellation token. /// Thrown when is null. - public virtual void ConfigureSession(SessionOptions sessionOptions, CancellationToken cancellationToken = default) + public virtual void ConfigureSession(VoiceLiveSessionOptions sessionOptions, CancellationToken cancellationToken = default) { ConfigureSessionAsync(sessionOptions, cancellationToken).EnsureCompleted(); } @@ -352,7 +351,7 @@ public virtual void ConfigureSession(SessionOptions sessionOptions, Cancellation /// An optional cancellation token. /// Thrown when is null. /// A task that represents the asynchronous operation. - public virtual async Task ConfigureConversationSessionAsync(SessionOptions sessionOptions, CancellationToken cancellationToken = default) + public virtual async Task ConfigureConversationSessionAsync(VoiceLiveSessionOptions sessionOptions, CancellationToken cancellationToken = default) { await ConfigureSessionAsync(sessionOptions, cancellationToken).ConfigureAwait(false); } @@ -363,7 +362,7 @@ public virtual async Task ConfigureConversationSessionAsync(SessionOptions sessi /// The session configuration options. /// An optional cancellation token. /// Thrown when is null. - public virtual void ConfigureConversationSession(SessionOptions sessionOptions, CancellationToken cancellationToken = default) + public virtual void ConfigureConversationSession(VoiceLiveSessionOptions sessionOptions, CancellationToken cancellationToken = default) { ConfigureConversationSessionAsync(sessionOptions, cancellationToken).EnsureCompleted(); } @@ -375,7 +374,7 @@ public virtual void ConfigureConversationSession(SessionOptions sessionOptions, /// An optional cancellation token. /// Thrown when is null. /// A task that represents the asynchronous operation. - public virtual async Task ConfigureTranscriptionSessionAsync(SessionOptions sessionOptions, CancellationToken cancellationToken = default) + public virtual async Task ConfigureTranscriptionSessionAsync(VoiceLiveSessionOptions sessionOptions, CancellationToken cancellationToken = default) { await ConfigureSessionAsync(sessionOptions, cancellationToken).ConfigureAwait(false); } @@ -386,7 +385,7 @@ public virtual async Task ConfigureTranscriptionSessionAsync(SessionOptions sess /// The session configuration options. /// An optional cancellation token. /// Thrown when is null. - public virtual void ConfigureTranscriptionSession(SessionOptions sessionOptions, CancellationToken cancellationToken = default) + public virtual void ConfigureTranscriptionSession(VoiceLiveSessionOptions sessionOptions, CancellationToken cancellationToken = default) { ConfigureTranscriptionSessionAsync(sessionOptions, cancellationToken).EnsureCompleted(); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Protocol.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Protocol.cs similarity index 91% rename from sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Protocol.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Protocol.cs index 4ce705ce4d14..3df3f9ca6553 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Protocol.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Protocol.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Net; using System.Net.WebSockets; using System.Threading; using System.Threading.Tasks; @@ -41,11 +43,17 @@ protected internal virtual async Task ConnectAsync(CancellationToken cancellatio var tokenOptions = new TokenRequestContext(new string[] { "https://cognitiveservices.azure.com/.default" }); var token = await _tokenCredential.GetTokenAsync(tokenOptions, cancellationToken).ConfigureAwait(false); - clientWebSocket.Options.SetRequestHeader("Authorization", $"Bearer {token.Token}"); + clientWebSocket.Options.SetRequestHeader("Authorization", $"{token.TokenType} {token.Token}"); } - // Add any additional headers required by the VoiceLive service - clientWebSocket.Options.SetRequestHeader("User-Agent", "Azure-VoiceLive-SDK/.NET"); + try + { + clientWebSocket.Options.SetRequestHeader("User-Agent", "Azure-VoiceLive-SDK/.NET"); + } + catch (System.ArgumentException) + { + // On Net4.x you can't set the UserAgent for a websocket connection + } await clientWebSocket.ConnectAsync(_endpoint, cancellationToken).ConfigureAwait(false); diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Updates.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Updates.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.Updates.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.Updates.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSession.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSession.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSessionOptions.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSessionOptions.cs new file mode 100644 index 000000000000..8d5057a3b713 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceLiveSessionOptions.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// The VoiceLiveRequestSession. + public partial class VoiceLiveSessionOptions + { + /// + /// Serialized additional properties for the request session + /// + internal IDictionary AdditionalProperties => this._additionalBinaryDataProperties; + + private BinaryData VoiceInternal; + + /// + /// Gets or sets the Voice. + /// + public VoiceProvider Voice + { + get + { + if (VoiceInternal == null) + { + return null; + } + + var s = VoiceInternal.ToString(); + + return null; + } + set + { + if (value == null) + { + VoiceInternal = null; + } + else + { + VoiceInternal = value.ToBinaryData(); + } + } + } + + [CodeGenMember("MaxResponseOutputTokens")] + private BinaryData _maxResponseOutputTokens; + + /// + /// Gets or sets the maximum number of tokens to generate in the response. + /// + public ResponseMaxOutputTokensOption MaxResponseOutputTokens + { + get => ResponseMaxOutputTokensOption.FromBinaryData(_maxResponseOutputTokens); + set + { + var persistable = value as IPersistableModel; + _maxResponseOutputTokens = persistable?.Write(new ModelReaderWriterOptions("J")) ?? null; + } + } + + [CodeGenMember("ToolChoice")] + private BinaryData _toolChoice; + + /// + /// Gets or sets the tool choice strategy for response generation. + /// + public ToolChoiceOption ToolChoice + { + get => ToolChoiceOption.FromBinaryData(_toolChoice); + set + { + var persistable = value as IPersistableModel; + _toolChoice = persistable?.Write(new ModelReaderWriterOptions("J")) ?? null; + } + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceProvider.cs b/sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceProvider.cs similarity index 100% rename from sdk/ai/Azure.AI.VoiceLive/src/VoiceProvider.cs rename to sdk/ai/Azure.AI.VoiceLive/src/Customizations/VoiceProvider.cs diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.Serialization.cs index 9c687681527d..00a05d0c334f 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.Serialization.cs @@ -45,10 +45,37 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("language"u8); writer.WriteStringValue(Language); } - writer.WritePropertyName("enabled"u8); - writer.WriteBooleanValue(Enabled); - writer.WritePropertyName("custom_model"u8); - writer.WriteBooleanValue(CustomModel); + if (Optional.IsCollectionDefined(CustomSpeech)) + { + writer.WritePropertyName("custom_speech"u8); + writer.WriteStartObject(); + foreach (var item in CustomSpeech) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(PhraseList)) + { + writer.WritePropertyName("phrase_list"u8); + writer.WriteStartArray(); + foreach (string item in PhraseList) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -93,8 +120,8 @@ internal static AudioInputTranscriptionSettings DeserializeAudioInputTranscripti } AudioInputTranscriptionSettingsModel model = default; string language = default; - bool enabled = default; - bool customModel = default; + IDictionary customSpeech = default; + IList phraseList = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -108,14 +135,46 @@ internal static AudioInputTranscriptionSettings DeserializeAudioInputTranscripti language = prop.Value.GetString(); continue; } - if (prop.NameEquals("enabled"u8)) + if (prop.NameEquals("custom_speech"u8)) { - enabled = prop.Value.GetBoolean(); + 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()); + } + } + customSpeech = dictionary; continue; } - if (prop.NameEquals("custom_model"u8)) + if (prop.NameEquals("phrase_list"u8)) { - customModel = prop.Value.GetBoolean(); + 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()); + } + } + phraseList = array; continue; } if (options.Format != "W") @@ -123,7 +182,7 @@ internal static AudioInputTranscriptionSettings DeserializeAudioInputTranscripti additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AudioInputTranscriptionSettings(model, language, enabled, customModel, additionalBinaryDataProperties); + return new AudioInputTranscriptionSettings(model, language, customSpeech ?? new ChangeTrackingDictionary(), phraseList ?? new ChangeTrackingList(), additionalBinaryDataProperties); } /// The client options for reading and writing models. diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.cs index 6efc1f49e234..20fc9eefdcf0 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettings.cs @@ -17,41 +17,51 @@ public partial class AudioInputTranscriptionSettings private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - /// The model used for transcription. E.g., 'whisper-1', 'azure-fast-transcription', 's2s-ingraph'. - /// Whether transcription is enabled. - /// Whether a custom model is being used. - public AudioInputTranscriptionSettings(AudioInputTranscriptionSettingsModel model, bool enabled, bool customModel) + /// + /// The transcription model to use. Supported values: + /// 'whisper-1', 'gpt-4o-transcribe', 'gpt-4o-mini-transcribe', + /// 'azure-fast-transcription', 'azure-speech'. + /// + public AudioInputTranscriptionSettings(AudioInputTranscriptionSettingsModel model) { Model = model; - Enabled = enabled; - CustomModel = customModel; + CustomSpeech = new ChangeTrackingDictionary(); + PhraseList = new ChangeTrackingList(); } /// Initializes a new instance of . - /// The model used for transcription. E.g., 'whisper-1', 'azure-fast-transcription', 's2s-ingraph'. - /// The language code to use for transcription, if specified. - /// Whether transcription is enabled. - /// Whether a custom model is being used. + /// + /// The transcription model to use. Supported values: + /// 'whisper-1', 'gpt-4o-transcribe', 'gpt-4o-mini-transcribe', + /// 'azure-fast-transcription', 'azure-speech'. + /// + /// Optional BCP-47 language code (e.g., 'en-US'). + /// Optional configuration for custom speech models. + /// Optional list of phrase hints to bias recognition. /// Keeps track of any properties unknown to the library. - internal AudioInputTranscriptionSettings(AudioInputTranscriptionSettingsModel model, string language, bool enabled, bool customModel, IDictionary additionalBinaryDataProperties) + internal AudioInputTranscriptionSettings(AudioInputTranscriptionSettingsModel model, string language, IDictionary customSpeech, IList phraseList, IDictionary additionalBinaryDataProperties) { Model = model; Language = language; - Enabled = enabled; - CustomModel = customModel; + CustomSpeech = customSpeech; + PhraseList = phraseList; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - /// The model used for transcription. E.g., 'whisper-1', 'azure-fast-transcription', 's2s-ingraph'. + /// + /// The transcription model to use. Supported values: + /// 'whisper-1', 'gpt-4o-transcribe', 'gpt-4o-mini-transcribe', + /// 'azure-fast-transcription', 'azure-speech'. + /// public AudioInputTranscriptionSettingsModel Model { get; set; } - /// The language code to use for transcription, if specified. + /// Optional BCP-47 language code (e.g., 'en-US'). public string Language { get; set; } - /// Whether transcription is enabled. - public bool Enabled { get; set; } + /// Optional configuration for custom speech models. + public IDictionary CustomSpeech { get; } - /// Whether a custom model is being used. - public bool CustomModel { get; set; } + /// Optional list of phrase hints to bias recognition. + public IList PhraseList { get; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettingsModel.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettingsModel.cs index 0f4aaa125dc1..d1e8af355ed2 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettingsModel.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionSettingsModel.cs @@ -15,8 +15,9 @@ namespace Azure.AI.VoiceLive { private readonly string _value; private const string Whisper1Value = "whisper-1"; + private const string Gpt4oTranscribeValue = "gpt-4o-transcribe"; + private const string Gpt4oMiniTranscribeValue = "gpt-4o-mini-transcribe"; private const string AzureFastTranscriptionValue = "azure-fast-transcription"; - private const string S2sIngraphValue = "s2s-ingraph"; private const string AzureSpeechValue = "azure-speech"; /// Initializes a new instance of . @@ -32,12 +33,15 @@ public AudioInputTranscriptionSettingsModel(string value) /// Gets the Whisper1. public static AudioInputTranscriptionSettingsModel Whisper1 { get; } = new AudioInputTranscriptionSettingsModel(Whisper1Value); + /// Gets the Gpt4oTranscribe. + public static AudioInputTranscriptionSettingsModel Gpt4oTranscribe { get; } = new AudioInputTranscriptionSettingsModel(Gpt4oTranscribeValue); + + /// Gets the Gpt4oMiniTranscribe. + public static AudioInputTranscriptionSettingsModel Gpt4oMiniTranscribe { get; } = new AudioInputTranscriptionSettingsModel(Gpt4oMiniTranscribeValue); + /// Gets the AzureFastTranscription. public static AudioInputTranscriptionSettingsModel AzureFastTranscription { get; } = new AudioInputTranscriptionSettingsModel(AzureFastTranscriptionValue); - /// Gets the S2sIngraph. - public static AudioInputTranscriptionSettingsModel S2sIngraph { get; } = new AudioInputTranscriptionSettingsModel(S2sIngraphValue); - /// Gets the AzureSpeech. public static AudioInputTranscriptionSettingsModel AzureSpeech { get; } = new AudioInputTranscriptionSettingsModel(AzureSpeechValue); diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfig.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfig.Serialization.cs deleted file mode 100644 index 583e8c641c72..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfig.Serialization.cs +++ /dev/null @@ -1,207 +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; - -namespace Azure.AI.VoiceLive -{ - /// Configuration for avatar streaming and behavior during the session. - public partial class AvatarConfig : IJsonModel - { - /// Initializes a new instance of for deserialization. - internal AvatarConfig() - { - } - - /// 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(AvatarConfig)} does not support writing '{format}' format."); - } - if (Optional.IsCollectionDefined(IceServers)) - { - writer.WritePropertyName("ice_servers"u8); - writer.WriteStartArray(); - foreach (IceServer item in IceServers) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("character"u8); - writer.WriteStringValue(Character); - if (Optional.IsDefined(Style)) - { - writer.WritePropertyName("style"u8); - writer.WriteStringValue(Style); - } - writer.WritePropertyName("customized"u8); - writer.WriteBooleanValue(Customized); - if (Optional.IsDefined(Video)) - { - writer.WritePropertyName("video"u8); - writer.WriteObjectValue(Video, 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. - AvatarConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual AvatarConfig 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(AvatarConfig)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAvatarConfig(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static AvatarConfig DeserializeAvatarConfig(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList iceServers = default; - string character = default; - string style = default; - bool customized = default; - VideoParams video = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("ice_servers"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(IceServer.DeserializeIceServer(item, options)); - } - iceServers = array; - continue; - } - if (prop.NameEquals("character"u8)) - { - character = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("style"u8)) - { - style = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("customized"u8)) - { - customized = prop.Value.GetBoolean(); - continue; - } - if (prop.NameEquals("video"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - video = VideoParams.DeserializeVideoParams(prop.Value, options); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new AvatarConfig( - iceServers ?? new ChangeTrackingList(), - character, - style, - customized, - video, - 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, AzureAIVoiceLiveContext.Default); - default: - throw new FormatException($"The model {nameof(AvatarConfig)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - AvatarConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual AvatarConfig 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 DeserializeAvatarConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AvatarConfig)} 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/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfig.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfig.cs deleted file mode 100644 index 007b1f9d8b70..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfig.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.VoiceLive -{ - /// Configuration for avatar streaming and behavior during the session. - public partial class AvatarConfig - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - /// The character name or ID used for the avatar. - /// Indicates whether the avatar is customized or not. - /// is null. - public AvatarConfig(string character, bool customized) - { - Argument.AssertNotNull(character, nameof(character)); - - IceServers = new ChangeTrackingList(); - Character = character; - Customized = customized; - } - - /// Initializes a new instance of . - /// Optional list of ICE servers to use for WebRTC connection establishment. - /// The character name or ID used for the avatar. - /// Optional avatar style, such as emotional tone or speaking style. - /// Indicates whether the avatar is customized or not. - /// Optional video configuration including resolution, bitrate, and codec. - /// Keeps track of any properties unknown to the library. - internal AvatarConfig(IList iceServers, string character, string style, bool customized, VideoParams video, IDictionary additionalBinaryDataProperties) - { - IceServers = iceServers; - Character = character; - Style = style; - Customized = customized; - Video = video; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// Optional list of ICE servers to use for WebRTC connection establishment. - public IList IceServers { get; } - - /// The character name or ID used for the avatar. - public string Character { get; set; } - - /// Optional avatar style, such as emotional tone or speaking style. - public string Style { get; set; } - - /// Indicates whether the avatar is customized or not. - public bool Customized { get; set; } - - /// Optional video configuration including resolution, bitrate, and codec. - public VideoParams Video { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs new file mode 100644 index 000000000000..a80a2cc5d135 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs @@ -0,0 +1,207 @@ +// 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; + +namespace Azure.AI.VoiceLive +{ + /// Configuration for avatar streaming and behavior during the session. + public partial class AvatarConfiguration : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal AvatarConfiguration() + { + } + + /// 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(AvatarConfiguration)} does not support writing '{format}' format."); + } + if (Optional.IsCollectionDefined(IceServers)) + { + writer.WritePropertyName("ice_servers"u8); + writer.WriteStartArray(); + foreach (IceServer item in IceServers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("character"u8); + writer.WriteStringValue(Character); + if (Optional.IsDefined(Style)) + { + writer.WritePropertyName("style"u8); + writer.WriteStringValue(Style); + } + writer.WritePropertyName("customized"u8); + writer.WriteBooleanValue(Customized); + if (Optional.IsDefined(Video)) + { + writer.WritePropertyName("video"u8); + writer.WriteObjectValue(Video, 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. + AvatarConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvatarConfiguration 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(AvatarConfiguration)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvatarConfiguration(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvatarConfiguration DeserializeAvatarConfiguration(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList iceServers = default; + string character = default; + string style = default; + bool customized = default; + VideoParams video = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("ice_servers"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(IceServer.DeserializeIceServer(item, options)); + } + iceServers = array; + continue; + } + if (prop.NameEquals("character"u8)) + { + character = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("style"u8)) + { + style = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("customized"u8)) + { + customized = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("video"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + video = VideoParams.DeserializeVideoParams(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AvatarConfiguration( + iceServers ?? new ChangeTrackingList(), + character, + style, + customized, + video, + 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, AzureAIVoiceLiveContext.Default); + default: + throw new FormatException($"The model {nameof(AvatarConfiguration)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + AvatarConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvatarConfiguration 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 DeserializeAvatarConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvatarConfiguration)} 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/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.cs new file mode 100644 index 000000000000..08f4d1e998e5 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// Configuration for avatar streaming and behavior during the session. + public partial class AvatarConfiguration + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The character name or ID used for the avatar. + /// Indicates whether the avatar is customized or not. + /// is null. + public AvatarConfiguration(string character, bool customized) + { + Argument.AssertNotNull(character, nameof(character)); + + IceServers = new ChangeTrackingList(); + Character = character; + Customized = customized; + } + + /// Initializes a new instance of . + /// Optional list of ICE servers to use for WebRTC connection establishment. + /// The character name or ID used for the avatar. + /// Optional avatar style, such as emotional tone or speaking style. + /// Indicates whether the avatar is customized or not. + /// Optional video configuration including resolution, bitrate, and codec. + /// Keeps track of any properties unknown to the library. + internal AvatarConfiguration(IList iceServers, string character, string style, bool customized, VideoParams video, IDictionary additionalBinaryDataProperties) + { + IceServers = iceServers; + Character = character; + Style = style; + Customized = customized; + Video = video; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Optional list of ICE servers to use for WebRTC connection establishment. + public IList IceServers { get; } + + /// The character name or ID used for the avatar. + public string Character { get; set; } + + /// Optional avatar style, such as emotional tone or speaking style. + public string Style { get; set; } + + /// Indicates whether the avatar is customized or not. + public bool Customized { get; set; } + + /// Optional video configuration including resolution, bitrate, and codec. + public VideoParams Video { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs new file mode 100644 index 000000000000..4beee16f0c87 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs @@ -0,0 +1,150 @@ +// 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; + +namespace Azure.AI.VoiceLive +{ + /// Details of output token usage. + public partial class CachedTokenDetails : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal CachedTokenDetails() + { + } + + /// 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(CachedTokenDetails)} does not support writing '{format}' format."); + } + writer.WritePropertyName("text_tokens"u8); + writer.WriteNumberValue(TextTokens); + writer.WritePropertyName("audio_tokens"u8); + writer.WriteNumberValue(AudioTokens); + 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. + CachedTokenDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual CachedTokenDetails 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(CachedTokenDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCachedTokenDetails(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static CachedTokenDetails DeserializeCachedTokenDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int textTokens = default; + int audioTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("text_tokens"u8)) + { + textTokens = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("audio_tokens"u8)) + { + audioTokens = prop.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new CachedTokenDetails(textTokens, audioTokens, 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, AzureAIVoiceLiveContext.Default); + default: + throw new FormatException($"The model {nameof(CachedTokenDetails)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + CachedTokenDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual CachedTokenDetails 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 DeserializeCachedTokenDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CachedTokenDetails)} 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/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.cs new file mode 100644 index 000000000000..ec7fe0a569f3 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// Details of output token usage. + public partial class CachedTokenDetails + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Number of cached text tokens. + /// Number of cached audio tokens. + internal CachedTokenDetails(int textTokens, int audioTokens) + { + TextTokens = textTokens; + AudioTokens = audioTokens; + } + + /// Initializes a new instance of . + /// Number of cached text tokens. + /// Number of cached audio tokens. + /// Keeps track of any properties unknown to the library. + internal CachedTokenDetails(int textTokens, int audioTokens, IDictionary additionalBinaryDataProperties) + { + TextTokens = textTokens; + AudioTokens = audioTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Number of cached text tokens. + public int TextTokens { get; } + + /// Number of cached audio tokens. + public int AudioTokens { get; } + } +} 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 9e95841be096..a4fba6868f18 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.Serialization.cs @@ -70,7 +70,7 @@ internal static ClientEventSessionUpdate DeserializeClientEventSessionUpdate(Jso ClientEventType @type = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - RequestSession session = default; + VoiceLiveSessionOptions session = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -85,7 +85,7 @@ internal static ClientEventSessionUpdate DeserializeClientEventSessionUpdate(Jso } if (prop.NameEquals("session"u8)) { - session = RequestSession.DeserializeRequestSession(prop.Value, options); + session = VoiceLiveSessionOptions.DeserializeVoiceLiveSessionOptions(prop.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.cs index 3af0bfb6692a..d655e9be3bc2 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.cs @@ -15,7 +15,7 @@ internal partial class ClientEventSessionUpdate : ClientEvent /// Initializes a new instance of . /// /// is null. - public ClientEventSessionUpdate(RequestSession session) : base(ClientEventType.SessionUpdate) + public ClientEventSessionUpdate(VoiceLiveSessionOptions session) : base(ClientEventType.SessionUpdate) { Argument.AssertNotNull(session, nameof(session)); @@ -27,12 +27,12 @@ public ClientEventSessionUpdate(RequestSession session) : base(ClientEventType.S /// /// Keeps track of any properties unknown to the library. /// - internal ClientEventSessionUpdate(ClientEventType @type, string eventId, IDictionary additionalBinaryDataProperties, RequestSession session) : base(@type, eventId, additionalBinaryDataProperties) + internal ClientEventSessionUpdate(ClientEventType @type, string eventId, IDictionary additionalBinaryDataProperties, VoiceLiveSessionOptions session) : base(@type, eventId, additionalBinaryDataProperties) { Session = session; } /// Gets the Session. - public RequestSession Session { get; } + public VoiceLiveSessionOptions Session { get; } } } 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 844410ee70a1..f5003022920c 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.Serialization.cs @@ -44,6 +44,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(TextTokens); writer.WritePropertyName("audio_tokens"u8); writer.WriteNumberValue(AudioTokens); + writer.WritePropertyName("cached_tokens_details"u8); + writer.WriteObjectValue(CachedTokensDetails, options); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -89,6 +91,7 @@ internal static InputTokenDetails DeserializeInputTokenDetails(JsonElement eleme int cachedTokens = default; int textTokens = default; int audioTokens = default; + CachedTokenDetails cachedTokensDetails = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -107,12 +110,17 @@ internal static InputTokenDetails DeserializeInputTokenDetails(JsonElement eleme audioTokens = prop.Value.GetInt32(); continue; } + if (prop.NameEquals("cached_tokens_details"u8)) + { + cachedTokensDetails = CachedTokenDetails.DeserializeCachedTokenDetails(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InputTokenDetails(cachedTokens, textTokens, audioTokens, additionalBinaryDataProperties); + return new InputTokenDetails(cachedTokens, textTokens, audioTokens, cachedTokensDetails, additionalBinaryDataProperties); } /// The client options for reading and writing models. diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.cs index 56e855faee77..9b603a2b0f5b 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.cs @@ -20,23 +20,27 @@ public partial class InputTokenDetails /// Number of cached tokens used in the input. /// Number of text tokens used in the input. /// Number of audio tokens used in the input. - internal InputTokenDetails(int cachedTokens, int textTokens, int audioTokens) + /// Details of cached token usage. + internal InputTokenDetails(int cachedTokens, int textTokens, int audioTokens, CachedTokenDetails cachedTokensDetails) { CachedTokens = cachedTokens; TextTokens = textTokens; AudioTokens = audioTokens; + CachedTokensDetails = cachedTokensDetails; } /// Initializes a new instance of . /// Number of cached tokens used in the input. /// Number of text tokens used in the input. /// Number of audio tokens used in the input. + /// Details of cached token usage. /// Keeps track of any properties unknown to the library. - internal InputTokenDetails(int cachedTokens, int textTokens, int audioTokens, IDictionary additionalBinaryDataProperties) + internal InputTokenDetails(int cachedTokens, int textTokens, int audioTokens, CachedTokenDetails cachedTokensDetails, IDictionary additionalBinaryDataProperties) { CachedTokens = cachedTokens; TextTokens = textTokens; AudioTokens = audioTokens; + CachedTokensDetails = cachedTokensDetails; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -48,5 +52,8 @@ internal InputTokenDetails(int cachedTokens, int textTokens, int audioTokens, ID /// Number of audio tokens used in the input. public int AudioTokens { get; } + + /// Details of cached token usage. + public CachedTokenDetails CachedTokensDetails { get; } } } 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 c78ac4441d75..16843841563d 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.Serialization.cs @@ -43,12 +43,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("logprob"u8); writer.WriteNumberValue(Logprob); writer.WritePropertyName("bytes"u8); - writer.WriteStartArray(); - foreach (int item in Bytes) +#if NET6_0_OR_GREATER + writer.WriteRawValue(Bytes); +#else + using (JsonDocument document = JsonDocument.Parse(Bytes)) { - writer.WriteNumberValue(item); + JsonSerializer.Serialize(writer, document.RootElement); } - writer.WriteEndArray(); +#endif if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -93,7 +95,7 @@ internal static LogProbProperties DeserializeLogProbProperties(JsonElement eleme } string token = default; float logprob = default; - IList bytes = default; + BinaryData bytes = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -109,12 +111,7 @@ internal static LogProbProperties DeserializeLogProbProperties(JsonElement eleme } if (prop.NameEquals("bytes"u8)) { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - bytes = array; + bytes = BinaryData.FromString(prop.Value.GetRawText()); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.cs index 85f9fea70008..6c9190140e43 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.AI.VoiceLive { @@ -21,11 +20,11 @@ public partial class LogProbProperties /// The token that was used to generate the log probability. /// The log probability of the token. /// The bytes that were used to generate the log probability. - internal LogProbProperties(string token, float logprob, IEnumerable bytes) + internal LogProbProperties(string token, float logprob, BinaryData bytes) { Token = token; Logprob = logprob; - Bytes = bytes.ToList(); + Bytes = bytes; } /// Initializes a new instance of . @@ -33,7 +32,7 @@ internal LogProbProperties(string token, float logprob, IEnumerable bytes) /// The log probability of the token. /// The bytes that were used to generate the log probability. /// Keeps track of any properties unknown to the library. - internal LogProbProperties(string token, float logprob, IList bytes, IDictionary additionalBinaryDataProperties) + internal LogProbProperties(string token, float logprob, BinaryData bytes, IDictionary additionalBinaryDataProperties) { Token = token; Logprob = logprob; @@ -46,8 +45,5 @@ internal LogProbProperties(string token, float logprob, IList bytes, IDicti /// The log probability of the token. public float Logprob { get; } - - /// The bytes that were used to generate the log probability. - public IList Bytes { get; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/Models/AzureAIVoiceLiveContext.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/Models/AzureAIVoiceLiveContext.cs index 108673e2912f..adcda161a2e5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/Models/AzureAIVoiceLiveContext.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/Models/AzureAIVoiceLiveContext.cs @@ -18,7 +18,7 @@ namespace Azure.AI.VoiceLive [ModelReaderWriterBuildable(typeof(AudioEchoCancellation))] [ModelReaderWriterBuildable(typeof(AudioInputTranscriptionSettings))] [ModelReaderWriterBuildable(typeof(AudioNoiseReduction))] - [ModelReaderWriterBuildable(typeof(AvatarConfig))] + [ModelReaderWriterBuildable(typeof(AvatarConfiguration))] [ModelReaderWriterBuildable(typeof(AzureCustomVoice))] [ModelReaderWriterBuildable(typeof(AzureMultilingualSemanticVad))] [ModelReaderWriterBuildable(typeof(AzurePersonalVoice))] @@ -31,6 +31,7 @@ namespace Azure.AI.VoiceLive [ModelReaderWriterBuildable(typeof(AzureSemanticVadServer))] [ModelReaderWriterBuildable(typeof(AzureStandardVoice))] [ModelReaderWriterBuildable(typeof(AzureVoice))] + [ModelReaderWriterBuildable(typeof(CachedTokenDetails))] [ModelReaderWriterBuildable(typeof(ClientEvent))] [ModelReaderWriterBuildable(typeof(ClientEventConversationItemCreate))] [ModelReaderWriterBuildable(typeof(ClientEventConversationItemDelete))] @@ -67,9 +68,8 @@ namespace Azure.AI.VoiceLive [ModelReaderWriterBuildable(typeof(OutputTextContentPart))] [ModelReaderWriterBuildable(typeof(OutputTokenDetails))] [ModelReaderWriterBuildable(typeof(RequestAudioContentPart))] - [ModelReaderWriterBuildable(typeof(RequestSession))] [ModelReaderWriterBuildable(typeof(RequestTextContentPart))] - [ModelReaderWriterBuildable(typeof(RespondingAgentConfig))] + [ModelReaderWriterBuildable(typeof(RespondingAgentOptions))] [ModelReaderWriterBuildable(typeof(ResponseAudioContentPart))] [ModelReaderWriterBuildable(typeof(ResponseCancelledDetails))] [ModelReaderWriterBuildable(typeof(ResponseCreateParams))] @@ -79,11 +79,9 @@ namespace Azure.AI.VoiceLive [ModelReaderWriterBuildable(typeof(ResponseIncompleteDetails))] [ModelReaderWriterBuildable(typeof(ResponseItem))] [ModelReaderWriterBuildable(typeof(ResponseMessageItem))] - [ModelReaderWriterBuildable(typeof(ResponseSession))] [ModelReaderWriterBuildable(typeof(ResponseStatusDetails))] [ModelReaderWriterBuildable(typeof(ResponseTextContentPart))] [ModelReaderWriterBuildable(typeof(ResponseTokenStatistics))] - [ModelReaderWriterBuildable(typeof(ServerEventErrorError))] [ModelReaderWriterBuildable(typeof(ServerVad))] [ModelReaderWriterBuildable(typeof(SessionUpdate))] [ModelReaderWriterBuildable(typeof(SessionUpdateConversationItemCreated))] @@ -94,6 +92,7 @@ namespace Azure.AI.VoiceLive [ModelReaderWriterBuildable(typeof(SessionUpdateConversationItemRetrieved))] [ModelReaderWriterBuildable(typeof(SessionUpdateConversationItemTruncated))] [ModelReaderWriterBuildable(typeof(SessionUpdateError))] + [ModelReaderWriterBuildable(typeof(SessionUpdateErrorDetails))] [ModelReaderWriterBuildable(typeof(SessionUpdateInputAudioBufferCleared))] [ModelReaderWriterBuildable(typeof(SessionUpdateInputAudioBufferCommitted))] [ModelReaderWriterBuildable(typeof(SessionUpdateInputAudioBufferSpeechStarted))] @@ -149,6 +148,8 @@ namespace Azure.AI.VoiceLive [ModelReaderWriterBuildable(typeof(VoiceLiveErrorDetails))] [ModelReaderWriterBuildable(typeof(VoiceLiveFunctionDefinition))] [ModelReaderWriterBuildable(typeof(VoiceLiveResponse))] + [ModelReaderWriterBuildable(typeof(VoiceLiveSessionOptions))] + [ModelReaderWriterBuildable(typeof(VoiceLiveSessionResponse))] [ModelReaderWriterBuildable(typeof(VoiceLiveToolDefinition))] public partial class AzureAIVoiceLiveContext : ModelReaderWriterContext { diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestSession.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestSession.Serialization.cs deleted file mode 100644 index 2d382e390ec0..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestSession.Serialization.cs +++ /dev/null @@ -1,478 +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; - -namespace Azure.AI.VoiceLive -{ - /// The RequestSession. - public partial class RequestSession : 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(RequestSession)} does not support writing '{format}' format."); - } - if (Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (Optional.IsCollectionDefined(Modalities)) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (InputModality item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Animation)) - { - writer.WritePropertyName("animation"u8); - writer.WriteObjectValue(Animation, options); - } - if (Optional.IsDefined(Instructions)) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - if (Optional.IsDefined(InputAudio)) - { - writer.WritePropertyName("input_audio"u8); - writer.WriteObjectValue(InputAudio, options); - } - if (Optional.IsDefined(InputAudioSamplingRate)) - { - writer.WritePropertyName("input_audio_sampling_rate"u8); - writer.WriteNumberValue(InputAudioSamplingRate.Value); - } - if (Optional.IsDefined(InputAudioFormat)) - { - writer.WritePropertyName("input_audio_format"u8); - writer.WriteStringValue(InputAudioFormat.Value.ToString()); - } - if (Optional.IsDefined(OutputAudioFormat)) - { - writer.WritePropertyName("output_audio_format"u8); - writer.WriteStringValue(OutputAudioFormat.Value.ToString()); - } - if (Optional.IsDefined(TurnDetection)) - { - writer.WritePropertyName("turn_detection"u8); - writer.WriteObjectValue(TurnDetection, options); - } - if (Optional.IsDefined(InputAudioNoiseReduction)) - { - writer.WritePropertyName("input_audio_noise_reduction"u8); - writer.WriteObjectValue(InputAudioNoiseReduction, options); - } - if (Optional.IsDefined(InputAudioEchoCancellation)) - { - writer.WritePropertyName("input_audio_echo_cancellation"u8); - writer.WriteObjectValue(InputAudioEchoCancellation, options); - } - if (Optional.IsDefined(Avatar)) - { - writer.WritePropertyName("avatar"u8); - writer.WriteObjectValue(Avatar, options); - } - if (Optional.IsDefined(InputAudioTranscription)) - { - writer.WritePropertyName("input_audio_transcription"u8); - writer.WriteObjectValue(InputAudioTranscription, options); - } - if (Optional.IsCollectionDefined(OutputAudioTimestampTypes)) - { - writer.WritePropertyName("output_audio_timestamp_types"u8); - writer.WriteStartArray(); - foreach (AudioTimestampType item in OutputAudioTimestampTypes) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (VoiceLiveToolDefinition item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Temperature)) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - if (Optional.IsDefined(_serviceVoice)) - { - writer.WritePropertyName("voice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_serviceVoice); -#else - using (JsonDocument document = JsonDocument.Parse(_serviceVoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(_maxResponseOutputTokens)) - { - writer.WritePropertyName("max_response_output_tokens"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_maxResponseOutputTokens); -#else - using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(_toolChoice)) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(_toolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(_toolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - 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. - RequestSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual RequestSession 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(RequestSession)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequestSession(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static RequestSession DeserializeRequestSession(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string model = default; - IList modalities = default; - AnimationOptions animation = default; - string instructions = default; - InputAudio inputAudio = default; - int? inputAudioSamplingRate = default; - AudioFormat? inputAudioFormat = default; - AudioFormat? outputAudioFormat = default; - TurnDetection turnDetection = default; - AudioNoiseReduction inputAudioNoiseReduction = default; - AudioEchoCancellation inputAudioEchoCancellation = default; - AvatarConfig avatar = default; - AudioInputTranscriptionSettings inputAudioTranscription = default; - IList outputAudioTimestampTypes = default; - IList tools = default; - float? temperature = default; - BinaryData serviceVoice = default; - BinaryData maxResponseOutputTokens = default; - BinaryData toolChoice = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("model"u8)) - { - model = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("modalities"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new InputModality(item.GetString())); - } - modalities = array; - continue; - } - if (prop.NameEquals("animation"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - animation = AnimationOptions.DeserializeAnimationOptions(prop.Value, options); - continue; - } - if (prop.NameEquals("instructions"u8)) - { - instructions = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("input_audio"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudio = InputAudio.DeserializeInputAudio(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_sampling_rate"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioSamplingRate = prop.Value.GetInt32(); - continue; - } - if (prop.NameEquals("input_audio_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioFormat = new AudioFormat(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("output_audio_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputAudioFormat = new AudioFormat(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("turn_detection"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - turnDetection = null; - continue; - } - turnDetection = TurnDetection.DeserializeTurnDetection(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_noise_reduction"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioNoiseReduction = AudioNoiseReduction.DeserializeAudioNoiseReduction(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_echo_cancellation"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioEchoCancellation = AudioEchoCancellation.DeserializeAudioEchoCancellation(prop.Value, options); - continue; - } - if (prop.NameEquals("avatar"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - avatar = AvatarConfig.DeserializeAvatarConfig(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_transcription"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioTranscription = AudioInputTranscriptionSettings.DeserializeAudioInputTranscriptionSettings(prop.Value, options); - continue; - } - if (prop.NameEquals("output_audio_timestamp_types"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new AudioTimestampType(item.GetString())); - } - outputAudioTimestampTypes = array; - continue; - } - if (prop.NameEquals("tools"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(VoiceLiveToolDefinition.DeserializeVoiceLiveToolDefinition(item, options)); - } - tools = array; - continue; - } - if (prop.NameEquals("temperature"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - temperature = prop.Value.GetSingle(); - continue; - } - if (prop.NameEquals("voice"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceVoice = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("max_response_output_tokens"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("tool_choice"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - toolChoice = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new RequestSession( - model, - modalities ?? new ChangeTrackingList(), - animation, - instructions, - inputAudio, - inputAudioSamplingRate, - inputAudioFormat, - outputAudioFormat, - turnDetection, - inputAudioNoiseReduction, - inputAudioEchoCancellation, - avatar, - inputAudioTranscription, - outputAudioTimestampTypes ?? new ChangeTrackingList(), - tools ?? new ChangeTrackingList(), - temperature, - serviceVoice, - maxResponseOutputTokens, - toolChoice, - 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, AzureAIVoiceLiveContext.Default); - default: - throw new FormatException($"The model {nameof(RequestSession)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - RequestSession IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual RequestSession 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 DeserializeRequestSession(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RequestSession)} 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/ai/Azure.AI.VoiceLive/src/Generated/RequestSession.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestSession.cs deleted file mode 100644 index 31e5cd5530c5..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestSession.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.VoiceLive -{ - /// The RequestSession. - public partial class RequestSession - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - public RequestSession() - { - Modalities = new ChangeTrackingList(); - OutputAudioTimestampTypes = new ChangeTrackingList(); - Tools = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal RequestSession(string model, IList modalities, AnimationOptions animation, string instructions, InputAudio inputAudio, int? inputAudioSamplingRate, AudioFormat? inputAudioFormat, AudioFormat? outputAudioFormat, TurnDetection turnDetection, AudioNoiseReduction inputAudioNoiseReduction, AudioEchoCancellation inputAudioEchoCancellation, AvatarConfig avatar, AudioInputTranscriptionSettings inputAudioTranscription, IList outputAudioTimestampTypes, IList tools, float? temperature, BinaryData serviceVoice, BinaryData maxResponseOutputTokens, BinaryData toolChoice, IDictionary additionalBinaryDataProperties) - { - Model = model; - Modalities = modalities; - Animation = animation; - Instructions = instructions; - InputAudio = inputAudio; - InputAudioSamplingRate = inputAudioSamplingRate; - InputAudioFormat = inputAudioFormat; - OutputAudioFormat = outputAudioFormat; - TurnDetection = turnDetection; - InputAudioNoiseReduction = inputAudioNoiseReduction; - InputAudioEchoCancellation = inputAudioEchoCancellation; - Avatar = avatar; - InputAudioTranscription = inputAudioTranscription; - OutputAudioTimestampTypes = outputAudioTimestampTypes; - Tools = tools; - Temperature = temperature; - _serviceVoice = serviceVoice; - _maxResponseOutputTokens = maxResponseOutputTokens; - _toolChoice = toolChoice; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// Gets or sets the Model. - public string Model { get; set; } - - /// Gets the Modalities. - public IList Modalities { get; } - - /// Gets or sets the Animation. - public AnimationOptions Animation { get; set; } - - /// Gets or sets the Instructions. - public string Instructions { get; set; } - - /// Gets or sets the InputAudio. - public InputAudio InputAudio { get; set; } - - /// Gets or sets the InputAudioSamplingRate. - public int? InputAudioSamplingRate { get; set; } - - /// Gets or sets the InputAudioFormat. - public AudioFormat? InputAudioFormat { get; set; } - - /// Gets or sets the OutputAudioFormat. - public AudioFormat? OutputAudioFormat { get; set; } - - /// Gets or sets the TurnDetection. - public TurnDetection TurnDetection { get; set; } - - /// Gets or sets the InputAudioNoiseReduction. - public AudioNoiseReduction InputAudioNoiseReduction { get; set; } - - /// Gets or sets the InputAudioEchoCancellation. - public AudioEchoCancellation InputAudioEchoCancellation { get; set; } - - /// Gets or sets the Avatar. - public AvatarConfig Avatar { get; set; } - - /// Gets or sets the InputAudioTranscription. - public AudioInputTranscriptionSettings InputAudioTranscription { get; set; } - - /// Gets the OutputAudioTimestampTypes. - public IList OutputAudioTimestampTypes { get; } - - /// Gets the Tools. - public IList Tools { get; } - - /// Gets or sets the Temperature. - public float? Temperature { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentConfig.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentConfig.Serialization.cs deleted file mode 100644 index 80abd429fcc4..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentConfig.Serialization.cs +++ /dev/null @@ -1,183 +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; - -namespace Azure.AI.VoiceLive -{ - /// The RespondingAgentConfig. - public partial class RespondingAgentConfig : IJsonModel - { - /// Initializes a new instance of for deserialization. - internal RespondingAgentConfig() - { - } - - /// 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(RespondingAgentConfig)} does not support writing '{format}' format."); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("agent_id"u8); - writer.WriteStringValue(AgentId); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - 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. - RespondingAgentConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual RespondingAgentConfig 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(RespondingAgentConfig)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRespondingAgentConfig(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static RespondingAgentConfig DeserializeRespondingAgentConfig(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string @type = default; - string name = default; - string description = default; - string agentId = default; - string threadId = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("description"u8)) - { - description = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("agent_id"u8)) - { - agentId = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("thread_id"u8)) - { - threadId = prop.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new RespondingAgentConfig( - @type, - name, - description, - agentId, - threadId, - 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, AzureAIVoiceLiveContext.Default); - default: - throw new FormatException($"The model {nameof(RespondingAgentConfig)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - RespondingAgentConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual RespondingAgentConfig 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 DeserializeRespondingAgentConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RespondingAgentConfig)} 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/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentConfig.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentConfig.cs deleted file mode 100644 index e960e5162162..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentConfig.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.VoiceLive -{ - /// The RespondingAgentConfig. - public partial class RespondingAgentConfig - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - /// - /// - /// - internal RespondingAgentConfig(string name, string agentId, string threadId) - { - Name = name; - AgentId = agentId; - ThreadId = threadId; - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal RespondingAgentConfig(string @type, string name, string description, string agentId, string threadId, IDictionary additionalBinaryDataProperties) - { - Type = @type; - Name = name; - Description = description; - AgentId = agentId; - ThreadId = threadId; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// Gets the Type. - public string Type { get; } = "agent"; - - /// Gets the Name. - public string Name { get; } - - /// Gets the Description. - public string Description { get; } - - /// Gets the AgentId. - public string AgentId { get; } - - /// Gets the ThreadId. - public string ThreadId { get; } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs new file mode 100644 index 000000000000..bc854eb3fba8 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs @@ -0,0 +1,183 @@ +// 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; + +namespace Azure.AI.VoiceLive +{ + /// The RespondingAgentOptions. + public partial class RespondingAgentOptions : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RespondingAgentOptions() + { + } + + /// 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(RespondingAgentOptions)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("agent_id"u8); + writer.WriteStringValue(AgentId); + writer.WritePropertyName("thread_id"u8); + writer.WriteStringValue(ThreadId); + 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. + RespondingAgentOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual RespondingAgentOptions 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(RespondingAgentOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRespondingAgentOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RespondingAgentOptions DeserializeRespondingAgentOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string @type = default; + string name = default; + string description = default; + string agentId = default; + string threadId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_id"u8)) + { + agentId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("thread_id"u8)) + { + threadId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new RespondingAgentOptions( + @type, + name, + description, + agentId, + threadId, + 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, AzureAIVoiceLiveContext.Default); + default: + throw new FormatException($"The model {nameof(RespondingAgentOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + RespondingAgentOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual RespondingAgentOptions 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 DeserializeRespondingAgentOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RespondingAgentOptions)} 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/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.cs new file mode 100644 index 000000000000..8d35e457973b --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// The RespondingAgentOptions. + public partial class RespondingAgentOptions + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// + /// + /// + /// , or is null. + public RespondingAgentOptions(string name, string agentId, string threadId) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(agentId, nameof(agentId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + Name = name; + AgentId = agentId; + ThreadId = threadId; + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// Keeps track of any properties unknown to the library. + internal RespondingAgentOptions(string @type, string name, string description, string agentId, string threadId, IDictionary additionalBinaryDataProperties) + { + Type = @type; + Name = name; + Description = description; + AgentId = agentId; + ThreadId = threadId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets the Type. + public string Type { get; } = "agent"; + + /// Gets or sets the Name. + public string Name { get; set; } + + /// Gets or sets the Description. + public string Description { get; set; } + + /// Gets or sets the AgentId. + public string AgentId { get; set; } + + /// Gets or sets the ThreadId. + public string ThreadId { get; set; } + } +} 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 ddbab397154d..e07cb8584128 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.Serialization.cs @@ -81,7 +81,7 @@ internal static ResponseFunctionCallItem DeserializeResponseFunctionCallItem(Jso string name = default; string callId = default; string arguments = default; - ResponseItemStatus status = default; + VoiceLiveResponseItemStatus status = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -116,7 +116,7 @@ internal static ResponseFunctionCallItem DeserializeResponseFunctionCallItem(Jso } if (prop.NameEquals("status"u8)) { - status = new ResponseItemStatus(prop.Value.GetString()); + status = new VoiceLiveResponseItemStatus(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.cs index b9a019dee2e5..f549c1025e8f 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.cs @@ -18,7 +18,7 @@ public partial class ResponseFunctionCallItem : ResponseItem /// /// /// - internal ResponseFunctionCallItem(string name, string callId, string arguments, ResponseItemStatus status) : base(ItemType.FunctionCall) + internal ResponseFunctionCallItem(string name, string callId, string arguments, VoiceLiveResponseItemStatus status) : base(ItemType.FunctionCall) { Name = name; CallId = callId; @@ -35,7 +35,7 @@ internal ResponseFunctionCallItem(string name, string callId, string arguments, /// /// /// - internal ResponseFunctionCallItem(ItemType @type, string id, string @object, IDictionary additionalBinaryDataProperties, string name, string callId, string arguments, ResponseItemStatus status) : base(@type, id, @object, additionalBinaryDataProperties) + internal ResponseFunctionCallItem(ItemType @type, string id, string @object, IDictionary additionalBinaryDataProperties, string name, string callId, string arguments, VoiceLiveResponseItemStatus status) : base(@type, id, @object, additionalBinaryDataProperties) { Name = name; CallId = callId; @@ -53,6 +53,6 @@ internal ResponseFunctionCallItem(ItemType @type, string id, string @object, IDi public string Arguments { get; } /// Gets the Status. - public ResponseItemStatus Status { get; } + public VoiceLiveResponseItemStatus Status { get; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseItemStatus.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseItemStatus.cs deleted file mode 100644 index fdfe72d2d45c..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseItemStatus.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.VoiceLive -{ - /// - public readonly partial struct ResponseItemStatus : IEquatable - { - private readonly string _value; - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - private const string IncompleteValue = "incomplete"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public ResponseItemStatus(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// Gets the InProgress. - public static ResponseItemStatus InProgress { get; } = new ResponseItemStatus(InProgressValue); - - /// Gets the Completed. - public static ResponseItemStatus Completed { get; } = new ResponseItemStatus(CompletedValue); - - /// Gets the Incomplete. - public static ResponseItemStatus Incomplete { get; } = new ResponseItemStatus(IncompleteValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ResponseItemStatus left, ResponseItemStatus 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 !=(ResponseItemStatus left, ResponseItemStatus right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ResponseItemStatus(string value) => new ResponseItemStatus(value); - - /// Converts a string to a . - /// The value. - public static implicit operator ResponseItemStatus?(string value) => value == null ? null : new ResponseItemStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ResponseItemStatus other && Equals(other); - - /// - public bool Equals(ResponseItemStatus 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/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.Serialization.cs index 9b328c351c93..b17a3369f1a0 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.Serialization.cs @@ -83,7 +83,7 @@ internal static ResponseMessageItem DeserializeResponseMessageItem(JsonElement e IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); ResponseMessageRole role = default; IList content = default; - ResponseItemStatus status = default; + VoiceLiveResponseItemStatus status = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -118,7 +118,7 @@ internal static ResponseMessageItem DeserializeResponseMessageItem(JsonElement e } if (prop.NameEquals("status"u8)) { - status = new ResponseItemStatus(prop.Value.GetString()); + status = new VoiceLiveResponseItemStatus(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.cs index 9926f98608a8..b45e7edccef9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseMessageItem.cs @@ -18,7 +18,7 @@ public partial class ResponseMessageItem : ResponseItem /// /// /// - internal ResponseMessageItem(ResponseMessageRole role, IEnumerable content, ResponseItemStatus status) : base(ItemType.Message) + internal ResponseMessageItem(ResponseMessageRole role, IEnumerable content, VoiceLiveResponseItemStatus status) : base(ItemType.Message) { Role = role; Content = content.ToList(); @@ -33,7 +33,7 @@ internal ResponseMessageItem(ResponseMessageRole role, IEnumerable /// /// - internal ResponseMessageItem(ItemType @type, string id, string @object, IDictionary additionalBinaryDataProperties, ResponseMessageRole role, IList content, ResponseItemStatus status) : base(@type, id, @object, additionalBinaryDataProperties) + internal ResponseMessageItem(ItemType @type, string id, string @object, IDictionary additionalBinaryDataProperties, ResponseMessageRole role, IList content, VoiceLiveResponseItemStatus status) : base(@type, id, @object, additionalBinaryDataProperties) { Role = role; Content = content; @@ -47,6 +47,6 @@ internal ResponseMessageItem(ItemType @type, string id, string @object, IDiction public IList Content { get; } /// Gets the Status. - public ResponseItemStatus Status { get; } + public VoiceLiveResponseItemStatus Status { get; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseOutputAudioFormat.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseOutputAudioFormat.Serialization.cs deleted file mode 100644 index b2b85c846550..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseOutputAudioFormat.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.AI.VoiceLive -{ - internal static partial class ResponseOutputAudioFormatExtensions - { - /// The value to serialize. - public static string ToSerialString(this ResponseOutputAudioFormat value) => value switch - { - ResponseOutputAudioFormat.Pcm16 => "pcm16", - ResponseOutputAudioFormat.G711Ulaw => "g711_ulaw", - ResponseOutputAudioFormat.G711Alaw => "g711_alaw", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResponseOutputAudioFormat value.") - }; - - /// The value to deserialize. - public static ResponseOutputAudioFormat ToResponseOutputAudioFormat(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "pcm16")) - { - return ResponseOutputAudioFormat.Pcm16; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "g711_ulaw")) - { - return ResponseOutputAudioFormat.G711Ulaw; - } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "g711_alaw")) - { - return ResponseOutputAudioFormat.G711Alaw; - } - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResponseOutputAudioFormat value."); - } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseOutputAudioFormat.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseOutputAudioFormat.cs deleted file mode 100644 index 62e4bcb1f499..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseOutputAudioFormat.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.VoiceLive -{ - /// - public enum ResponseOutputAudioFormat - { - /// Pcm16. - Pcm16, - /// G711Ulaw. - G711Ulaw, - /// G711Alaw. - G711Alaw - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseSession.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseSession.Serialization.cs deleted file mode 100644 index a82667e91899..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseSession.Serialization.cs +++ /dev/null @@ -1,507 +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; - -namespace Azure.AI.VoiceLive -{ - /// The ResponseSession. - public partial class ResponseSession : 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(ResponseSession)} does not support writing '{format}' format."); - } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (Optional.IsCollectionDefined(Modalities)) - { - writer.WritePropertyName("modalities"u8); - writer.WriteStartArray(); - foreach (InputModality item in Modalities) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Instructions)) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - if (Optional.IsDefined(Animation)) - { - writer.WritePropertyName("animation"u8); - writer.WriteObjectValue(Animation, options); - } - if (Optional.IsDefined(VoiceInternal)) - { - writer.WritePropertyName("voice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(VoiceInternal); -#else - using (JsonDocument document = JsonDocument.Parse(VoiceInternal)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(InputAudio)) - { - writer.WritePropertyName("input_audio"u8); - writer.WriteObjectValue(InputAudio, options); - } - if (Optional.IsDefined(InputAudioFormat)) - { - writer.WritePropertyName("input_audio_format"u8); - writer.WriteStringValue(InputAudioFormat.Value.ToString()); - } - if (Optional.IsDefined(OutputAudioFormat)) - { - writer.WritePropertyName("output_audio_format"u8); - writer.WriteStringValue(OutputAudioFormat.Value.ToString()); - } - if (Optional.IsDefined(InputAudioSamplingRate)) - { - writer.WritePropertyName("input_audio_sampling_rate"u8); - writer.WriteNumberValue(InputAudioSamplingRate.Value); - } - if (Optional.IsDefined(TurnDetection)) - { - writer.WritePropertyName("turn_detection"u8); - writer.WriteObjectValue(TurnDetection, options); - } - if (Optional.IsDefined(InputAudioNoiseReduction)) - { - writer.WritePropertyName("input_audio_noise_reduction"u8); - writer.WriteObjectValue(InputAudioNoiseReduction, options); - } - if (Optional.IsDefined(InputAudioEchoCancellation)) - { - writer.WritePropertyName("input_audio_echo_cancellation"u8); - writer.WriteObjectValue(InputAudioEchoCancellation, options); - } - if (Optional.IsDefined(Avatar)) - { - writer.WritePropertyName("avatar"u8); - writer.WriteObjectValue(Avatar, options); - } - if (Optional.IsDefined(InputAudioTranscription)) - { - writer.WritePropertyName("input_audio_transcription"u8); - writer.WriteObjectValue(InputAudioTranscription, options); - } - if (Optional.IsCollectionDefined(OutputAudioTimestampTypes)) - { - writer.WritePropertyName("output_audio_timestamp_types"u8); - writer.WriteStartArray(); - foreach (AudioTimestampType item in OutputAudioTimestampTypes) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (VoiceLiveToolDefinition item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolChoice)) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(Temperature)) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - if (Optional.IsDefined(MaxResponseOutputTokens)) - { - writer.WritePropertyName("max_response_output_tokens"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(MaxResponseOutputTokens); -#else - using (JsonDocument document = JsonDocument.Parse(MaxResponseOutputTokens)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(Agent)) - { - writer.WritePropertyName("agent"u8); - writer.WriteObjectValue(Agent, 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. - ResponseSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual ResponseSession 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(ResponseSession)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeResponseSession(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static ResponseSession DeserializeResponseSession(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string model = default; - IList modalities = default; - string instructions = default; - AnimationOptions animation = default; - BinaryData voiceInternal = default; - InputAudio inputAudio = default; - AudioFormat? inputAudioFormat = default; - AudioFormat? outputAudioFormat = default; - int? inputAudioSamplingRate = default; - TurnDetection turnDetection = default; - AudioNoiseReduction inputAudioNoiseReduction = default; - AudioEchoCancellation inputAudioEchoCancellation = default; - AvatarConfig avatar = default; - AudioInputTranscriptionSettings inputAudioTranscription = default; - IList outputAudioTimestampTypes = default; - IList tools = default; - BinaryData toolChoice = default; - float? temperature = default; - BinaryData maxResponseOutputTokens = default; - RespondingAgentConfig agent = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("id"u8)) - { - id = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("model"u8)) - { - model = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("modalities"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new InputModality(item.GetString())); - } - modalities = array; - continue; - } - if (prop.NameEquals("instructions"u8)) - { - instructions = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("animation"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - animation = AnimationOptions.DeserializeAnimationOptions(prop.Value, options); - continue; - } - if (prop.NameEquals("voice"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - voiceInternal = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("input_audio"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudio = InputAudio.DeserializeInputAudio(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioFormat = new AudioFormat(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("output_audio_format"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outputAudioFormat = new AudioFormat(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("input_audio_sampling_rate"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioSamplingRate = prop.Value.GetInt32(); - continue; - } - if (prop.NameEquals("turn_detection"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - turnDetection = TurnDetection.DeserializeTurnDetection(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_noise_reduction"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioNoiseReduction = AudioNoiseReduction.DeserializeAudioNoiseReduction(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_echo_cancellation"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inputAudioEchoCancellation = AudioEchoCancellation.DeserializeAudioEchoCancellation(prop.Value, options); - continue; - } - if (prop.NameEquals("avatar"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - avatar = AvatarConfig.DeserializeAvatarConfig(prop.Value, options); - continue; - } - if (prop.NameEquals("input_audio_transcription"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - inputAudioTranscription = null; - continue; - } - inputAudioTranscription = AudioInputTranscriptionSettings.DeserializeAudioInputTranscriptionSettings(prop.Value, options); - continue; - } - if (prop.NameEquals("output_audio_timestamp_types"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(new AudioTimestampType(item.GetString())); - } - outputAudioTimestampTypes = array; - continue; - } - if (prop.NameEquals("tools"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(VoiceLiveToolDefinition.DeserializeVoiceLiveToolDefinition(item, options)); - } - tools = array; - continue; - } - if (prop.NameEquals("tool_choice"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - toolChoice = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("temperature"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - temperature = prop.Value.GetSingle(); - continue; - } - if (prop.NameEquals("max_response_output_tokens"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - maxResponseOutputTokens = null; - continue; - } - maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); - continue; - } - if (prop.NameEquals("agent"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - agent = RespondingAgentConfig.DeserializeRespondingAgentConfig(prop.Value, options); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ResponseSession( - id, - model, - modalities ?? new ChangeTrackingList(), - instructions, - animation, - voiceInternal, - inputAudio, - inputAudioFormat, - outputAudioFormat, - inputAudioSamplingRate, - turnDetection, - inputAudioNoiseReduction, - inputAudioEchoCancellation, - avatar, - inputAudioTranscription, - outputAudioTimestampTypes ?? new ChangeTrackingList(), - tools ?? new ChangeTrackingList(), - toolChoice, - temperature, - maxResponseOutputTokens, - agent, - 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, AzureAIVoiceLiveContext.Default); - default: - throw new FormatException($"The model {nameof(ResponseSession)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - ResponseSession IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual ResponseSession 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 DeserializeResponseSession(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ResponseSession)} 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/ai/Azure.AI.VoiceLive/src/Generated/ResponseSession.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseSession.cs deleted file mode 100644 index 7fd6615848eb..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseSession.cs +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.VoiceLive -{ - /// The ResponseSession. - public partial class ResponseSession - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - internal ResponseSession() - { - Modalities = new ChangeTrackingList(); - OutputAudioTimestampTypes = new ChangeTrackingList(); - Tools = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// Gets the Voice. - /// To assign an object to this property use . To assign an already formatted json string to this property use . - /// Supported types: - /// . . . . . - /// 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" }. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal ResponseSession(string id, string model, IList modalities, string instructions, AnimationOptions animation, BinaryData voiceInternal, InputAudio inputAudio, AudioFormat? inputAudioFormat, AudioFormat? outputAudioFormat, int? inputAudioSamplingRate, TurnDetection turnDetection, AudioNoiseReduction inputAudioNoiseReduction, AudioEchoCancellation inputAudioEchoCancellation, AvatarConfig avatar, AudioInputTranscriptionSettings inputAudioTranscription, IList outputAudioTimestampTypes, IList tools, BinaryData toolChoice, float? temperature, BinaryData maxResponseOutputTokens, RespondingAgentConfig agent, IDictionary additionalBinaryDataProperties) - { - Id = id; - Model = model; - Modalities = modalities; - Instructions = instructions; - Animation = animation; - VoiceInternal = voiceInternal; - InputAudio = inputAudio; - InputAudioFormat = inputAudioFormat; - OutputAudioFormat = outputAudioFormat; - InputAudioSamplingRate = inputAudioSamplingRate; - TurnDetection = turnDetection; - InputAudioNoiseReduction = inputAudioNoiseReduction; - InputAudioEchoCancellation = inputAudioEchoCancellation; - Avatar = avatar; - InputAudioTranscription = inputAudioTranscription; - OutputAudioTimestampTypes = outputAudioTimestampTypes; - Tools = tools; - ToolChoice = toolChoice; - Temperature = temperature; - MaxResponseOutputTokens = maxResponseOutputTokens; - Agent = agent; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// Gets the Id. - public string Id { get; } - - /// Gets the Model. - public string Model { get; } - - /// Gets the Modalities. - public IList Modalities { get; } - - /// Gets the Instructions. - public string Instructions { get; } - - /// Gets the Animation. - public AnimationOptions Animation { get; } - - /// Gets the InputAudio. - public InputAudio InputAudio { get; } - - /// Gets the InputAudioFormat. - public AudioFormat? InputAudioFormat { get; } - - /// Gets the OutputAudioFormat. - public AudioFormat? OutputAudioFormat { get; } - - /// Gets the InputAudioSamplingRate. - public int? InputAudioSamplingRate { get; } - - /// Gets the TurnDetection. - public TurnDetection TurnDetection { get; } - - /// Gets the InputAudioNoiseReduction. - public AudioNoiseReduction InputAudioNoiseReduction { get; } - - /// Gets the InputAudioEchoCancellation. - public AudioEchoCancellation InputAudioEchoCancellation { get; } - - /// Gets the Avatar. - public AvatarConfig Avatar { get; } - - /// Gets the InputAudioTranscription. - public AudioInputTranscriptionSettings InputAudioTranscription { get; } - - /// Gets the OutputAudioTimestampTypes. - public IList OutputAudioTimestampTypes { get; } - - /// Gets the Tools. - public IList Tools { get; } - - /// - /// Gets the ToolChoice. - /// To assign an object to this property use . - /// To assign an already formatted json string to this property use . - /// - /// - /// Supported types: - /// - /// - /// . - /// - /// - /// . - /// - /// - /// - /// - /// - /// 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" }. - /// - /// - /// - /// - public BinaryData ToolChoice { get; } - - /// Gets the Temperature. - public float? Temperature { get; } - - /// - /// Gets the MaxResponseOutputTokens. - /// To assign an object to this property use . - /// To assign an already formatted json string to this property use . - /// - /// - /// Supported types: - /// - /// - /// . - /// - /// - /// "inf". - /// - /// - /// - /// - /// - /// 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" }. - /// - /// - /// - /// - public BinaryData MaxResponseOutputTokens { get; } - - /// Gets the Agent. - public RespondingAgentConfig Agent { get; } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerEventErrorError.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerEventErrorError.Serialization.cs deleted file mode 100644 index 2f72458a00ae..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerEventErrorError.Serialization.cs +++ /dev/null @@ -1,204 +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; - -namespace Azure.AI.VoiceLive -{ - /// The ServerEventErrorError. - public partial class ServerEventErrorError : IJsonModel - { - /// Initializes a new instance of for deserialization. - internal ServerEventErrorError() - { - } - - /// 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(ServerEventErrorError)} does not support writing '{format}' format."); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - if (Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - } - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - if (Optional.IsDefined(Param)) - { - writer.WritePropertyName("param"u8); - writer.WriteStringValue(Param); - } - if (Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } - 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. - ServerEventErrorError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual ServerEventErrorError 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(ServerEventErrorError)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerEventErrorError(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static ServerEventErrorError DeserializeServerEventErrorError(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string @type = default; - string code = default; - string message = default; - string @param = default; - string eventId = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("type"u8)) - { - @type = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("code"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - code = null; - continue; - } - code = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("message"u8)) - { - message = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("param"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - @param = null; - continue; - } - @param = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("event_id"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - eventId = null; - continue; - } - eventId = prop.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new ServerEventErrorError( - @type, - code, - message, - @param, - eventId, - 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, AzureAIVoiceLiveContext.Default); - default: - throw new FormatException($"The model {nameof(ServerEventErrorError)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - ServerEventErrorError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual ServerEventErrorError 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 DeserializeServerEventErrorError(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerEventErrorError)} 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/ai/Azure.AI.VoiceLive/src/Generated/ServerEventErrorError.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerEventErrorError.cs deleted file mode 100644 index fd5938fc396d..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerEventErrorError.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.VoiceLive -{ - /// The ServerEventErrorError. - public partial class ServerEventErrorError - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - /// The type of error (e.g., "invalid_request_error", "server_error"). - /// A human-readable error message. - internal ServerEventErrorError(string @type, string message) - { - Type = @type; - Message = message; - } - - /// Initializes a new instance of . - /// The type of error (e.g., "invalid_request_error", "server_error"). - /// Error code, if any. - /// A human-readable error message. - /// Parameter related to the error, if any. - /// The event_id of the client event that caused the error, if applicable. - /// Keeps track of any properties unknown to the library. - internal ServerEventErrorError(string @type, string code, string message, string @param, string eventId, IDictionary additionalBinaryDataProperties) - { - Type = @type; - Code = code; - Message = message; - Param = @param; - EventId = eventId; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// The type of error (e.g., "invalid_request_error", "server_error"). - public string Type { get; } - - /// Error code, if any. - public string Code { get; } - - /// A human-readable error message. - public string Message { get; } - - /// Parameter related to the error, if any. - public string Param { get; } - - /// The event_id of the client event that caused the error, if applicable. - public string EventId { get; } - } -} 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 65ed50a52a7d..5fb5568e71a5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.Serialization.cs @@ -75,7 +75,7 @@ internal static SessionUpdateError DeserializeSessionUpdateError(JsonElement ele ServerEventType @type = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - ServerEventErrorError error = default; + SessionUpdateErrorDetails error = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -90,7 +90,7 @@ internal static SessionUpdateError DeserializeSessionUpdateError(JsonElement ele } if (prop.NameEquals("error"u8)) { - error = ServerEventErrorError.DeserializeServerEventErrorError(prop.Value, options); + error = SessionUpdateErrorDetails.DeserializeSessionUpdateErrorDetails(prop.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.cs index b8cbd4e00ac5..efd15a836c55 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.cs @@ -19,7 +19,7 @@ public partial class SessionUpdateError : SessionUpdate { /// Initializes a new instance of . /// Details of the error. - internal SessionUpdateError(ServerEventErrorError error) : base(ServerEventType.Error) + internal SessionUpdateError(SessionUpdateErrorDetails error) : base(ServerEventType.Error) { Error = error; } @@ -29,12 +29,12 @@ internal SessionUpdateError(ServerEventErrorError error) : base(ServerEventType. /// /// Keeps track of any properties unknown to the library. /// Details of the error. - internal SessionUpdateError(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, ServerEventErrorError error) : base(@type, eventId, additionalBinaryDataProperties) + internal SessionUpdateError(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, SessionUpdateErrorDetails error) : base(@type, eventId, additionalBinaryDataProperties) { Error = error; } /// Details of the error. - public ServerEventErrorError Error { get; } + public SessionUpdateErrorDetails Error { get; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs new file mode 100644 index 000000000000..f5f2f5308c0b --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs @@ -0,0 +1,204 @@ +// 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; + +namespace Azure.AI.VoiceLive +{ + /// Details of the error. + public partial class SessionUpdateErrorDetails : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal SessionUpdateErrorDetails() + { + } + + /// 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(SessionUpdateErrorDetails)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(Param)) + { + writer.WritePropertyName("param"u8); + writer.WriteStringValue(Param); + } + if (Optional.IsDefined(EventId)) + { + writer.WritePropertyName("event_id"u8); + writer.WriteStringValue(EventId); + } + 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. + SessionUpdateErrorDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SessionUpdateErrorDetails 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(SessionUpdateErrorDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSessionUpdateErrorDetails(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SessionUpdateErrorDetails DeserializeSessionUpdateErrorDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string @type = default; + string code = default; + string message = default; + string @param = default; + string eventId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("code"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + code = null; + continue; + } + code = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("message"u8)) + { + message = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("param"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + @param = null; + continue; + } + @param = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("event_id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + eventId = null; + continue; + } + eventId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SessionUpdateErrorDetails( + @type, + code, + message, + @param, + eventId, + 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, AzureAIVoiceLiveContext.Default); + default: + throw new FormatException($"The model {nameof(SessionUpdateErrorDetails)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SessionUpdateErrorDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SessionUpdateErrorDetails 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 DeserializeSessionUpdateErrorDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SessionUpdateErrorDetails)} 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/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.cs new file mode 100644 index 000000000000..e7421710cd73 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// Details of the error. + public partial class SessionUpdateErrorDetails + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The type of error (e.g., "invalid_request_error", "server_error"). + /// A human-readable error message. + internal SessionUpdateErrorDetails(string @type, string message) + { + Type = @type; + Message = message; + } + + /// Initializes a new instance of . + /// The type of error (e.g., "invalid_request_error", "server_error"). + /// Error code, if any. + /// A human-readable error message. + /// Parameter related to the error, if any. + /// The event_id of the client event that caused the error, if applicable. + /// Keeps track of any properties unknown to the library. + internal SessionUpdateErrorDetails(string @type, string code, string message, string @param, string eventId, IDictionary additionalBinaryDataProperties) + { + Type = @type; + Code = code; + Message = message; + Param = @param; + EventId = eventId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The type of error (e.g., "invalid_request_error", "server_error"). + public string Type { get; } + + /// Error code, if any. + public string Code { get; } + + /// A human-readable error message. + public string Message { get; } + + /// Parameter related to the error, if any. + public string Param { get; } + + /// The event_id of the client event that caused the error, if applicable. + public string EventId { get; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.cs index e78f9d6fa236..609d2574aac5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.cs @@ -25,12 +25,7 @@ namespace Azure.AI.VoiceLive public partial class SessionUpdateInputAudioBufferSpeechStarted : SessionUpdate { /// Initializes a new instance of . - /// - /// Milliseconds from the start of all audio written to the buffer during the - /// session when speech was first detected. This will correspond to the - /// beginning of audio sent to the model, and thus includes the - /// `prefix_padding_ms` configured in the Session. - /// + /// /// The ID of the user message item that will be created when speech stops. internal SessionUpdateInputAudioBufferSpeechStarted(int audioStartMs, string itemId) : base(ServerEventType.InputAudioBufferSpeechStarted) { @@ -42,12 +37,7 @@ internal SessionUpdateInputAudioBufferSpeechStarted(int audioStartMs, string ite /// The type of event. /// /// Keeps track of any properties unknown to the library. - /// - /// Milliseconds from the start of all audio written to the buffer during the - /// session when speech was first detected. This will correspond to the - /// beginning of audio sent to the model, and thus includes the - /// `prefix_padding_ms` configured in the Session. - /// + /// /// The ID of the user message item that will be created when speech stops. internal SessionUpdateInputAudioBufferSpeechStarted(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, int audioStartMs, string itemId) : base(@type, eventId, additionalBinaryDataProperties) { @@ -55,14 +45,6 @@ internal SessionUpdateInputAudioBufferSpeechStarted(ServerEventType @type, strin ItemId = itemId; } - /// - /// Milliseconds from the start of all audio written to the buffer during the - /// session when speech was first detected. This will correspond to the - /// beginning of audio sent to the model, and thus includes the - /// `prefix_padding_ms` configured in the Session. - /// - public int AudioStartMs { get; } - /// The ID of the user message item that will be created when speech stops. public string ItemId { get; } } 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 f0aa8551e5f1..263859a4d03e 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDone.Serialization.cs @@ -9,7 +9,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure; namespace Azure.AI.VoiceLive { @@ -168,13 +167,5 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// The to deserialize the from. - public static explicit operator SessionUpdateResponseAnimationVisemeDone(Response result) - { - using Response response = result; - using JsonDocument document = JsonDocument.Parse(response.Content); - return DeserializeSessionUpdateResponseAnimationVisemeDone(document.RootElement, ModelSerializationExtensions.WireOptions); - } } } 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 f6f8ea1e7d9c..b4d603892382 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.Serialization.cs @@ -49,11 +49,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNumberValue(ContentIndex); writer.WritePropertyName("delta"u8); writer.WriteBase64StringValue(Delta.ToArray(), "D"); - if (Optional.IsDefined(EventId)) - { - writer.WritePropertyName("event_id"u8); - writer.WriteStringValue(EventId); - } } /// The JSON reader. @@ -82,13 +77,13 @@ internal static SessionUpdateResponseAudioDelta DeserializeSessionUpdateResponse return null; } ServerEventType @type = default; + string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string responseId = default; string itemId = default; int outputIndex = default; int contentIndex = default; BinaryData delta = default; - string eventId = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -96,6 +91,11 @@ internal static SessionUpdateResponseAudioDelta DeserializeSessionUpdateResponse @type = new ServerEventType(prop.Value.GetString()); continue; } + if (prop.NameEquals("event_id"u8)) + { + eventId = prop.Value.GetString(); + continue; + } if (prop.NameEquals("response_id"u8)) { responseId = prop.Value.GetString(); @@ -121,11 +121,6 @@ internal static SessionUpdateResponseAudioDelta DeserializeSessionUpdateResponse delta = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D")); continue; } - if (prop.NameEquals("event_id"u8)) - { - eventId = prop.Value.GetString(); - continue; - } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -133,13 +128,13 @@ internal static SessionUpdateResponseAudioDelta DeserializeSessionUpdateResponse } return new SessionUpdateResponseAudioDelta( @type, + eventId, additionalBinaryDataProperties, responseId, itemId, outputIndex, contentIndex, - delta, - eventId); + delta); } /// The client options for reading and writing models. diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.cs index 70fcdf12c554..c49a660ced38 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.cs @@ -30,14 +30,14 @@ internal SessionUpdateResponseAudioDelta(string responseId, string itemId, int o /// Initializes a new instance of . /// The type of event. + /// /// Keeps track of any properties unknown to the library. /// The ID of the response. /// The ID of the item. /// The index of the output item in the response. /// The index of the content part in the item's content array. /// Base64-encoded audio data delta. - /// - internal SessionUpdateResponseAudioDelta(ServerEventType @type, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta, string eventId) : base(@type, eventId, additionalBinaryDataProperties) + internal SessionUpdateResponseAudioDelta(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, string responseId, string itemId, int outputIndex, int contentIndex, BinaryData delta) : base(@type, eventId, additionalBinaryDataProperties) { ResponseId = responseId; ItemId = itemId; @@ -75,8 +75,5 @@ internal SessionUpdateResponseAudioDelta(ServerEventType @type, IDictionary /// public BinaryData Delta { get; } - - /// Gets the EventId. - public override string EventId { get; } } } 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 83e00d2e7254..aef6d99a33b5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.Serialization.cs @@ -75,7 +75,7 @@ internal static SessionUpdateSessionCreated DeserializeSessionUpdateSessionCreat ServerEventType @type = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - ResponseSession session = default; + VoiceLiveSessionResponse session = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -90,7 +90,7 @@ internal static SessionUpdateSessionCreated DeserializeSessionUpdateSessionCreat } if (prop.NameEquals("session"u8)) { - session = ResponseSession.DeserializeResponseSession(prop.Value, options); + session = VoiceLiveSessionResponse.DeserializeVoiceLiveSessionResponse(prop.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.cs index 7a3e2c7727fe..657ce1b24573 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.cs @@ -19,7 +19,7 @@ public partial class SessionUpdateSessionCreated : SessionUpdate { /// Initializes a new instance of . /// - internal SessionUpdateSessionCreated(ResponseSession session) : base(ServerEventType.SessionCreated) + internal SessionUpdateSessionCreated(VoiceLiveSessionResponse session) : base(ServerEventType.SessionCreated) { Session = session; } @@ -29,12 +29,12 @@ internal SessionUpdateSessionCreated(ResponseSession session) : base(ServerEvent /// /// Keeps track of any properties unknown to the library. /// - internal SessionUpdateSessionCreated(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, ResponseSession session) : base(@type, eventId, additionalBinaryDataProperties) + internal SessionUpdateSessionCreated(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, VoiceLiveSessionResponse session) : base(@type, eventId, additionalBinaryDataProperties) { Session = session; } /// Gets the Session. - public ResponseSession Session { get; } + public VoiceLiveSessionResponse Session { get; } } } 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 ee8c44102a5e..787b348d3989 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.Serialization.cs @@ -74,7 +74,7 @@ internal static SessionUpdateSessionUpdated DeserializeSessionUpdateSessionUpdat ServerEventType @type = default; string eventId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - ResponseSession session = default; + VoiceLiveSessionResponse session = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -89,7 +89,7 @@ internal static SessionUpdateSessionUpdated DeserializeSessionUpdateSessionUpdat } if (prop.NameEquals("session"u8)) { - session = ResponseSession.DeserializeResponseSession(prop.Value, options); + session = VoiceLiveSessionResponse.DeserializeVoiceLiveSessionResponse(prop.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.cs index 94dccedb25a3..dd7932caf9e3 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.cs @@ -18,7 +18,7 @@ public partial class SessionUpdateSessionUpdated : SessionUpdate { /// Initializes a new instance of . /// - internal SessionUpdateSessionUpdated(ResponseSession session) : base(ServerEventType.SessionUpdated) + internal SessionUpdateSessionUpdated(VoiceLiveSessionResponse session) : base(ServerEventType.SessionUpdated) { Session = session; } @@ -28,12 +28,12 @@ internal SessionUpdateSessionUpdated(ResponseSession session) : base(ServerEvent /// /// Keeps track of any properties unknown to the library. /// - internal SessionUpdateSessionUpdated(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, ResponseSession session) : base(@type, eventId, additionalBinaryDataProperties) + internal SessionUpdateSessionUpdated(ServerEventType @type, string eventId, IDictionary additionalBinaryDataProperties, VoiceLiveSessionResponse session) : base(@type, eventId, additionalBinaryDataProperties) { Session = session; } /// Gets the Session. - public ResponseSession Session { get; } + public VoiceLiveSessionResponse Session { get; } } } 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 9e27ce93cf16..acceeb9edf9e 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.Serialization.cs @@ -12,8 +12,7 @@ namespace Azure.AI.VoiceLive { - /// The representation of a voicelive tool_choice selecting a named function tool. - public partial class ToolChoiceFunctionObject : IJsonModel + internal partial class ToolChoiceFunctionObject : IJsonModel { /// Initializes a new instance of for deserialization. internal ToolChoiceFunctionObject() diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.cs index df01e8fb60ee..c2000649cd8a 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.cs @@ -10,8 +10,7 @@ namespace Azure.AI.VoiceLive { - /// The representation of a voicelive tool_choice selecting a named function tool. - public partial class ToolChoiceFunctionObject : ToolChoiceObject + internal partial class ToolChoiceFunctionObject : ToolChoiceObject { /// Initializes a new instance of . /// diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.Serialization.cs index 8032cdc13ebc..4a777976b926 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.AI.VoiceLive { /// The ToolChoiceFunctionObjectFunction. - public partial class ToolChoiceFunctionObjectFunction : IJsonModel + internal partial class ToolChoiceFunctionObjectFunction : IJsonModel { /// Initializes a new instance of for deserialization. internal ToolChoiceFunctionObjectFunction() diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.cs index 036e0ee7fc7b..918782cd9d6a 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObjectFunction.cs @@ -11,7 +11,7 @@ namespace Azure.AI.VoiceLive { /// The ToolChoiceFunctionObjectFunction. - public partial class ToolChoiceFunctionObjectFunction + internal partial class ToolChoiceFunctionObjectFunction { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; 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 b63f505d8774..f671b06e625e 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.Serialization.cs @@ -11,12 +11,8 @@ namespace Azure.AI.VoiceLive { - /// - /// A base representation for a voicelive tool_choice selecting a named tool. - /// Please note this is the abstract base class. The derived classes available for instantiation are: . - /// [PersistableModelProxy(typeof(UnknownToolChoiceObject))] - public abstract partial class ToolChoiceObject : IJsonModel + internal abstract partial class ToolChoiceObject : IJsonModel { /// Initializes a new instance of for deserialization. internal ToolChoiceObject() diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.cs index 4221e2b53cfb..a09066759681 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.cs @@ -10,11 +10,7 @@ namespace Azure.AI.VoiceLive { - /// - /// A base representation for a voicelive tool_choice selecting a named tool. - /// Please note this is the abstract base class. The derived classes available for instantiation are: . - /// - public abstract partial class ToolChoiceObject + internal abstract partial class ToolChoiceObject { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveClient.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveClient.cs index 25e1339e8cb0..b6c9320e1b35 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveClient.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveClient.cs @@ -115,11 +115,11 @@ internal virtual async Task ForceModelsAsync(string accept, RequestCon /// /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual Response ForceModels(string accept, BinaryData @event, CancellationToken cancellationToken = default) + internal virtual Response ForceModels(string accept, BinaryData @event, CancellationToken cancellationToken = default) { ForceModelsRequest spreadModel = new ForceModelsRequest(@event, null); Response result = ForceModels(accept, spreadModel, cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null); - return Response.FromValue((SessionUpdateResponseAnimationVisemeDone)result, result); + return Response.FromValue(result.Content, result); } /// ForceModels. @@ -127,11 +127,11 @@ internal virtual Response ForceModels( /// /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> ForceModelsAsync(string accept, BinaryData @event, CancellationToken cancellationToken = default) + internal virtual async Task> ForceModelsAsync(string accept, BinaryData @event, CancellationToken cancellationToken = default) { ForceModelsRequest spreadModel = new ForceModelsRequest(@event, null); Response result = await ForceModelsAsync(accept, spreadModel, cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null).ConfigureAwait(false); - return Response.FromValue((SessionUpdateResponseAnimationVisemeDone)result, result); + return Response.FromValue(result.Content, result); } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveModelFactory.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveModelFactory.cs index 5d3b5c63a00c..2eb26961e16e 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveModelFactory.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveModelFactory.cs @@ -14,7 +14,7 @@ namespace Azure.AI.VoiceLive /// A factory class for creating instances of the models for mocking. public static partial class VoiceLiveModelFactory { - /// The RequestSession. + /// The VoiceLiveSessionOptions. /// /// /// @@ -31,17 +31,18 @@ public static partial class VoiceLiveModelFactory /// /// /// - /// + /// + /// /// /// - /// A new instance for mocking. - public static RequestSession RequestSession(string model = default, IEnumerable modalities = default, AnimationOptions animation = default, string instructions = default, InputAudio inputAudio = default, int? inputAudioSamplingRate = default, AudioFormat? inputAudioFormat = default, AudioFormat? outputAudioFormat = default, TurnDetection turnDetection = default, AudioNoiseReduction inputAudioNoiseReduction = default, AudioEchoCancellation inputAudioEchoCancellation = default, AvatarConfig avatar = default, AudioInputTranscriptionSettings inputAudioTranscription = default, IEnumerable outputAudioTimestampTypes = default, IEnumerable tools = default, float? temperature = default, BinaryData serviceVoice = default, BinaryData maxResponseOutputTokens = default, BinaryData toolChoice = default) + /// A new instance for mocking. + public static VoiceLiveSessionOptions VoiceLiveSessionOptions(string model = default, IEnumerable modalities = default, AnimationOptions animation = default, string instructions = default, InputAudio inputAudio = default, int? inputAudioSamplingRate = default, AudioFormat? inputAudioFormat = default, AudioFormat? outputAudioFormat = default, TurnDetection turnDetection = default, AudioNoiseReduction inputAudioNoiseReduction = default, AudioEchoCancellation inputAudioEchoCancellation = default, AvatarConfiguration avatar = default, AudioInputTranscriptionSettings inputAudioTranscription = default, IEnumerable outputAudioTimestampTypes = default, IEnumerable tools = default, float? temperature = default, RespondingAgentOptions agent = default, BinaryData voiceInternal = default, BinaryData maxResponseOutputTokens = default, BinaryData toolChoice = default) { modalities ??= new ChangeTrackingList(); outputAudioTimestampTypes ??= new ChangeTrackingList(); tools ??= new ChangeTrackingList(); - return new RequestSession( + return new VoiceLiveSessionOptions( model, modalities.ToList(), animation, @@ -58,7 +59,8 @@ public static RequestSession RequestSession(string model = default, IEnumerable< outputAudioTimestampTypes.ToList(), tools.ToList(), temperature, - serviceVoice, + agent, + voiceInternal, maxResponseOutputTokens, toolChoice, additionalBinaryDataProperties: null); @@ -499,12 +501,12 @@ public static AudioEchoCancellation AudioEchoCancellation(string @type = default /// Optional avatar style, such as emotional tone or speaking style. /// Indicates whether the avatar is customized or not. /// Optional video configuration including resolution, bitrate, and codec. - /// A new instance for mocking. - public static AvatarConfig AvatarConfig(IEnumerable iceServers = default, string character = default, string style = default, bool customized = default, VideoParams video = default) + /// A new instance for mocking. + public static AvatarConfiguration AvatarConfiguration(IEnumerable iceServers = default, string character = default, string style = default, bool customized = default, VideoParams video = default) { iceServers ??= new ChangeTrackingList(); - return new AvatarConfig( + return new AvatarConfiguration( iceServers.ToList(), character, style, @@ -558,14 +560,21 @@ public static VideoResolution VideoResolution(int width = default, int height = } /// Configuration for input audio transcription. - /// The model used for transcription. E.g., 'whisper-1', 'azure-fast-transcription', 's2s-ingraph'. - /// The language code to use for transcription, if specified. - /// Whether transcription is enabled. - /// Whether a custom model is being used. + /// + /// The transcription model to use. Supported values: + /// 'whisper-1', 'gpt-4o-transcribe', 'gpt-4o-mini-transcribe', + /// 'azure-fast-transcription', 'azure-speech'. + /// + /// Optional BCP-47 language code (e.g., 'en-US'). + /// Optional configuration for custom speech models. + /// Optional list of phrase hints to bias recognition. /// A new instance for mocking. - public static AudioInputTranscriptionSettings AudioInputTranscriptionSettings(AudioInputTranscriptionSettingsModel model = default, string language = default, bool enabled = default, bool customModel = default) + public static AudioInputTranscriptionSettings AudioInputTranscriptionSettings(AudioInputTranscriptionSettingsModel model = default, string language = default, IDictionary customSpeech = default, IEnumerable phraseList = default) { - return new AudioInputTranscriptionSettings(model, language, enabled, customModel, additionalBinaryDataProperties: null); + customSpeech ??= new ChangeTrackingDictionary(); + phraseList ??= new ChangeTrackingList(); + + return new AudioInputTranscriptionSettings(model, language, customSpeech, phraseList.ToList(), additionalBinaryDataProperties: null); } /// @@ -589,31 +598,22 @@ public static VoiceLiveFunctionDefinition VoiceLiveFunctionDefinition(string nam return new VoiceLiveFunctionDefinition(ToolType.Function, additionalBinaryDataProperties: null, name, description, parameters); } - /// - /// A base representation for a voicelive tool_choice selecting a named tool. - /// Please note this is the abstract base class. The derived classes available for instantiation are: . - /// + /// The RespondingAgentOptions. /// - /// A new instance for mocking. - public static ToolChoiceObject ToolChoiceObject(string @type = default) - { - return new UnknownToolChoiceObject(new ToolType(@type), additionalBinaryDataProperties: null); - } - - /// The representation of a voicelive tool_choice selecting a named function tool. - /// - /// A new instance for mocking. - public static ToolChoiceFunctionObject ToolChoiceFunctionObject(ToolChoiceFunctionObjectFunction function = default) - { - return new ToolChoiceFunctionObject(ToolType.Function, additionalBinaryDataProperties: null, function); - } - - /// The ToolChoiceFunctionObjectFunction. /// - /// A new instance for mocking. - public static ToolChoiceFunctionObjectFunction ToolChoiceFunctionObjectFunction(string name = default) + /// + /// + /// + /// A new instance for mocking. + public static RespondingAgentOptions RespondingAgentOptions(string @type = default, string name = default, string description = default, string agentId = default, string threadId = default) { - return new ToolChoiceFunctionObjectFunction(name, additionalBinaryDataProperties: null); + return new RespondingAgentOptions( + @type, + name, + description, + agentId, + threadId, + additionalBinaryDataProperties: null); } /// @@ -793,29 +793,20 @@ public static SessionUpdate SessionUpdate(string @type = default, string eventId /// /// /// A new instance for mocking. - public static SessionUpdateSessionCreated SessionUpdateSessionCreated(string eventId = default, ResponseSession session = default) + public static SessionUpdateSessionCreated SessionUpdateSessionCreated(string eventId = default, VoiceLiveSessionResponse session = default) { return new SessionUpdateSessionCreated(ServerEventType.SessionCreated, eventId, additionalBinaryDataProperties: null, session); } - /// The ResponseSession. - /// + /// The VoiceLiveSessionResponse. /// /// - /// /// - /// - /// Gets the Voice. - /// To assign an object to this property use . To assign an already formatted json string to this property use . - /// Supported types: - /// . . . . . - /// 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" }. - /// + /// /// + /// /// /// - /// /// /// /// @@ -823,28 +814,28 @@ public static SessionUpdateSessionCreated SessionUpdateSessionCreated(string eve /// /// /// - /// /// - /// /// - /// A new instance for mocking. - public static ResponseSession ResponseSession(string id = default, string model = default, IEnumerable modalities = default, string instructions = default, AnimationOptions animation = default, BinaryData voiceInternal = default, InputAudio inputAudio = default, AudioFormat? inputAudioFormat = default, AudioFormat? outputAudioFormat = default, int? inputAudioSamplingRate = default, TurnDetection turnDetection = default, AudioNoiseReduction inputAudioNoiseReduction = default, AudioEchoCancellation inputAudioEchoCancellation = default, AvatarConfig avatar = default, AudioInputTranscriptionSettings inputAudioTranscription = default, IEnumerable outputAudioTimestampTypes = default, IEnumerable tools = default, BinaryData toolChoice = default, float? temperature = default, BinaryData maxResponseOutputTokens = default, RespondingAgentConfig agent = default) + /// + /// + /// + /// + /// A new instance for mocking. + public static VoiceLiveSessionResponse VoiceLiveSessionResponse(string model = default, IEnumerable modalities = default, AnimationOptions animation = default, string instructions = default, InputAudio inputAudio = default, int? inputAudioSamplingRate = default, AudioFormat? inputAudioFormat = default, AudioFormat? outputAudioFormat = default, TurnDetection turnDetection = default, AudioNoiseReduction inputAudioNoiseReduction = default, AudioEchoCancellation inputAudioEchoCancellation = default, AvatarConfiguration avatar = default, AudioInputTranscriptionSettings inputAudioTranscription = default, IEnumerable outputAudioTimestampTypes = default, IEnumerable tools = default, float? temperature = default, RespondingAgentOptions agent = default, BinaryData voiceInternal = default, BinaryData maxResponseOutputTokens = default, BinaryData toolChoice = default, string id = default) { modalities ??= new ChangeTrackingList(); outputAudioTimestampTypes ??= new ChangeTrackingList(); tools ??= new ChangeTrackingList(); - return new ResponseSession( - id, + return new VoiceLiveSessionResponse( model, modalities.ToList(), - instructions, animation, - voiceInternal, + instructions, inputAudio, + inputAudioSamplingRate, inputAudioFormat, outputAudioFormat, - inputAudioSamplingRate, turnDetection, inputAudioNoiseReduction, inputAudioEchoCancellation, @@ -852,29 +843,13 @@ public static ResponseSession ResponseSession(string id = default, string model inputAudioTranscription, outputAudioTimestampTypes.ToList(), tools.ToList(), - toolChoice, temperature, - maxResponseOutputTokens, agent, - additionalBinaryDataProperties: null); - } - - /// The RespondingAgentConfig. - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static RespondingAgentConfig RespondingAgentConfig(string @type = default, string name = default, string description = default, string agentId = default, string threadId = default) - { - return new RespondingAgentConfig( - @type, - name, - description, - agentId, - threadId, - additionalBinaryDataProperties: null); + voiceInternal, + maxResponseOutputTokens, + toolChoice, + additionalBinaryDataProperties: null, + id); } /// @@ -884,7 +859,7 @@ public static RespondingAgentConfig RespondingAgentConfig(string @type = default /// /// /// A new instance for mocking. - public static SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eventId = default, ResponseSession session = default) + public static SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eventId = default, VoiceLiveSessionResponse session = default) { return new SessionUpdateSessionUpdated(ServerEventType.SessionUpdated, eventId, additionalBinaryDataProperties: null, session); } @@ -897,21 +872,21 @@ public static SessionUpdateSessionUpdated SessionUpdateSessionUpdated(string eve /// /// Details of the error. /// A new instance for mocking. - public static SessionUpdateError SessionUpdateError(string eventId = default, ServerEventErrorError error = default) + public static SessionUpdateError SessionUpdateError(string eventId = default, SessionUpdateErrorDetails error = default) { return new SessionUpdateError(ServerEventType.Error, eventId, additionalBinaryDataProperties: null, error); } - /// The ServerEventErrorError. + /// Details of the error. /// The type of error (e.g., "invalid_request_error", "server_error"). /// Error code, if any. /// A human-readable error message. /// Parameter related to the error, if any. /// The event_id of the client event that caused the error, if applicable. - /// A new instance for mocking. - public static ServerEventErrorError ServerEventErrorError(string @type = default, string code = default, string message = default, string @param = default, string eventId = default) + /// A new instance for mocking. + public static SessionUpdateErrorDetails SessionUpdateErrorDetails(string @type = default, string code = default, string message = default, string @param = default, string eventId = default) { - return new ServerEventErrorError( + return new SessionUpdateErrorDetails( @type, code, message, @@ -942,24 +917,24 @@ public static SessionUpdateResponseTextDelta SessionUpdateResponseTextDelta(stri } /// Returned when the model-generated audio is updated. + /// /// The ID of the response. /// The ID of the item. /// The index of the output item in the response. /// The index of the content part in the item's content array. /// Base64-encoded audio data delta. - /// /// A new instance for mocking. - public static SessionUpdateResponseAudioDelta SessionUpdateResponseAudioDelta(string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default, string eventId = default) + public static SessionUpdateResponseAudioDelta SessionUpdateResponseAudioDelta(string eventId = default, string responseId = default, string itemId = default, int outputIndex = default, int contentIndex = default, BinaryData delta = default) { return new SessionUpdateResponseAudioDelta( ServerEventType.ResponseAudioDelta, + eventId, additionalBinaryDataProperties: null, responseId, itemId, outputIndex, contentIndex, - delta, - eventId); + delta); } /// @@ -1005,7 +980,7 @@ public static ResponseItem ResponseItem(string @type = default, string id = defa /// /// /// A new instance for mocking. - public static ResponseMessageItem ResponseMessageItem(string id = default, string @object = default, ResponseMessageRole role = default, IEnumerable content = default, ResponseItemStatus status = default) + public static ResponseMessageItem ResponseMessageItem(string id = default, string @object = default, ResponseMessageRole role = default, IEnumerable content = default, VoiceLiveResponseItemStatus status = default) { content ??= new ChangeTrackingList(); @@ -1070,7 +1045,7 @@ public static ResponseAudioContentPart ResponseAudioContentPart(string transcrip /// /// /// A new instance for mocking. - public static ResponseFunctionCallItem ResponseFunctionCallItem(string id = default, string @object = default, string name = default, string callId = default, string arguments = default, ResponseItemStatus status = default) + public static ResponseFunctionCallItem ResponseFunctionCallItem(string id = default, string @object = default, string name = default, string callId = default, string arguments = default, VoiceLiveResponseItemStatus status = default) { return new ResponseFunctionCallItem( ItemType.FunctionCall, @@ -1200,11 +1175,9 @@ public static SessionUpdateConversationItemInputAudioTranscriptionDelta SessionU /// The log probability of the token. /// The bytes that were used to generate the log probability. /// A new instance for mocking. - public static LogProbProperties LogProbProperties(string token = default, float logprob = default, IEnumerable bytes = default) + public static LogProbProperties LogProbProperties(string token = default, float logprob = default, BinaryData bytes = default) { - bytes ??= new ChangeTrackingList(); - - return new LogProbProperties(token, logprob, bytes.ToList(), additionalBinaryDataProperties: null); + return new LogProbProperties(token, logprob, bytes, additionalBinaryDataProperties: null); } /// @@ -1285,12 +1258,7 @@ public static SessionUpdateInputAudioBufferCleared SessionUpdateInputAudioBuffer /// the audio buffer during VAD activation). /// /// - /// - /// Milliseconds from the start of all audio written to the buffer during the - /// session when speech was first detected. This will correspond to the - /// beginning of audio sent to the model, and thus includes the - /// `prefix_padding_ms` configured in the Session. - /// + /// /// The ID of the user message item that will be created when speech stops. /// A new instance for mocking. public static SessionUpdateInputAudioBufferSpeechStarted SessionUpdateInputAudioBufferSpeechStarted(string eventId = default, int audioStartMs = default, string itemId = default) @@ -1385,10 +1353,20 @@ public static ResponseTokenStatistics ResponseTokenStatistics(int totalTokens = /// Number of cached tokens used in the input. /// Number of text tokens used in the input. /// Number of audio tokens used in the input. + /// Details of cached token usage. /// A new instance for mocking. - public static InputTokenDetails InputTokenDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default) + public static InputTokenDetails InputTokenDetails(int cachedTokens = default, int textTokens = default, int audioTokens = default, CachedTokenDetails cachedTokensDetails = default) + { + return new InputTokenDetails(cachedTokens, textTokens, audioTokens, cachedTokensDetails, additionalBinaryDataProperties: null); + } + + /// Details of output token usage. + /// Number of cached text tokens. + /// Number of cached audio tokens. + /// A new instance for mocking. + public static CachedTokenDetails CachedTokenDetails(int textTokens = default, int audioTokens = default) { - return new InputTokenDetails(cachedTokens, textTokens, audioTokens, additionalBinaryDataProperties: null); + return new CachedTokenDetails(textTokens, audioTokens, additionalBinaryDataProperties: null); } /// Details of output token usage. diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.Serialization.cs index bb8a7fb19967..db39eb8c3f2f 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.Serialization.cs @@ -98,20 +98,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(OutputAudioFormat)) { writer.WritePropertyName("output_audio_format"u8); - writer.WriteStringValue(OutputAudioFormat.Value.ToSerialString()); + writer.WriteStringValue(OutputAudioFormat.Value.ToString()); } if (Optional.IsDefined(Temperature)) { writer.WritePropertyName("temperature"u8); writer.WriteNumberValue(Temperature.Value); } - if (Optional.IsDefined(MaxOutputTokens)) + if (Optional.IsDefined(_MaxOutputTokens)) { writer.WritePropertyName("max_output_tokens"u8); #if NET6_0_OR_GREATER - writer.WriteRawValue(MaxOutputTokens); + writer.WriteRawValue(_MaxOutputTokens); #else - using (JsonDocument document = JsonDocument.Parse(MaxOutputTokens)) + using (JsonDocument document = JsonDocument.Parse(_MaxOutputTokens)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -168,7 +168,7 @@ internal static VoiceLiveResponse DeserializeVoiceLiveResponse(JsonElement eleme string conversationId = default; BinaryData voiceInternal = default; IList modalitiesInternal = default; - ResponseOutputAudioFormat? outputAudioFormat = default; + AudioFormat? outputAudioFormat = default; float? temperature = default; BinaryData maxOutputTokens = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -259,7 +259,7 @@ internal static VoiceLiveResponse DeserializeVoiceLiveResponse(JsonElement eleme { continue; } - outputAudioFormat = prop.Value.GetString().ToResponseOutputAudioFormat(); + outputAudioFormat = new AudioFormat(prop.Value.GetString()); continue; } if (prop.NameEquals("temperature"u8)) diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.cs index 28c223682eb0..e2157eff6754 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponse.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Text.Json; namespace Azure.AI.VoiceLive { @@ -59,12 +58,9 @@ internal VoiceLiveResponse() /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. - /// - /// Maximum number of output tokens for a single assistant response, - /// inclusive of tool calls, that was used in this response. - /// + /// /// Keeps track of any properties unknown to the library. - internal VoiceLiveResponse(string id, string @object, VoiceLiveResponseStatus? status, ResponseStatusDetails statusDetails, IList output, ResponseTokenStatistics usage, string conversationId, BinaryData voiceInternal, IList modalitiesInternal, ResponseOutputAudioFormat? outputAudioFormat, float? temperature, BinaryData maxOutputTokens, IDictionary additionalBinaryDataProperties) + internal VoiceLiveResponse(string id, string @object, VoiceLiveResponseStatus? status, ResponseStatusDetails statusDetails, IList output, ResponseTokenStatistics usage, string conversationId, BinaryData voiceInternal, IList modalitiesInternal, AudioFormat? outputAudioFormat, float? temperature, BinaryData maxOutputTokens, IDictionary additionalBinaryDataProperties) { Id = id; Object = @object; @@ -77,7 +73,7 @@ internal VoiceLiveResponse(string id, string @object, VoiceLiveResponseStatus? s ModalitiesInternal = modalitiesInternal; OutputAudioFormat = outputAudioFormat; Temperature = temperature; - MaxOutputTokens = maxOutputTokens; + _MaxOutputTokens = maxOutputTokens; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -119,51 +115,9 @@ internal VoiceLiveResponse(string id, string @object, VoiceLiveResponseStatus? s public string ConversationId { get; } /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - public ResponseOutputAudioFormat? OutputAudioFormat { get; } + public AudioFormat? OutputAudioFormat { get; } /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. public float? Temperature { get; } - - /// - /// Maximum number of output tokens for a single assistant response, - /// inclusive of tool calls, that was used in this response. - /// To assign an object to this property use . - /// To assign an already formatted json string to this property use . - /// - /// - /// Supported types: - /// - /// - /// . - /// - /// - /// "inf". - /// - /// - /// - /// - /// - /// 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" }. - /// - /// - /// - /// - public BinaryData MaxOutputTokens { get; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponseItemStatus.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponseItemStatus.cs new file mode 100644 index 000000000000..e7e66561d002 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveResponseItemStatus.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.VoiceLive +{ + /// + public readonly partial struct VoiceLiveResponseItemStatus : IEquatable + { + private readonly string _value; + private const string InProgressValue = "in_progress"; + private const string CompletedValue = "completed"; + private const string IncompleteValue = "incomplete"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public VoiceLiveResponseItemStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the InProgress. + public static VoiceLiveResponseItemStatus InProgress { get; } = new VoiceLiveResponseItemStatus(InProgressValue); + + /// Gets the Completed. + public static VoiceLiveResponseItemStatus Completed { get; } = new VoiceLiveResponseItemStatus(CompletedValue); + + /// Gets the Incomplete. + public static VoiceLiveResponseItemStatus Incomplete { get; } = new VoiceLiveResponseItemStatus(IncompleteValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(VoiceLiveResponseItemStatus left, VoiceLiveResponseItemStatus 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 !=(VoiceLiveResponseItemStatus left, VoiceLiveResponseItemStatus right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator VoiceLiveResponseItemStatus(string value) => new VoiceLiveResponseItemStatus(value); + + /// Converts a string to a . + /// The value. + public static implicit operator VoiceLiveResponseItemStatus?(string value) => value == null ? null : new VoiceLiveResponseItemStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VoiceLiveResponseItemStatus other && Equals(other); + + /// + public bool Equals(VoiceLiveResponseItemStatus 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/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs new file mode 100644 index 000000000000..d732134d2008 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs @@ -0,0 +1,494 @@ +// 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; + +namespace Azure.AI.VoiceLive +{ + /// The VoiceLiveSessionOptions. + public partial class VoiceLiveSessionOptions : 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(VoiceLiveSessionOptions)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } + if (Optional.IsCollectionDefined(Modalities)) + { + writer.WritePropertyName("modalities"u8); + writer.WriteStartArray(); + foreach (InputModality item in Modalities) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Animation)) + { + writer.WritePropertyName("animation"u8); + writer.WriteObjectValue(Animation, options); + } + if (Optional.IsDefined(Instructions)) + { + writer.WritePropertyName("instructions"u8); + writer.WriteStringValue(Instructions); + } + if (Optional.IsDefined(InputAudio)) + { + writer.WritePropertyName("input_audio"u8); + writer.WriteObjectValue(InputAudio, options); + } + if (Optional.IsDefined(InputAudioSamplingRate)) + { + writer.WritePropertyName("input_audio_sampling_rate"u8); + writer.WriteNumberValue(InputAudioSamplingRate.Value); + } + if (Optional.IsDefined(InputAudioFormat)) + { + writer.WritePropertyName("input_audio_format"u8); + writer.WriteStringValue(InputAudioFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputAudioFormat)) + { + writer.WritePropertyName("output_audio_format"u8); + writer.WriteStringValue(OutputAudioFormat.Value.ToString()); + } + if (Optional.IsDefined(TurnDetection)) + { + writer.WritePropertyName("turn_detection"u8); + writer.WriteObjectValue(TurnDetection, options); + } + if (Optional.IsDefined(InputAudioNoiseReduction)) + { + writer.WritePropertyName("input_audio_noise_reduction"u8); + writer.WriteObjectValue(InputAudioNoiseReduction, options); + } + if (Optional.IsDefined(InputAudioEchoCancellation)) + { + writer.WritePropertyName("input_audio_echo_cancellation"u8); + writer.WriteObjectValue(InputAudioEchoCancellation, options); + } + if (Optional.IsDefined(Avatar)) + { + writer.WritePropertyName("avatar"u8); + writer.WriteObjectValue(Avatar, options); + } + if (Optional.IsDefined(InputAudioTranscription)) + { + writer.WritePropertyName("input_audio_transcription"u8); + writer.WriteObjectValue(InputAudioTranscription, options); + } + if (Optional.IsCollectionDefined(OutputAudioTimestampTypes)) + { + writer.WritePropertyName("output_audio_timestamp_types"u8); + writer.WriteStartArray(); + foreach (AudioTimestampType item in OutputAudioTimestampTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Tools)) + { + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (VoiceLiveToolDefinition item in Tools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Temperature)) + { + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + if (Optional.IsDefined(Agent)) + { + writer.WritePropertyName("agent"u8); + writer.WriteObjectValue(Agent, options); + } + if (Optional.IsDefined(VoiceInternal)) + { + writer.WritePropertyName("voice"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(VoiceInternal); +#else + using (JsonDocument document = JsonDocument.Parse(VoiceInternal)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(_maxResponseOutputTokens)) + { + writer.WritePropertyName("max_response_output_tokens"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(_maxResponseOutputTokens); +#else + using (JsonDocument document = JsonDocument.Parse(_maxResponseOutputTokens)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(_toolChoice)) + { + writer.WritePropertyName("tool_choice"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(_toolChoice); +#else + using (JsonDocument document = JsonDocument.Parse(_toolChoice)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + 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. + VoiceLiveSessionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual VoiceLiveSessionOptions 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(VoiceLiveSessionOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVoiceLiveSessionOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static VoiceLiveSessionOptions DeserializeVoiceLiveSessionOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string model = default; + IList modalities = default; + AnimationOptions animation = default; + string instructions = default; + InputAudio inputAudio = default; + int? inputAudioSamplingRate = default; + AudioFormat? inputAudioFormat = default; + AudioFormat? outputAudioFormat = default; + TurnDetection turnDetection = default; + AudioNoiseReduction inputAudioNoiseReduction = default; + AudioEchoCancellation inputAudioEchoCancellation = default; + AvatarConfiguration avatar = default; + AudioInputTranscriptionSettings inputAudioTranscription = default; + IList outputAudioTimestampTypes = default; + IList tools = default; + float? temperature = default; + RespondingAgentOptions agent = default; + BinaryData voiceInternal = default; + BinaryData maxResponseOutputTokens = default; + BinaryData toolChoice = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("modalities"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new InputModality(item.GetString())); + } + modalities = array; + continue; + } + if (prop.NameEquals("animation"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + animation = AnimationOptions.DeserializeAnimationOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("instructions"u8)) + { + instructions = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("input_audio"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudio = InputAudio.DeserializeInputAudio(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_sampling_rate"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioSamplingRate = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("input_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioFormat = new AudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("output_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputAudioFormat = new AudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("turn_detection"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + turnDetection = null; + continue; + } + turnDetection = TurnDetection.DeserializeTurnDetection(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_noise_reduction"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioNoiseReduction = AudioNoiseReduction.DeserializeAudioNoiseReduction(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_echo_cancellation"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioEchoCancellation = AudioEchoCancellation.DeserializeAudioEchoCancellation(prop.Value, options); + continue; + } + if (prop.NameEquals("avatar"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avatar = AvatarConfiguration.DeserializeAvatarConfiguration(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_transcription"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioTranscription = AudioInputTranscriptionSettings.DeserializeAudioInputTranscriptionSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("output_audio_timestamp_types"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new AudioTimestampType(item.GetString())); + } + outputAudioTimestampTypes = array; + continue; + } + if (prop.NameEquals("tools"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(VoiceLiveToolDefinition.DeserializeVoiceLiveToolDefinition(item, options)); + } + tools = array; + continue; + } + if (prop.NameEquals("temperature"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + temperature = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("agent"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agent = RespondingAgentOptions.DeserializeRespondingAgentOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("voice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + voiceInternal = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("max_response_output_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("tool_choice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new VoiceLiveSessionOptions( + model, + modalities ?? new ChangeTrackingList(), + animation, + instructions, + inputAudio, + inputAudioSamplingRate, + inputAudioFormat, + outputAudioFormat, + turnDetection, + inputAudioNoiseReduction, + inputAudioEchoCancellation, + avatar, + inputAudioTranscription, + outputAudioTimestampTypes ?? new ChangeTrackingList(), + tools ?? new ChangeTrackingList(), + temperature, + agent, + voiceInternal, + maxResponseOutputTokens, + toolChoice, + 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, AzureAIVoiceLiveContext.Default); + default: + throw new FormatException($"The model {nameof(VoiceLiveSessionOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + VoiceLiveSessionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual VoiceLiveSessionOptions 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 DeserializeVoiceLiveSessionOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VoiceLiveSessionOptions)} 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/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.cs new file mode 100644 index 000000000000..6550bbe4d3b9 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// The VoiceLiveSessionOptions. + public partial class VoiceLiveSessionOptions + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public VoiceLiveSessionOptions() + { + Modalities = new ChangeTrackingList(); + OutputAudioTimestampTypes = new ChangeTrackingList(); + Tools = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Keeps track of any properties unknown to the library. + internal VoiceLiveSessionOptions(string model, IList modalities, AnimationOptions animation, string instructions, InputAudio inputAudio, int? inputAudioSamplingRate, AudioFormat? inputAudioFormat, AudioFormat? outputAudioFormat, TurnDetection turnDetection, AudioNoiseReduction inputAudioNoiseReduction, AudioEchoCancellation inputAudioEchoCancellation, AvatarConfiguration avatar, AudioInputTranscriptionSettings inputAudioTranscription, IList outputAudioTimestampTypes, IList tools, float? temperature, RespondingAgentOptions agent, BinaryData voiceInternal, BinaryData maxResponseOutputTokens, BinaryData toolChoice, IDictionary additionalBinaryDataProperties) + { + Model = model; + Modalities = modalities; + Animation = animation; + Instructions = instructions; + InputAudio = inputAudio; + InputAudioSamplingRate = inputAudioSamplingRate; + InputAudioFormat = inputAudioFormat; + OutputAudioFormat = outputAudioFormat; + TurnDetection = turnDetection; + InputAudioNoiseReduction = inputAudioNoiseReduction; + InputAudioEchoCancellation = inputAudioEchoCancellation; + Avatar = avatar; + InputAudioTranscription = inputAudioTranscription; + OutputAudioTimestampTypes = outputAudioTimestampTypes; + Tools = tools; + Temperature = temperature; + Agent = agent; + VoiceInternal = voiceInternal; + _maxResponseOutputTokens = maxResponseOutputTokens; + _toolChoice = toolChoice; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets or sets the Model. + public string Model { get; set; } + + /// Gets the Modalities. + public IList Modalities { get; } + + /// Gets or sets the Animation. + public AnimationOptions Animation { get; set; } + + /// Gets or sets the Instructions. + public string Instructions { get; set; } + + /// Gets or sets the InputAudio. + public InputAudio InputAudio { get; set; } + + /// Gets or sets the InputAudioSamplingRate. + public int? InputAudioSamplingRate { get; set; } + + /// Gets or sets the InputAudioFormat. + public AudioFormat? InputAudioFormat { get; set; } + + /// Gets or sets the OutputAudioFormat. + public AudioFormat? OutputAudioFormat { get; set; } + + /// Gets or sets the TurnDetection. + public TurnDetection TurnDetection { get; set; } + + /// Gets or sets the InputAudioNoiseReduction. + public AudioNoiseReduction InputAudioNoiseReduction { get; set; } + + /// Gets or sets the InputAudioEchoCancellation. + public AudioEchoCancellation InputAudioEchoCancellation { get; set; } + + /// Gets or sets the Avatar. + public AvatarConfiguration Avatar { get; set; } + + /// Gets or sets the InputAudioTranscription. + public AudioInputTranscriptionSettings InputAudioTranscription { get; set; } + + /// Gets the OutputAudioTimestampTypes. + public IList OutputAudioTimestampTypes { get; } + + /// Gets the Tools. + public IList Tools { get; } + + /// Gets or sets the Temperature. + public float? Temperature { get; set; } + + /// Gets or sets the Agent. + public RespondingAgentOptions Agent { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs new file mode 100644 index 000000000000..b359ba6fc318 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs @@ -0,0 +1,356 @@ +// 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; + +namespace Azure.AI.VoiceLive +{ + /// The VoiceLiveSessionResponse. + public partial class VoiceLiveSessionResponse : 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(VoiceLiveSessionResponse)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + VoiceLiveSessionResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (VoiceLiveSessionResponse)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override VoiceLiveSessionOptions 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(VoiceLiveSessionResponse)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVoiceLiveSessionResponse(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static VoiceLiveSessionResponse DeserializeVoiceLiveSessionResponse(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string model = default; + IList modalities = default; + AnimationOptions animation = default; + string instructions = default; + InputAudio inputAudio = default; + int? inputAudioSamplingRate = default; + AudioFormat? inputAudioFormat = default; + AudioFormat? outputAudioFormat = default; + TurnDetection turnDetection = default; + AudioNoiseReduction inputAudioNoiseReduction = default; + AudioEchoCancellation inputAudioEchoCancellation = default; + AvatarConfiguration avatar = default; + AudioInputTranscriptionSettings inputAudioTranscription = default; + IList outputAudioTimestampTypes = default; + IList tools = default; + float? temperature = default; + RespondingAgentOptions agent = default; + BinaryData voiceInternal = default; + BinaryData maxResponseOutputTokens = default; + BinaryData toolChoice = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("modalities"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new InputModality(item.GetString())); + } + modalities = array; + continue; + } + if (prop.NameEquals("animation"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + animation = AnimationOptions.DeserializeAnimationOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("instructions"u8)) + { + instructions = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("input_audio"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudio = InputAudio.DeserializeInputAudio(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_sampling_rate"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioSamplingRate = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("input_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioFormat = new AudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("output_audio_format"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputAudioFormat = new AudioFormat(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("turn_detection"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + turnDetection = null; + continue; + } + turnDetection = TurnDetection.DeserializeTurnDetection(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_noise_reduction"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioNoiseReduction = AudioNoiseReduction.DeserializeAudioNoiseReduction(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_echo_cancellation"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioEchoCancellation = AudioEchoCancellation.DeserializeAudioEchoCancellation(prop.Value, options); + continue; + } + if (prop.NameEquals("avatar"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avatar = AvatarConfiguration.DeserializeAvatarConfiguration(prop.Value, options); + continue; + } + if (prop.NameEquals("input_audio_transcription"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputAudioTranscription = AudioInputTranscriptionSettings.DeserializeAudioInputTranscriptionSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("output_audio_timestamp_types"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new AudioTimestampType(item.GetString())); + } + outputAudioTimestampTypes = array; + continue; + } + if (prop.NameEquals("tools"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(VoiceLiveToolDefinition.DeserializeVoiceLiveToolDefinition(item, options)); + } + tools = array; + continue; + } + if (prop.NameEquals("temperature"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + temperature = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("agent"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agent = RespondingAgentOptions.DeserializeRespondingAgentOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("voice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + voiceInternal = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("max_response_output_tokens"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxResponseOutputTokens = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("tool_choice"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + toolChoice = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new VoiceLiveSessionResponse( + model, + modalities ?? new ChangeTrackingList(), + animation, + instructions, + inputAudio, + inputAudioSamplingRate, + inputAudioFormat, + outputAudioFormat, + turnDetection, + inputAudioNoiseReduction, + inputAudioEchoCancellation, + avatar, + inputAudioTranscription, + outputAudioTimestampTypes ?? new ChangeTrackingList(), + tools ?? new ChangeTrackingList(), + temperature, + agent, + voiceInternal, + maxResponseOutputTokens, + toolChoice, + additionalBinaryDataProperties, + id); + } + + /// 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": + return ModelReaderWriter.Write(this, options, AzureAIVoiceLiveContext.Default); + default: + throw new FormatException($"The model {nameof(VoiceLiveSessionResponse)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + VoiceLiveSessionResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (VoiceLiveSessionResponse)PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected override VoiceLiveSessionOptions 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 DeserializeVoiceLiveSessionResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VoiceLiveSessionResponse)} 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/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.cs new file mode 100644 index 000000000000..dc2a7c597265 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive +{ + /// The VoiceLiveSessionResponse. + public partial class VoiceLiveSessionResponse : VoiceLiveSessionOptions + { + /// Initializes a new instance of . + internal VoiceLiveSessionResponse() + { + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Keeps track of any properties unknown to the library. + /// + internal VoiceLiveSessionResponse(string model, IList modalities, AnimationOptions animation, string instructions, InputAudio inputAudio, int? inputAudioSamplingRate, AudioFormat? inputAudioFormat, AudioFormat? outputAudioFormat, TurnDetection turnDetection, AudioNoiseReduction inputAudioNoiseReduction, AudioEchoCancellation inputAudioEchoCancellation, AvatarConfiguration avatar, AudioInputTranscriptionSettings inputAudioTranscription, IList outputAudioTimestampTypes, IList tools, float? temperature, RespondingAgentOptions agent, BinaryData voiceInternal, BinaryData maxResponseOutputTokens, BinaryData toolChoice, IDictionary additionalBinaryDataProperties, string id) : base(model, modalities, animation, instructions, inputAudio, inputAudioSamplingRate, inputAudioFormat, outputAudioFormat, turnDetection, inputAudioNoiseReduction, inputAudioEchoCancellation, avatar, inputAudioTranscription, outputAudioTimestampTypes, tools, temperature, agent, voiceInternal, maxResponseOutputTokens, toolChoice, additionalBinaryDataProperties) + { + Id = id; + } + + /// Gets the Id. + public string Id { get; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/SessionOptions.cs b/sdk/ai/Azure.AI.VoiceLive/src/SessionOptions.cs deleted file mode 100644 index 237bb97e6f65..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/SessionOptions.cs +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.ComponentModel; -using Azure.Core; - -namespace Azure.AI.VoiceLive -{ - /// - /// Represents configuration options for a VoiceLive session. - /// - /// - /// This unified class provides all configuration options that can be used to customize - /// the behavior of a VoiceLive session, whether for conversation, transcription, or - /// hybrid scenarios. - /// - public class SessionOptions - { - // ==================== Audio Configuration ==================== - - /// - /// Gets or sets the input audio format for the session. - /// - /// - /// The audio format to use for input audio. If not specified, the service will use a default format. - /// - public AudioFormat? InputAudioFormat { get; set; } - - /// - /// Gets or sets the output audio format for the session. - /// - /// - /// The audio format to use for output audio. If not specified, the service will use a default format. - /// - public AudioFormat? OutputAudioFormat { get; set; } - - /// - /// Gets or sets the turn detection configuration for the session. - /// - /// - /// The turn detection configuration to use. If not specified, the service will use server-side VAD. - /// - public TurnDetection TurnDetection { get; set; } - - /// - /// Gets or sets the audio noise reduction settings. - /// - /// - /// Configuration for reducing noise in the input audio to improve accuracy. - /// If not specified, default noise reduction settings will be used. - /// - public AudioNoiseReduction NoiseReduction { get; set; } - - /// - /// Gets or sets the echo cancellation settings. - /// - /// - /// Configuration for cancelling echo in the input audio to improve accuracy. - /// If not specified, default echo cancellation settings will be used. - /// - public AudioEchoCancellation EchoCancellation { get; set; } - - // ==================== Modalities & Core Settings ==================== - - /// - /// Gets or sets the modalities supported by the session. - /// - /// - /// A list of modalities that the session should support. Defaults to text and audio. - /// - public IList Modalities { get; set; } = new List { InputModality.Text, InputModality.Audio }; - - /// - /// Gets or sets the model to use for the session. - /// - /// - /// The model identifier for processing. If not specified, the service will use a default model. - /// - public string Model { get; set; } - - /// - /// Gets or sets the temperature parameter for response generation. - /// - /// - /// A value between 0.0 and 1.0 controlling the randomness of the response. Higher values produce more random responses. - /// - public float? Temperature { get; set; } - - /// - /// Gets or sets the maximum number of tokens to generate in the response. - /// - /// - /// The maximum number of tokens to generate. If not specified, the service will use a default limit. - /// - public int? MaxResponseOutputTokens { get; set; } - - // ==================== Transcription Features ==================== - - /// - /// Gets or sets the input audio transcription settings. - /// - /// - /// Configuration for transcribing input audio. If not specified, transcription is disabled. - /// - public AudioInputTranscriptionSettings InputAudioTranscription { get; set; } - - /// - /// Gets or sets the language for transcription. - /// - /// - /// The language code (e.g., "en-US", "fr-FR") to use for transcription. - /// If not specified, the service will attempt to auto-detect the language. - /// - public string Language { get; set; } - - /// - /// Gets or sets a value indicating whether to include confidence scores in transcription results. - /// - /// - /// true to include confidence scores for transcribed text; otherwise, false. - /// Default is false. - /// - public bool IncludeConfidenceScores { get; set; } - - /// - /// Gets or sets a value indicating whether to include timestamps in transcription results. - /// - /// - /// true to include word-level timestamps in transcribed text; otherwise, false. - /// Default is false. - /// - public bool IncludeTimestamps { get; set; } - - /// - /// Gets or sets a list of words or phrases to boost recognition accuracy. - /// - /// - /// A list of domain-specific words or phrases that should be recognized more accurately. - /// This can improve transcription quality for specialized vocabulary like brand names, - /// technical terms, or industry jargon. - /// - public IList CustomVocabulary { get; set; } = new List(); - - // ==================== Conversation Features ==================== - - /// - /// Gets or sets the voice configuration for the conversation. - /// - /// - /// The voice configuration to use for generating spoken responses. If not specified, - /// the service will use a default voice. - /// - public VoiceProvider Voice { get; set; } - - /// - /// Gets or sets the instructions for the conversation assistant. - /// - /// - /// Instructions that guide the assistant's behavior and responses during the conversation. - /// - public string Instructions { get; set; } - - /// - /// Gets or sets the tools available to the conversation assistant. - /// - /// - /// A list of tools that the assistant can use during the conversation. - /// - public IList Tools { get; set; } = new List(); - - /// - /// Gets or sets the tool choice strategy for the conversation. - /// - /// - /// Specifies how the assistant should choose which tools to use. If not specified, - /// the assistant will automatically decide when to use tools. - /// - public string ToolChoice { get; set; } - - /// - /// Gets or sets a value indicating whether to enable parallel tool calling. - /// - /// - /// true to allow the assistant to call multiple tools in parallel; otherwise, false. - /// Default is false. - /// - public bool ParallelToolCalls { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public SessionOptions() - { - } - - /// - /// Converts the session options to a instance. - /// - /// A instance configured with the current options. - internal virtual RequestSession ToRequestSession() - { - var session = new RequestSession(); - - // Audio configuration - if (InputAudioFormat.HasValue) - { - session.InputAudioFormat = InputAudioFormat.Value; - } - - if (OutputAudioFormat.HasValue) - { - session.OutputAudioFormat = OutputAudioFormat.Value; - } - - if (TurnDetection != null) - { - session.TurnDetection = TurnDetection; - } - - if (NoiseReduction != null) - { - session.InputAudioNoiseReduction = NoiseReduction; - } - - if (EchoCancellation != null) - { - session.InputAudioEchoCancellation = EchoCancellation; - } - - // Modalities - if (Modalities != null && Modalities.Count > 0) - { - session.Modalities.Clear(); - foreach (var modality in Modalities) - { - session.Modalities.Add(modality); - } - } - - // Model and generation settings - if (!string.IsNullOrEmpty(Model)) - { - session.Model = Model; - } - - if (Temperature.HasValue) - { - session.Temperature = Temperature.Value; - } - - if (MaxResponseOutputTokens.HasValue) - { - session.MaxResponseOutputTokens = MaxResponseOutputTokens.Value; - } - - // Transcription settings - if (InputAudioTranscription != null) - { - session.InputAudioTranscription = InputAudioTranscription; - } - - if (!string.IsNullOrEmpty(Language)) - { - // Store language in additional properties since it might not be a direct property - session.AdditionalProperties["language"] = BinaryData.FromString($"\"{Language}\""); - } - - // Note: IncludeConfidenceScores, IncludeTimestamps, and CustomVocabulary - // may need special handling based on the service API - - // Conversation settings - if (Voice != null) - { - session.Voice = Voice; - } - - if (!string.IsNullOrEmpty(Instructions)) - { - session.Instructions = Instructions; - } - - if (Tools != null && Tools.Count > 0) - { - session.Tools.Clear(); - foreach (var tool in Tools) - { - session.Tools.Add(tool); - } - } - - if (ToolChoice != null) - { - session.ToolChoice = ToolChoice; - } - - // Note: ParallelToolCalls may need special handling - - return session; - } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveClient.WebSockets.cs b/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveClient.WebSockets.cs index 178c4d031913..a4aada097d7b 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveClient.WebSockets.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveClient.WebSockets.cs @@ -61,7 +61,7 @@ public virtual VoiceLiveSession StartSession(string model, CancellationToken can /// The cancellation token to use. /// A task that represents the asynchronous operation. The task result contains a new, connected instance of . public virtual async Task StartSessionAsync( - RequestSession sessionConfig, + VoiceLiveSessionOptions sessionConfig, CancellationToken cancellationToken = default) { Argument.AssertNotNull(sessionConfig, nameof(sessionConfig)); @@ -86,7 +86,7 @@ public virtual async Task StartSessionAsync( /// The cancellation token to use. /// A new, connected instance of . public virtual VoiceLiveSession StartSession( - RequestSession sessionConfig, + VoiceLiveSessionOptions sessionConfig, CancellationToken cancellationToken = default) { return StartSessionAsync(sessionConfig, cancellationToken).EnsureCompleted(); diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveRequestSession.cs b/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveRequestSession.cs deleted file mode 100644 index 5a8f42ad403d..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveRequestSession.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.VoiceLive -{ - /// The VoiceLiveRequestSession. - public partial class RequestSession - { - /// - /// Serialized additional properties for the request session - /// - internal IDictionary AdditionalProperties => this._additionalBinaryDataProperties; - - [CodeGenMember("Voice")] - private BinaryData _serviceVoice; - - /// - /// Gets or sets the Voice. - /// - public VoiceProvider Voice - { - get - { - if (_serviceVoice == null) - { - return null; - } - return _serviceVoice.ToObjectFromJson(); - } - set - { - if (value == null) - { - _serviceVoice = null; - } - else - { - _serviceVoice = value.ToBinaryData(); - } - } - } - - [CodeGenMember("MaxResponseOutputTokens")] - private BinaryData _maxResponseOutputTokens; - - /// - /// Gets or sets the maximum number of tokens to generate in the response. - /// - public int? MaxResponseOutputTokens - { - get => _maxResponseOutputTokens.ToObjectFromJson(); - set => _maxResponseOutputTokens = BinaryData.FromObjectAsJson(value); - } - - [CodeGenMember("ToolChoice")] - private BinaryData _toolChoice; - - /// - /// Gets or sets the tool choice strategy for response generation. - /// - public string ToolChoice - { - get => _toolChoice.ToObjectFromJson(); - set => _toolChoice = BinaryData.FromObjectAsJson(value); - } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSessionOptions.cs b/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSessionOptions.cs deleted file mode 100644 index 4e15dbd9f74e..000000000000 --- a/sdk/ai/Azure.AI.VoiceLive/src/VoiceLiveSessionOptions.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using Azure.Core; - -namespace Azure.AI.VoiceLive -{ - /// - /// Represents configuration options for VoiceLive response generation. - /// - /// - /// This class provides configuration options for controlling how the VoiceLive service - /// generates responses, including modalities, tools, and response formatting. - /// - public class VoiceLiveSessionOptions - { - /// - /// Gets or sets the modalities to include in the response. - /// - /// - /// A list of modalities (e.g., text, audio) that should be included in the response. - /// If not specified, the service will use default modalities. - /// - public IList Modalities { get; set; } = new List(); - - /// - /// Gets or sets the instructions for response generation. - /// - /// - /// Instructions that guide how the response should be generated. - /// - public string Instructions { get; set; } - - /// - /// Gets or sets the voice configuration for spoken responses. - /// - /// - /// The voice configuration to use for generating spoken responses. - /// - public VoiceProvider Voice { get; set; } - - /// - /// Gets or sets the output audio format for the response. - /// - /// - /// The audio format to use for output audio in the response. - /// - public AudioFormat? OutputAudioFormat { get; set; } - - /// - /// Gets or sets the tools available during response generation. - /// - /// - /// A list of tools that can be used during response generation. - /// - public IList Tools { get; set; } = new List(); - - /// - /// Gets or sets the tool choice strategy for response generation. - /// - /// - /// Specifies how tools should be chosen during response generation. - /// - public string ToolChoice { get; set; } - - /// - /// Gets or sets the temperature parameter for response generation. - /// - /// - /// A value between 0.0 and 1.0 controlling the randomness of the response. - /// Higher values produce more random responses. - /// - public float? Temperature { get; set; } - - /// - /// Gets or sets the maximum number of tokens to generate in the response. - /// - /// - /// The maximum number of tokens to generate. If not specified, the service will use a default limit. - /// - public int? MaxOutputTokens { get; set; } - - /// - /// Gets or sets a value indicating whether to commit the response to the conversation. - /// - /// - /// true to commit the response to the conversation; otherwise, false. - /// Default is true. - /// - public bool? Commit { get; set; } - - /// - /// Gets or sets a value indicating whether to cancel any ongoing generation before starting this one. - /// - /// - /// true to cancel ongoing generation; otherwise, false. - /// Default is true. - /// - public bool? CancelPrevious { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public VoiceLiveSessionOptions() - { - } - - /// - /// Converts the response options to a instance. - /// - /// A instance configured with the current options. - /// - /// This method uses the model factory to create the response parameters since the - /// VoiceLiveResponseCreateParams constructor is internal. - /// - internal virtual ResponseCreateParams ToCreateParams() - { - // Since VoiceLiveResponseCreateParams has an internal constructor, - // we need to find another way to create it. For now, we'll return null - // and handle this at the call site. - return null; - } - } -} diff --git a/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/AsyncVoiceLiveMessageEnumerator.cs b/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/AsyncVoiceLiveMessageEnumerator.cs index 41baebd5d309..62205c42dd60 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/AsyncVoiceLiveMessageEnumerator.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/AsyncVoiceLiveMessageEnumerator.cs @@ -3,7 +3,9 @@ using System; using System.Buffers; +using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics; using System.Net.WebSockets; using System.Threading; using System.Threading.Tasks; @@ -58,9 +60,10 @@ public async ValueTask MoveNextAsync() return false; } + WebSocketPipelineResponse websocketPipelineResponse = new(); + try { - WebSocketPipelineResponse websocketPipelineResponse = new(); for (int partialMessageCount = 1; !websocketPipelineResponse.IsComplete; partialMessageCount++) { WebSocketReceiveResult receiveResult = await _webSocket @@ -69,6 +72,10 @@ public async ValueTask MoveNextAsync() if (receiveResult.CloseStatus.HasValue) { + if (_webSocket.State == WebSocketState.CloseReceived) + { + await _webSocket.CloseOutputAsync(receiveResult.CloseStatus.Value, "Acknowledge Close frame", CancellationToken.None).ConfigureAwait(false); + } Current = null; return false; } @@ -82,10 +89,20 @@ public async ValueTask MoveNextAsync() Current = websocketPipelineResponse.GetContent(); return true; } - catch (WebSocketException) + catch (WebSocketException webEx) { - Current = null; - return false; + var errorDetails = new SessionUpdateErrorDetails(webEx.GetType().Name, webEx.Message); + + var id = Guid.NewGuid().ToString().Replace("-", string.Empty); + var errorUpdate = new SessionUpdateError(errorDetails); + + var persistable = errorUpdate as IPersistableModel; + var errorAsData = persistable?.Write(new ModelReaderWriterOptions("J")) ?? null; + + websocketPipelineResponse.IngestReceivedResult(errorAsData); + + Current = websocketPipelineResponse.GetContent(); + return true; } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/WebSocketPipelineResponse.cs b/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/WebSocketPipelineResponse.cs index c3cad22a1024..c62d6dd45cd5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/WebSocketPipelineResponse.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/WebSocketHelpers/WebSocketPipelineResponse.cs @@ -45,6 +45,23 @@ public void IngestReceivedResult(WebSocketReceiveResult receivedResult, BinaryDa IsComplete = receivedResult.EndOfMessage; } + /// + /// Ingests a received WebSocket result and associated data. + /// + /// + /// This overload is intended to be used to insert and error message into the stream + /// when a websocket error occurs. + /// + /// The received data. + public void IngestReceivedResult(BinaryData receivedBytes) + { + byte[] rawReceivedBytes = receivedBytes.ToArray(); + _contentStream.Position = _contentStream.Length; + _contentStream.Write(rawReceivedBytes, 0, rawReceivedBytes.Length); + _contentStream.Position = 0; + IsComplete = true; + } + /// /// Gets the accumulated message content as BinaryData. /// @@ -54,4 +71,4 @@ public BinaryData GetContent() return BinaryData.FromStream(_contentStream); } } -} \ No newline at end of file +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/.env.example b/sdk/ai/Azure.AI.VoiceLive/tests/.env.example new file mode 100644 index 000000000000..1c7f6159ee8f --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/.env.example @@ -0,0 +1,43 @@ +# Voice Live Test Environment Configuration +# Copy this file to .env and update with your values +# DO NOT commit .env to source control + +# ===== Core Service Configuration ===== +VOICELIVE_ENDPOINT=https://my-resource.cognitiveservices.azure.com +VOICELIVE_API_KEY=your-api-key-here +VOICELIVE_REGION=eastus + +# ===== Model Configuration ===== +VOICELIVE_REALTIME_MODEL=gpt-4o-realtime-preview +VOICELIVE_CASCADED_MODEL=gpt-4o +VOICELIVE_LITE_MODEL=phi4-mini + +# ===== Voice Configuration (Optional) ===== +# VOICELIVE_CUSTOM_VOICE_ENDPOINT=guid-here +# VOICELIVE_CUSTOM_VOICE_NAME=en-US-CustomNeural +# VOICELIVE_PERSONAL_VOICE_NAME=MyPersonalVoice +# VOICELIVE_PERSONAL_VOICE_MODEL=DragonLatestNeural + +# ===== Animation and Avatar (Optional) ===== +VOICELIVE_AVATAR_ENABLED=false +VOICELIVE_ANIMATION_ENABLED=false +# VOICELIVE_AVATAR_CHARACTER=lisa +# VOICELIVE_AVATAR_STYLE=casual-sitting +# VOICELIVE_ANIMATION_MODEL=default +# VOICELIVE_ICE_SERVERS=stun:stun.l.google.com:19302 + +# ===== AI Agent Integration (Optional) ===== +# VOICELIVE_AGENT_ID=agent-guid-here +# VOICELIVE_AGENT_CONNECTION=connection-string +# VOICELIVE_AGENT_THREAD_ID=thread-guid-here + +# ===== Audio Processing ===== +VOICELIVE_ECHO_CANCELLATION=false +VOICELIVE_NOISE_REDUCTION=false +VOICELIVE_TRANSCRIPTION_MODEL=whisper-1 + +# ===== Test Configuration ===== +VOICELIVE_TEST_AUDIO_PATH=./Audio +VOICELIVE_VERBOSE_LOGGING=false +VOICELIVE_DEFAULT_TIMEOUT=30 +VOICELIVE_EXTENDED_TIMEOUT=120 \ No newline at end of file diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Azure.AI.VoiceLive.Tests.csproj b/sdk/ai/Azure.AI.VoiceLive/tests/Azure.AI.VoiceLive.Tests.csproj index 8ac68ac6e7b1..a8ad16a52eb1 100644 --- a/sdk/ai/Azure.AI.VoiceLive/tests/Azure.AI.VoiceLive.Tests.csproj +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Azure.AI.VoiceLive.Tests.csproj @@ -1,4 +1,4 @@ - + $(RequiredTargetFrameworks) diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/FunctionCallingFlowTests.cs b/sdk/ai/Azure.AI.VoiceLive/tests/FunctionCallingFlowTests.cs index 4c8edffdaef8..ccb68a2c9bf4 100644 --- a/sdk/ai/Azure.AI.VoiceLive/tests/FunctionCallingFlowTests.cs +++ b/sdk/ai/Azure.AI.VoiceLive/tests/FunctionCallingFlowTests.cs @@ -34,7 +34,7 @@ public async Task ConfigureConversationSession_WithFunctionTools_RegistersAll() { var session = TestSessionFactory.CreateSessionWithFakeSocket(out var fake); - var options = new SessionOptions + var options = new VoiceLiveSessionOptions { Model = TestConstants.ModelName, Voice = new AzureStandardVoice(TestConstants.VoiceName) diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/FunctionCalls.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/FunctionCalls.cs new file mode 100644 index 000000000000..99454ca012d3 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/FunctionCalls.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.AI.VoiceLive.Tests +{ + internal static class FunctionCalls + { + public static readonly VoiceLiveFunctionDefinition AdditionDefinition = new VoiceLiveFunctionDefinition("add_numbers") + { + Description = "Add two numbers together", + Parameters = BinaryData.FromObjectAsJson(new + { + type = "object", + properties = new + { + a = new + { + type = "number", + description = "The first number to add" + }, + b = new + { + type = "number", + description = "The second number to add" + } + } + }) + }; + + public static readonly VoiceLiveFunctionDefinition SubtractionDefinition = new VoiceLiveFunctionDefinition("subtract_numbers") + { + Description = "Subtract two numbers", + Parameters = BinaryData.FromObjectAsJson(new + { + type = "object", + properties = new + { + a = new + { + type = "number", + description = "The first number to subtract" + }, + b = new + { + type = "number", + description = "The second number to subtract" + } + } + }) + }; + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/MockResponseGenerator.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/MockResponseGenerator.cs new file mode 100644 index 000000000000..4d3008f93152 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/MockResponseGenerator.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; +using System.Collections.Generic; + +namespace Azure.AI.VoiceLive.Tests.Infrastructure +{ + /// + /// Generates mock responses for testing with the fake WebSocket. + /// + public static class MockResponseGenerator + { + private static readonly Random _random = new Random(); + + /// + /// Generates a mock weather response for a location. + /// + public static string GenerateWeatherResponse(string location) + { + return JsonSerializer.Serialize(new + { + location = location, + temperature = _random.Next(60, 85), + condition = new[] { "Sunny", "Cloudy", "Rainy", "Partly cloudy" }[_random.Next(4)], + humidity = _random.Next(40, 80), + wind_speed = _random.Next(5, 20), + unit = "fahrenheit" + }); + } + + /// + /// Generates a mock time response for a timezone. + /// + public static string GenerateTimeResponse(string timezone) + { + var now = TimeZoneInfo.ConvertTimeFromUtc( + DateTime.UtcNow, + TimeZoneInfo.FindSystemTimeZoneById(timezone)); + + return JsonSerializer.Serialize(new + { + timezone = timezone, + time = now.ToString("h:mm tt"), + date = now.ToString("yyyy-MM-dd"), + dayOfWeek = now.DayOfWeek.ToString() + }); + } + + /// + /// Generates a mock calculation response. + /// + public static string GenerateCalculationResponse(string expression) + { + // This is a simplified mock that just returns a random result + return JsonSerializer.Serialize(new + { + expression = expression, + result = _random.Next(1, 1000), + calculation_type = "basic_arithmetic" + }); + } + + /// + /// Generates mock audio data that simulates a response. + /// + public static byte[] GenerateMockAudioResponse(int durationMs = 2000) + { + // Generate a simple tone pattern that sounds like speech rhythm + var sampleRate = 24000; + var samples = sampleRate * durationMs / 1000; + var buffer = new byte[samples * 2]; + + // Create envelope for more natural sound + for (int i = 0; i < samples; i++) + { + double t = (double)i / sampleRate; + + // Varying frequency to simulate speech patterns + double frequency = 200 + 100 * Math.Sin(2 * Math.PI * 2 * t); + + // Amplitude envelope + double envelope = Math.Sin(Math.PI * i / samples); + + // Generate sample + double sample = Math.Sin(2 * Math.PI * frequency * t) * envelope * 0.3; + short value = (short)(sample * short.MaxValue); + + buffer[i * 2] = (byte)(value & 0xFF); + buffer[i * 2 + 1] = (byte)((value >> 8) & 0xFF); + } + + return buffer; + } + + /// + /// Generates a mock WebSocket message for a response audio delta event. + /// + public static string GenerateResponseAudioDeltaMessage(byte[] audioData, string responseId = "resp_123", string itemId = "item_123") + { + var base64Audio = Convert.ToBase64String(audioData); + + return JsonSerializer.Serialize(new + { + type = "response.audio.delta", + event_id = Guid.NewGuid().ToString(), + response_id = responseId, + item_id = itemId, + content_index = 0, + output_index = 0, + delta = base64Audio + }); + } + + /// + /// Generates a mock WebSocket message for a response text delta event. + /// + public static string GenerateResponseTextDeltaMessage(string textDelta, string responseId = "resp_123", string itemId = "item_123") + { + return JsonSerializer.Serialize(new + { + type = "response.text_content.delta", + event_id = Guid.NewGuid().ToString(), + response_id = responseId, + item_id = itemId, + content_index = 0, + delta = textDelta + }); + } + + /// + /// Generates a mock WebSocket message for a response done event. + /// + public static string GenerateResponseDoneMessage(string responseId = "resp_123") + { + return JsonSerializer.Serialize(new + { + type = "response.done", + event_id = Guid.NewGuid().ToString(), + response_id = responseId, + usage = new + { + input_tokens = 10, + output_tokens = 20, + total_tokens = 30 + } + }); + } + + /// + /// Generates a mock WebSocket message for a function call event. + /// + public static string GenerateFunctionCallMessage(string functionName, string arguments, string callId = "call_123", string responseId = "resp_123") + { + return JsonSerializer.Serialize(new + { + type = "response.function_call.arguments.done", + event_id = Guid.NewGuid().ToString(), + response_id = responseId, + name = functionName, + call_id = callId, + arguments = arguments + }); + } + + /// + /// Generates a tool definition for the specified tool name. + /// + public static VoiceLiveFunctionDefinition GenerateToolDefinition(string toolName) + { + switch (toolName.ToLower()) + { + case "get_weather": + return new VoiceLiveFunctionDefinition("get_weather") + { + Description = "Get current weather for a location", + Parameters = BinaryData.FromString(JsonSerializer.Serialize(new + { + type = "object", + properties = new + { + location = new + { + type = "string", + description = "The city and state/country (e.g. 'Seattle, WA')" + } + }, + required = new[] { "location" } + })) + }; + + case "get_time": + return new VoiceLiveFunctionDefinition("get_time") + { + Description = "Get current time for a timezone", + Parameters = BinaryData.FromString(JsonSerializer.Serialize(new + { + type = "object", + properties = new + { + timezone = new + { + type = "string", + description = "The timezone ID (e.g. 'America/Los_Angeles')" + } + }, + required = new[] { "timezone" } + })) + }; + + case "calculate": + return new VoiceLiveFunctionDefinition("calculate") + { + Description = "Perform mathematical calculations", + Parameters = BinaryData.FromString(JsonSerializer.Serialize(new + { + type = "object", + properties = new + { + expression = new + { + type = "string", + description = "The mathematical expression to evaluate" + } + }, + required = new[] { "expression" } + })) + }; + + default: + return new VoiceLiveFunctionDefinition(toolName) + { + Description = $"Generic {toolName} function", + Parameters = BinaryData.FromString(JsonSerializer.Serialize(new + { + type = "object", + properties = new { }, + required = new string[] { } + })) + }; + } + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestAudioGenerator.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestAudioGenerator.cs new file mode 100644 index 000000000000..5f6afd313984 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestAudioGenerator.cs @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Threading.Tasks; + +namespace Azure.AI.VoiceLive.Tests.Infrastructure +{ + /// + /// Utilities for generating test audio programmatically. + /// + public static class TestAudioGenerator + { + /// + /// Generate silence of specified duration. + /// + public static byte[] GenerateSilence( + TimeSpan duration, + int sampleRate = 24000, + int channels = 1) + { + int totalSamples = (int)(duration.TotalSeconds * sampleRate * channels); + return new byte[totalSamples * 2]; // 16-bit PCM = 2 bytes per sample + } + + /// + /// Generate a pure tone for testing. + /// + public static byte[] GenerateTone( + double frequencyHz, + TimeSpan duration, + int sampleRate = 24000, + double amplitude = 0.5) + { + if (amplitude < 0 || amplitude > 1) + throw new ArgumentException("Amplitude must be between 0 and 1"); + + int samples = (int)(duration.TotalSeconds * sampleRate); + var buffer = new byte[samples * 2]; // 16-bit PCM + + for (int i = 0; i < samples; i++) + { + double angle = 2 * Math.PI * frequencyHz * i / sampleRate; + short value = (short)(Math.Sin(angle) * short.MaxValue * amplitude); + + // Little-endian byte order + buffer[i * 2] = (byte)(value & 0xFF); + buffer[i * 2 + 1] = (byte)((value >> 8) & 0xFF); + } + + return buffer; + } + + /// + /// Generate white noise for testing noise suppression. + /// + public static byte[] GenerateWhiteNoise( + TimeSpan duration, + int sampleRate = 24000, + double amplitude = 0.1) + { + var random = new Random(); + int samples = (int)(duration.TotalSeconds * sampleRate); + var buffer = new byte[samples * 2]; + + for (int i = 0; i < samples; i++) + { + // Random value between -1 and 1 + double noise = (random.NextDouble() * 2 - 1) * amplitude; + short value = (short)(noise * short.MaxValue); + + buffer[i * 2] = (byte)(value & 0xFF); + buffer[i * 2 + 1] = (byte)((value >> 8) & 0xFF); + } + + return buffer; + } + + /// + /// Mix audio with background noise. + /// + public static byte[] AddBackgroundNoise( + byte[] cleanAudio, + double noiseLevel = 0.1) + { + var noise = GenerateWhiteNoise( + TimeSpan.FromMilliseconds(cleanAudio.Length / 2 / 24.0), // Assuming 24kHz mono + 24000, + noiseLevel); + + var mixed = new byte[cleanAudio.Length]; + + for (int i = 0; i < cleanAudio.Length; i += 2) + { + // Convert bytes to short + short cleanSample = (short)(cleanAudio[i] | (cleanAudio[i + 1] << 8)); + short noiseSample = 0; + + if (i < noise.Length) + { + noiseSample = (short)(noise[i] | (noise[i + 1] << 8)); + } + + // Mix samples + int mixedSample = cleanSample + noiseSample; + + // Clamp to short range + if (mixedSample > short.MaxValue) + mixedSample = short.MaxValue; + if (mixedSample < short.MinValue) + mixedSample = short.MinValue; + + // Convert back to bytes + mixed[i] = (byte)(mixedSample & 0xFF); + mixed[i + 1] = (byte)((mixedSample >> 8) & 0xFF); + } + + return mixed; + } + + /// + /// Creates a wave file header for PCM16 data. + /// + private static byte[] CreateWaveHeader(int dataSize, int sampleRate, int channels) + { + using var ms = new MemoryStream(); + using var writer = new BinaryWriter(ms); + + // RIFF header + writer.Write(new char[] { 'R', 'I', 'F', 'F' }); + writer.Write(36 + dataSize); // 36 + subchunk2size + writer.Write(new char[] { 'W', 'A', 'V', 'E' }); + + // Format subchunk + writer.Write(new char[] { 'f', 'm', 't', ' ' }); + writer.Write(16); // Subchunk1Size (16 for PCM) + writer.Write((short)1); // AudioFormat (1 for PCM) + writer.Write((short)channels); // NumChannels + writer.Write(sampleRate); // SampleRate + writer.Write(sampleRate * channels * 2); // ByteRate + writer.Write((short)(channels * 2)); // BlockAlign + writer.Write((short)16); // BitsPerSample + + // Data subchunk + writer.Write(new char[] { 'd', 'a', 't', 'a' }); + writer.Write(dataSize); + + return ms.ToArray(); + } + + /// + /// Wraps PCM16 data with WAV header. + /// + public static byte[] WrapInWavHeader(byte[] pcmData, int sampleRate = 24000, int channels = 1) + { + var header = CreateWaveHeader(pcmData.Length, sampleRate, channels); + var result = new byte[header.Length + pcmData.Length]; + + Array.Copy(header, 0, result, 0, header.Length); + Array.Copy(pcmData, 0, result, header.Length, pcmData.Length); + + return result; + } + + /// + /// Saves PCM16 data as a WAV file. + /// + public static void SaveAsWav(byte[] pcmData, string filePath, int sampleRate = 24000, int channels = 1) + { + var wavData = WrapInWavHeader(pcmData, sampleRate, channels); + File.WriteAllBytes(filePath, wavData); + } + + /// + /// Converts between audio formats (simplified implementation). + /// + public static byte[] ConvertAudioFormat( + byte[] pcm16Audio, + string targetFormat, + int sampleRate = 8000) + { + switch (targetFormat.ToLower()) + { + case "g711_ulaw": + case "ulaw": + return ConvertToULaw(pcm16Audio); + + case "g711_alaw": + case "alaw": + return ConvertToALaw(pcm16Audio); + + case "pcm16": + return pcm16Audio; + + default: + throw new NotSupportedException($"Format {targetFormat} not supported"); + } + } + + // Simple implementation of µ-law encoding + private static byte[] ConvertToULaw(byte[] pcm16) + { + var output = new byte[pcm16.Length / 2]; + + for (int i = 0; i < pcm16.Length; i += 2) + { + short sample = (short)(pcm16[i] | (pcm16[i + 1] << 8)); + output[i / 2] = LinearToMuLaw(sample); + } + + return output; + } + + // Simple implementation of A-law encoding + private static byte[] ConvertToALaw(byte[] pcm16) + { + var output = new byte[pcm16.Length / 2]; + + for (int i = 0; i < pcm16.Length; i += 2) + { + short sample = (short)(pcm16[i] | (pcm16[i + 1] << 8)); + output[i / 2] = LinearToALaw(sample); + } + + return output; + } + + // Basic µ-law conversion (simplified) + private static byte LinearToMuLaw(short pcm) + { + int sign = (pcm < 0) ? 0x80 : 0x00; + if (pcm < 0) + pcm = (short)-pcm; + + pcm += 132; + + byte exponent = 0; + for (int i = 14; i >= 6; i--) + { + if ((pcm & (1 << i)) != 0) + { + exponent = (byte)(i - 6); + break; + } + } + + byte mantissa = (byte)((pcm >> (exponent + 3)) & 0x0F); + byte mulaw = (byte)(~(sign | (exponent << 4) | mantissa)); + + return mulaw; + } + + // Basic A-law conversion (simplified) + private static byte LinearToALaw(short pcm) + { + int sign = (pcm < 0) ? 0x80 : 0x00; + if (pcm < 0) + pcm = (short)-pcm; + + int exponent = 0; + for (int i = 11; i >= 5; i--) + { + if ((pcm & (1 << i)) != 0) + { + exponent = i - 4; + break; + } + } + + int mantissa = (pcm >> (exponent + 1)) & 0x0F; + byte alaw = (byte)(sign | (exponent << 4) | mantissa); + + return (byte)~alaw; + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestConstants.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestConstants.cs index 898b6fa7df72..fbd632837785 100644 --- a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestConstants.cs +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestConstants.cs @@ -8,8 +8,83 @@ namespace Azure.AI.VoiceLive.Tests.Infrastructure /// public static class TestConstants { + // ===== Basic Constants ===== public const string ModelName = "gpt-4o-mini-realtime-preview"; public const string VoiceName = "en-US-AvaNeural"; public const string DefaultLocale = "en-US"; + + // ===== Azure Voice Types ===== + public const string DefaultAzureVoice = "en-US-AriaNeural"; + public const string AlternateAzureVoice = "en-US-JennyNeural"; + public const string HDVoice = "en-US-Ava:DragonHDLatestNeural"; + + // ===== OpenAI Voices (realtime models only) ===== + public const string OpenAIVoiceAlloy = "alloy"; + public const string OpenAIVoiceEcho = "echo"; + public const string OpenAIVoiceShimmer = "shimmer"; + public const string OpenAIVoiceCoral = "coral"; + public const string OpenAIVoiceSage = "sage"; + public const string OpenAIVoiceAsh = "ash"; + public const string OpenAIVoiceBallad = "ballad"; + public const string OpenAIVoiceVerse = "verse"; + + // ===== Audio Formats ===== + public const string FormatPCM16 = "pcm16"; + public const string FormatG711ULaw = "g711_ulaw"; + public const string FormatG711ALaw = "g711_alaw"; + + // ===== Input Modalities ===== + public const string ModalityText = "text"; + public const string ModalityAudio = "audio"; + public const string ModalityAnimation = "animation"; + public const string ModalityAvatar = "avatar"; + + // ===== Transcription Models ===== + public const string TranscriptionWhisper1 = "whisper-1"; + public const string TranscriptionAzureSpeech = "azure-speech"; + public const string TranscriptionAzureFast = "azure-fast-transcription"; + public const string TranscriptionS2SIngraph = "s2s-ingraph"; + + // ===== Animation Output Types ===== + public const string AnimationBlendshapes = "blendshapes"; + public const string AnimationVisemeId = "viseme_id"; + public const string AnimationEmotion = "emotion"; + + // ===== Common Test Phrases ===== + public const string TestPhraseHello = "Hello, how are you?"; + public const string TestPhraseWeather = "What's the weather in Seattle?"; + public const string TestPhraseLongStory = "Tell me a long story about space exploration"; + public const string TestPhraseCalculation = "What is 25 times 37?"; + public const string TestPhraseMultilingual = "Bonjour, comment allez-vous?"; + + // ===== Tool Call Test Functions ===== + public const string TestToolGetWeather = "get_weather"; + public const string TestToolCalculate = "calculate"; + public const string TestToolSearch = "web_search"; + + // ===== Timeouts ===== + public static readonly System.TimeSpan QuickTimeout = System.TimeSpan.FromSeconds(5); + public static readonly System.TimeSpan StandardTimeout = System.TimeSpan.FromSeconds(30); + public static readonly System.TimeSpan ExtendedTimeout = System.TimeSpan.FromMinutes(2); + public static readonly System.TimeSpan AnimationTimeout = System.TimeSpan.FromSeconds(10); + + // ===== Audio Sample Rates ===== + public const int SampleRate16kHz = 16000; + public const int SampleRate24kHz = 24000; + public const int SampleRate48kHz = 48000; + + // ===== Test File Names ===== + public const string AudioFileHello = "Basic/hello.wav"; + public const string AudioFileWeather = "Questions/whats_weather_in_seattle.wav"; + public const string AudioFileLongSpeech = "LongForm/conversation_120s.wav"; + public const string AudioFileWithNoise = "WithIssues/hello_with_background_noise.wav"; + public const string AudioFileMultiSpeaker = "WithIssues/multiple_speakers.wav"; + + // ===== Response Status Values ===== + public const string StatusInProgress = "in_progress"; + public const string StatusCompleted = "completed"; + public const string StatusIncomplete = "incomplete"; + public const string StatusFailed = "failed"; + public const string StatusCancelled = "cancelled"; } } diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestDataValidator.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestDataValidator.cs new file mode 100644 index 000000000000..eedb0e9be677 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TestDataValidator.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Collections.Generic; +using NUnit.Framework; + +namespace Azure.AI.VoiceLive.Tests.Infrastructure +{ + /// + /// Validates test audio files meet requirements. + /// + public static class TestDataValidator + { + /// + /// Validates that required test audio files exist in the test directory + /// + public static void ValidateRequiredTestFiles(string testAudioPath) + { + var requiredTestFiles = new List + { + Path.Combine(testAudioPath, "Basic", "hello.wav"), + Path.Combine(testAudioPath, "Questions", "whats_weather_in_seattle.wav") + }; + + foreach (var file in requiredTestFiles) + { + if (!File.Exists(file)) + { + TestContext.WriteLine($"Warning: Required test file not found: {file}"); + } + } + } + + /// + /// Checks if a file is a valid WAV file + /// + public static ValidationResult ValidateAudioFile(string filePath) + { + var result = new ValidationResult { FilePath = filePath }; + + try + { + if (!File.Exists(filePath)) + { + result.Errors.Add($"File not found: {filePath}"); + return result; + } + + var fileInfo = new FileInfo(filePath); + + // Check file size + if (fileInfo.Length == 0) + { + result.Errors.Add("File is empty"); + } + else if (fileInfo.Length > 10 * 1024 * 1024) // 10MB + { + result.Warnings.Add($"File is large ({fileInfo.Length / 1024 / 1024}MB)"); + } + + // Validate WAV header + using var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); + using var reader = new BinaryReader(fs); + + // Check RIFF header + if (new string(reader.ReadChars(4)) != "RIFF") + { + result.Errors.Add("Not a valid RIFF file"); + return result; + } + + reader.ReadInt32(); // File size minus 8 bytes + + // Check WAVE format + if (new string(reader.ReadChars(4)) != "WAVE") + { + result.Errors.Add("Not a valid WAVE file"); + return result; + } + + // Look for fmt chunk + bool foundFmt = false; + bool foundData = false; + + while (fs.Position < fs.Length - 8 && !(foundFmt && foundData)) + { + string chunkId = new string(reader.ReadChars(4)); + int chunkSize = reader.ReadInt32(); + + if (chunkId == "fmt ") + { + foundFmt = true; + + // Read format info + short audioFormat = reader.ReadInt16(); + if (audioFormat != 1) // PCM = 1 + { + result.Warnings.Add($"Non-PCM format: {audioFormat}"); + } + + short channels = reader.ReadInt16(); + result.Channels = channels; + + int sampleRate = reader.ReadInt32(); + result.SampleRate = sampleRate; + + reader.ReadInt32(); // Byte rate + reader.ReadInt16(); // Block align + + short bitsPerSample = reader.ReadInt16(); + result.BitDepth = bitsPerSample; + + if (bitsPerSample != 16) + { + result.Warnings.Add($"Not 16-bit PCM: {bitsPerSample} bits per sample"); + } + + fs.Seek(chunkSize - 16, SeekOrigin.Current); // Skip remaining format data + } + else if (chunkId == "data") + { + foundData = true; + result.Duration = TimeSpan.FromSeconds((double)chunkSize / (result.SampleRate * result.Channels * (result.BitDepth / 8))); + fs.Seek(chunkSize, SeekOrigin.Current); // Skip data + } + else + { + fs.Seek(chunkSize, SeekOrigin.Current); // Skip other chunks + } + } + + if (!foundFmt) + { + result.Errors.Add("No format chunk found"); + } + + if (!foundData) + { + result.Errors.Add("No data chunk found"); + } + + // Check sample rate + var validSampleRates = new[] { 8000, 16000, 24000, 48000 }; + if (!Array.Exists(validSampleRates, sr => sr == result.SampleRate)) + { + result.Warnings.Add($"Unusual sample rate: {result.SampleRate}Hz"); + } + + // Check duration + if (result.Duration.TotalSeconds < 0.1) + { + result.Warnings.Add($"Very short audio: {result.Duration.TotalMilliseconds}ms"); + } + else if (result.Duration.TotalMinutes > 5) + { + result.Warnings.Add($"Very long audio: {result.Duration.TotalMinutes} minutes"); + } + + result.IsValid = result.Errors.Count == 0; + } + catch (Exception ex) + { + result.Errors.Add($"Failed to read audio: {ex.Message}"); + result.IsValid = false; + } + + return result; + } + + /// + /// Creates test data directory structure if it doesn't exist + /// + public static void EnsureTestDataDirectoryStructure(string testAudioPath) + { + var directories = new[] + { + "Basic", + "Questions", + "WithIssues", + "Formats", + "Languages", + "LongForm", + "Commands", + "Mixed", + "Noise", + "Tones" + }; + + foreach (var dir in directories) + { + Directory.CreateDirectory(Path.Combine(testAudioPath, dir)); + } + } + + /// + /// Validation result for audio file checks + /// + public class ValidationResult + { + public string FilePath { get; set; } = string.Empty; + public bool IsValid { get; set; } + public List Errors { get; } = new List(); + public List Warnings { get; } = new List(); + public TimeSpan Duration { get; set; } + public int SampleRate { get; set; } + public int Channels { get; set; } + public int BitDepth { get; set; } + + public override string ToString() + { + return $"{Path.GetFileName(FilePath)}: {(IsValid ? "Valid" : "Invalid")} - {SampleRate}Hz, {Channels}ch, {BitDepth}bit, {Duration.TotalSeconds:F1}s"; + } + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TimeoutTestBase.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TimeoutTestBase.cs new file mode 100644 index 000000000000..70252cc82499 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/TimeoutTestBase.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.VoiceLive.Tests.Infrastructure +{ + public abstract class TimeOutTestBase : RecordedTestBase where TEnv : TestEnvironment, new() + { + private static readonly TimeSpan _actionTimeout = Debugger.IsAttached ? TimeSpan.FromMinutes(15) : TimeSpan.FromSeconds(15); + private static readonly TimeSpan _testTimeout = Debugger.IsAttached ? TimeSpan.FromMinutes(60) : TimeSpan.FromSeconds(60); + + private CancellationToken _timeoutToken = new CancellationTokenSource(_testTimeout).Token; + + protected TimeOutTestBase(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + protected async Task TimeoutTestAction(Task action, string message = "") + { + var t = await Task.WhenAny(action, Task.Delay(_actionTimeout, _timeoutToken)).ConfigureAwait(false); + Assert.AreEqual(action, t, message); + } + + protected Task TimeoutTestAction(TaskCompletionSource action, string message = "") => + TimeoutTestAction(action.Task, message); + + protected static TimeSpan ActionTimeout { get => _actionTimeout; } + protected static TimeSpan TestTimeout { get => _testTimeout; } + protected CancellationToken TimeoutToken { get => _timeoutToken; } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/VoiceLiveTestEnvironment.cs b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/VoiceLiveTestEnvironment.cs new file mode 100644 index 000000000000..869dbdcc2e5f --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/Infrastructure/VoiceLiveTestEnvironment.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using Azure.Core.TestFramework; +using Microsoft.Extensions.Hosting; + +namespace Azure.AI.VoiceLive.Tests.Infrastructure +{ + /// + /// Test environment configuration for Voice Live Service tests. + /// Manages credentials, endpoints, and test settings. + /// + public class VoiceLiveTestEnvironment : TestEnvironment + { + // ===== Core Service Configuration ===== + + /// + /// Voice Live Service endpoint URL. + /// Example: https://my-resource.cognitiveservices.azure.com + /// + public string Endpoint => GetOptionalVariable("VOICELIVE_ENDPOINT") ?? "https://changfu-azure-ai-service.services.ai.azure.com"; + + /// + /// API key for authentication (alternative to Azure AD). + /// Keep secret and never record. + /// + public string ApiKey => GetOptionalVariable("VOICELIVE_API_KEY"); + + /// + /// Azure region for the service. + /// + public string Region => GetOptionalVariable("VOICELIVE_REGION") ?? "eastus"; + + // ===== Model Configuration ===== + + /// + /// Realtime model for native audio processing. + /// Examples: gpt-4o-realtime-preview, gpt-4o-mini-realtime-preview + /// + public string RealtimeModel => GetOptionalVariable("VOICELIVE_REALTIME_MODEL") ?? "gpt-4o-realtime-preview"; + + /// + /// Cascaded model using Azure Speech Services. + /// Examples: gpt-4o, gpt-4.1, phi4-mini + /// + public string CascadedModel => GetOptionalVariable("VOICELIVE_CASCADED_MODEL") ?? "gpt-4o"; + + /// + /// Lightweight model for testing. + /// + public string LiteModel => GetOptionalVariable("VOICELIVE_LITE_MODEL") ?? "phi4-mini"; + + // ===== Voice Configuration ===== + + /// + /// Custom voice endpoint ID (GUID). + /// Only set if custom voice is deployed. + /// + public string CustomVoiceEndpointId => GetOptionalVariable("VOICELIVE_CUSTOM_VOICE_ENDPOINT") ?? string.Empty; + + /// + /// Custom voice name. + /// + public string CustomVoiceName => GetOptionalVariable("VOICELIVE_CUSTOM_VOICE_NAME") ?? "en-US-CustomNeural"; + + /// + /// Personal voice name for testing AzurePersonalVoice. + /// + public string PersonalVoiceName => GetOptionalVariable("VOICELIVE_PERSONAL_VOICE_NAME") ?? string.Empty; + + /// + /// Personal voice model (DragonLatestNeural, PhoenixLatestNeural, PhoenixV2Neural). + /// + public string PersonalVoiceModel => GetOptionalVariable("VOICELIVE_PERSONAL_VOICE_MODEL") ?? "DragonLatestNeural"; + + // ===== Animation and Avatar Configuration ===== + + /// + /// Avatar character name. + /// + public string AvatarCharacter => GetOptionalVariable("VOICELIVE_AVATAR_CHARACTER") ?? "lisa"; + + /// + /// Avatar style. + /// + public string AvatarStyle => GetOptionalVariable("VOICELIVE_AVATAR_STYLE") ?? "casual-sitting"; + + /// + /// Animation model name. + /// + public string AnimationModel => GetOptionalVariable("VOICELIVE_ANIMATION_MODEL") ?? "default"; + + /// + /// ICE server URLs for WebRTC (comma-separated). + /// + public string IceServerUrls => GetOptionalVariable("VOICELIVE_ICE_SERVERS") ?? "stun:stun.l.google.com:19302"; + + // ===== AI Agent Configuration ===== + + /// + /// AI Agent ID for agent integration tests. + /// + public string AgentId => GetOptionalVariable("VOICELIVE_AGENT_ID") ?? string.Empty; + + /// + /// AI Agent connection string. + /// + public string AgentConnectionString => GetOptionalVariable("VOICELIVE_AGENT_CONNECTION") ?? string.Empty; + + /// + /// AI Agent thread ID for conversation continuity. + /// + public string AgentThreadId => GetOptionalVariable("VOICELIVE_AGENT_THREAD_ID") ?? string.Empty; + + // ===== Audio Processing Configuration ===== + + /// + /// Enable echo cancellation in tests. + /// + public bool EnableEchoCancellation => bool.Parse(GetOptionalVariable("VOICELIVE_ECHO_CANCELLATION") ?? "false"); + + /// + /// Enable noise reduction in tests. + /// + public bool EnableNoiseReduction => bool.Parse(GetOptionalVariable("VOICELIVE_NOISE_REDUCTION") ?? "false"); + + /// + /// Default audio input transcription model. + /// Options: whisper-1, azure-speech, azure-fast-transcription, s2s-ingraph + /// + public string TranscriptionModel => GetOptionalVariable("VOICELIVE_TRANSCRIPTION_MODEL") ?? "whisper-1"; + + // ===== Test Configuration ===== + + /// + /// Path to test audio files. + /// + public string TestAudioPath => GetOptionalVariable("VOICELIVE_TEST_AUDIO_PATH") ?? Path.Combine(Directory.GetCurrentDirectory(), "Audio"); + + /// + /// Enable extended logging for debugging. + /// + public bool EnableVerboseLogging => bool.Parse(GetOptionalVariable("VOICELIVE_VERBOSE_LOGGING") ?? "false"); + + /// + /// Default timeout for operations. + /// + public TimeSpan DefaultTimeout => TimeSpan.FromSeconds( + int.Parse(GetOptionalVariable("VOICELIVE_DEFAULT_TIMEOUT") ?? "30")); + + /// + /// Extended timeout for long-running operations. + /// + public TimeSpan ExtendedTimeout => TimeSpan.FromSeconds( + int.Parse(GetOptionalVariable("VOICELIVE_EXTENDED_TIMEOUT") ?? "120")); + + // ===== Feature Flags ===== + + public bool HasCustomVoice => !string.IsNullOrEmpty(CustomVoiceEndpointId); + public bool HasPersonalVoice => !string.IsNullOrEmpty(PersonalVoiceName); + public bool HasAgent => !string.IsNullOrEmpty(AgentId); + public bool HasAvatarSupport => bool.Parse(GetOptionalVariable("VOICELIVE_AVATAR_ENABLED") ?? "false"); + + public bool HasAnimationSupport => bool.Parse(GetOptionalVariable("VOICELIVE_ANIMATION_ENABLED") ?? "false"); + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/BasicConversationTests.cs b/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/BasicConversationTests.cs new file mode 100644 index 000000000000..74eca37fc911 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/BasicConversationTests.cs @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Identity; +using Microsoft.Extensions.Azure; +using Microsoft.Extensions.Logging; +using NUnit.Framework; + +namespace Azure.AI.VoiceLive.Tests +{ + public class BasicConversationTests : VoiceLiveTestBase + { + public BasicConversationTests() : base(true) + { } + + public BasicConversationTests(bool isAsync) : base(isAsync) + { + } + + /// + /// Test case to send audio to the VoiceLive Service and validate the response. + /// + /// + /// The goal of the test is not to validate the content of the result for transcription accuracy or the quality + /// of the response, but rather for the correct sequence of events and that the events are well formed. + /// + /// + [LiveOnly] + [TestCase] + public async Task BasicHelloTest() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + InputAudioFormat = AudioFormat.Pcm16 + }; + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + + var sessionCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + var sessionUpdated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + Assert.AreEqual(sessionUpdated.Session.InputAudioFormat, AudioFormat.Pcm16); + Assert.AreEqual(sessionCreated.Session.Id, sessionUpdated.Session.Id); + Assert.AreEqual(sessionCreated.Session.Model, sessionUpdated.Session.Model); + Assert.AreEqual(sessionCreated.Session.Agent, sessionUpdated.Session.Agent); + Assert.AreEqual(sessionCreated.Session.Animation, sessionUpdated.Session.Animation); + Assert.AreEqual(sessionCreated.Session.Avatar, sessionUpdated.Session.Avatar); + Assert.AreEqual(sessionCreated.Session.InputAudioEchoCancellation, sessionUpdated.Session?.InputAudioEchoCancellation); + + // Flow audio to the service. + await SendAudioAsync(session, "Weather.wav").ConfigureAwait(false); + + // Now we get a speech started + var speechStarted = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.IsTrue(speechStarted.AudioStart >= TimeSpan.Zero); + + var inputAudioId = speechStarted.ItemId; + + var speechEnded = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.AreEqual(inputAudioId, speechEnded.ItemId); + Assert.IsTrue(speechEnded.AudioEnd > speechStarted.AudioStart); + + var bufferCommitted = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.AreEqual(inputAudioId, bufferCommitted.ItemId); + + var transcript = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.AreEqual(inputAudioId, transcript.ItemId); + Assert.IsFalse(string.IsNullOrWhiteSpace(transcript.Transcript)); + + var conversationItemCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.IsTrue(conversationItemCreated.PreviousItemId == null); + Assert.IsTrue(conversationItemCreated.Item.Type == ItemType.Message); + + var message = SafeCast(conversationItemCreated.Item); + Assert.AreEqual(ResponseMessageRole.User, message.Role); + Assert.AreEqual(1, message.Content.Count); + Assert.AreEqual(ContentPartType.InputAudio, message.Content[0].Type); + + // TODO: Confusing that this isn't InputAudioContentPart. + var contentPart = SafeCast(message.Content[0]); + Assert.AreEqual(transcript.Transcript, contentPart.Transcript); + + var responseCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + var responseItems = await CollectResponseUpdates(updatesEnum, TimeoutToken).ConfigureAwait(false); + + Assert.IsTrue(responseItems.Count() > 0); + + responseItems.Insert(0, responseCreated); + + ValidateResponseUpdates(responseItems, message.Id); + } + + [LiveOnly] + [TestCase] + public async Task BasicToolCallTest() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + Modalities = { InputModality.Text } + }; + + options.Tools.Add(FunctionCalls.AdditionDefinition); + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + + var sessionCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + var sessionUpdated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + Assert.AreEqual(sessionUpdated.Session.InputAudioFormat, AudioFormat.Pcm16); + Assert.AreEqual(sessionCreated.Session.Id, sessionUpdated.Session.Id); + Assert.AreEqual(sessionCreated.Session.Model, sessionUpdated.Session.Model); + Assert.AreEqual(sessionCreated.Session.Agent, sessionUpdated.Session.Agent); + Assert.AreEqual(sessionCreated.Session.Animation, sessionUpdated.Session.Animation); + Assert.AreEqual(sessionCreated.Session.Avatar, sessionUpdated.Session.Avatar); + Assert.AreEqual(sessionCreated.Session.InputAudioEchoCancellation, sessionUpdated.Session?.InputAudioEchoCancellation); + + var content = new InputTextContentPart("What is 13 plus 29?"); + + await session.AddItemAsync(new UserMessageItem(new[] { content }), null, TimeoutToken).ConfigureAwait(false); + + var conversationItemCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.IsTrue(conversationItemCreated.PreviousItemId == null); + var message = SafeCast(conversationItemCreated.Item); + Assert.AreEqual(ResponseMessageRole.User, message.Role); + Assert.AreEqual(1, message.Content.Count); + Assert.AreEqual(ContentPartType.InputText, message.Content[0].Type); + var textPart = SafeCast(message.Content[0]); + Assert.AreEqual(content.Text, textPart.Text); + + await session.StartResponseAsync(TimeoutToken).ConfigureAwait(false); + var responseCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + var responseItems = await CollectResponseUpdates(updatesEnum, TimeoutToken).ConfigureAwait(false); + Assert.IsTrue(responseItems.Count() > 0); + responseItems.Insert(0, responseCreated); + ValidateResponseUpdates(responseItems, string.Empty); + } + + [LiveOnly] + [TestCase] + public async Task PrallelToolCallTest() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + Modalities = { InputModality.Text } + }; + + options.Tools.Add(FunctionCalls.AdditionDefinition); + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + + var sessionCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + var sessionUpdated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + Assert.AreEqual(sessionUpdated.Session.InputAudioFormat, AudioFormat.Pcm16); + Assert.AreEqual(sessionCreated.Session.Id, sessionUpdated.Session.Id); + Assert.AreEqual(sessionCreated.Session.Model, sessionUpdated.Session.Model); + Assert.AreEqual(sessionCreated.Session.Agent, sessionUpdated.Session.Agent); + Assert.AreEqual(sessionCreated.Session.Animation, sessionUpdated.Session.Animation); + Assert.AreEqual(sessionCreated.Session.Avatar, sessionUpdated.Session.Avatar); + Assert.AreEqual(sessionCreated.Session.InputAudioEchoCancellation, sessionUpdated.Session?.InputAudioEchoCancellation); + + var content1 = new InputTextContentPart("What is 13 plus 29?"); + var content2 = new InputTextContentPart("What is 87 plus 11?"); + + await session.AddItemAsync(new UserMessageItem(new[] { content1, content2 }), null, TimeoutToken).ConfigureAwait(false); + + var conversationItemCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.IsTrue(conversationItemCreated.PreviousItemId == null); + var message = SafeCast(conversationItemCreated.Item); + Assert.AreEqual(ResponseMessageRole.User, message.Role); + Assert.AreEqual(2, message.Content.Count); + Assert.AreEqual(ContentPartType.InputText, message.Content[0].Type); + var textPart1 = SafeCast(message.Content[0]); + Assert.AreEqual(content1.Text, textPart1.Text); + Assert.AreEqual(ContentPartType.InputText, message.Content[1].Type); + var textPart2 = SafeCast(message.Content[1]); + Assert.AreEqual(content2.Text, textPart2.Text); + + await session.StartResponseAsync(TimeoutToken).ConfigureAwait(false); + var responseCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + var responseItems = await CollectResponseUpdates(updatesEnum, TimeoutToken).ConfigureAwait(false); + Assert.IsTrue(responseItems.Count() > 0); + responseItems.Insert(0, responseCreated); + ValidateResponseUpdates(responseItems, string.Empty); + } + + private void ValidateResponseUpdates(List responseItems, string previousItemId) + { + var responseId = string.Empty; + var responseItemId = string.Empty; + + Dictionary deltaBuilders = new Dictionary(); + + Stack> incompleteOutputItems = new Stack>(); + + foreach (var item in responseItems) + { + switch (item) + { + case SessionUpdateResponseCreated responseCreated: + Assert.AreEqual(string.Empty, responseId); + Assert.AreEqual(ServerEventType.ResponseCreated, responseCreated.Type); + + var response = responseCreated.Response; + Assert.IsNotNull(response); + Assert.AreEqual(VoiceLiveResponseStatus.InProgress, response.Status); + + responseId = response.Id; + incompleteOutputItems.Push(new HashSet()); + incompleteOutputItems.Peek().Add(response.Id); + break; + + case SessionUpdateResponseOutputItemAdded outputItem: + Assert.AreEqual(responseId, outputItem.ResponseId); + Assert.AreEqual(0, outputItem.OutputIndex); + Assert.IsNotNull(outputItem.Item); + + responseItemId = outputItem.Item.Id; + + switch (outputItem.Item) + { + case ResponseMessageItem messageItem: + Assert.AreEqual(ResponseMessageRole.Assistant, messageItem.Role); + Assert.AreEqual(VoiceLiveResponseItemStatus.Incomplete, messageItem.Status); + break; + case ResponseFunctionCallItem functionCallItem: + responseItemId = functionCallItem.Id; + Assert.AreEqual(VoiceLiveResponseItemStatus.InProgress, functionCallItem.Status); + Assert.IsFalse(string.IsNullOrWhiteSpace(functionCallItem.Name)); + + deltaBuilders.Add(functionCallItem.CallId, new StringBuilder()); + break; + default: + Assert.Fail($"Unknown output item type {outputItem.Item.GetType()}"); + break; + } + break; + + case SessionUpdateConversationItemCreated newConversationItem: + Assert.AreEqual(previousItemId, newConversationItem.PreviousItemId); + Assert.IsNotNull(newConversationItem.Item); + + switch (newConversationItem.Item) + { + case ResponseMessageItem messageItem: + Assert.AreEqual(ResponseMessageRole.Assistant, messageItem.Role); + break; + + case ResponseFunctionCallItem functionCallItem: + break; + + default: + Assert.Fail($"Unknown conversation item type {newConversationItem.Item.GetType()}"); + break; + } + break; + + case SessionUpdateResponseContentPartAdded contentPartAdded: + Assert.AreEqual(responseId, contentPartAdded.ResponseId); + Assert.AreEqual(responseItemId, contentPartAdded.ItemId); + Assert.IsNotNull(contentPartAdded.Part); + Assert.IsTrue(contentPartAdded.OutputIndex == 0); + Assert.IsTrue(contentPartAdded.ContentIndex >= 0); + + deltaBuilders.Add(contentPartAdded.ItemId, new StringBuilder()); + + switch (contentPartAdded.Part) + { + case ResponseTextContentPart textPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(textPart.Text)); + break; + case ResponseAudioContentPart audioPart: + Assert.IsTrue(string.IsNullOrWhiteSpace(audioPart.Transcript)); + break; + default: + Assert.Fail($"Unknown content part type {contentPartAdded.Part.GetType()}"); + break; + } + break; + + case SessionUpdateResponseAudioTranscriptDelta audioTranscriptDelta: + Assert.AreEqual(responseId, audioTranscriptDelta.ResponseId); + Assert.AreEqual(responseItemId, audioTranscriptDelta.ItemId); + Assert.IsFalse(string.IsNullOrEmpty(audioTranscriptDelta.Delta)); + deltaBuilders[audioTranscriptDelta.ItemId].Append(audioTranscriptDelta.Delta); + break; + + case SessionUpdateResponseAudioDelta audioDelta: + Assert.AreEqual(responseId, audioDelta.ResponseId); + Assert.AreEqual(responseItemId, audioDelta.ItemId); + Assert.IsFalse(audioDelta.Delta.ToMemory().IsEmpty); + Console.WriteLine($"Audio delta length: {audioDelta.Delta.ToMemory().Length}"); + break; + + case SessionUpdateResponseAudioDone audioDone: + Assert.AreEqual(responseId, audioDone.ResponseId); + Assert.AreEqual(responseItemId, audioDone.ItemId); + break; + + case SessionUpdateResponseAudioTranscriptDone done: + Assert.AreEqual(responseId, done.ResponseId); + Assert.AreEqual(responseItemId, done.ItemId); + Assert.IsFalse(string.IsNullOrEmpty(done.Transcript)); + Assert.AreEqual(done.Transcript.Length, deltaBuilders[done.ItemId].ToString().Length); + Assert.AreEqual(done.Transcript, deltaBuilders[done.ItemId].ToString()); + break; + + case SessionUpdateResponseContentPartDone contentDone: + Assert.AreEqual(responseId, contentDone.ResponseId); + Assert.AreEqual(responseItemId, contentDone.ItemId); + + switch (contentDone.Part) + { + case ResponseTextContentPart textPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(textPart.Text)); + Assert.AreEqual(textPart.Text.Length, deltaBuilders[contentDone.ItemId].ToString().Length); + Assert.AreEqual(textPart.Text, deltaBuilders[contentDone.ItemId].ToString()); + break; + case ResponseAudioContentPart audioPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(audioPart.Transcript)); + Assert.AreEqual(audioPart.Transcript, deltaBuilders[contentDone.ItemId].ToString()); + break; + default: + Assert.Fail($"Unknown content part type {contentDone.Part.GetType()}"); + break; + } + break; + + case SessionUpdateResponseOutputItemDone responseOutputDone: + Assert.AreEqual(responseId, responseOutputDone.ResponseId); + + switch (responseOutputDone.Item) + { + case ResponseMessageItem messageItem: + Assert.AreEqual(ResponseMessageRole.Assistant, messageItem.Role); + Assert.AreEqual(VoiceLiveResponseItemStatus.Completed, messageItem.Status); + Assert.IsTrue(messageItem.Content.Count > 0); + + switch (messageItem.Content[0]) + { + case ResponseTextContentPart textPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(textPart.Text)); + Assert.AreEqual(textPart.Text.Length, deltaBuilders[messageItem.Id].ToString().Length); + Assert.AreEqual(textPart.Text, deltaBuilders[messageItem.Id].ToString()); + break; + case ResponseAudioContentPart audioPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(audioPart.Transcript)); + Assert.AreEqual(audioPart.Transcript, deltaBuilders[messageItem.Id].ToString()); + break; + default: + Assert.Fail($"Unknown content part type {messageItem.Content[0].GetType()}"); + break; + } + break; + + case ResponseFunctionCallItem functionCallItem: + Assert.AreEqual(VoiceLiveResponseItemStatus.Completed, functionCallItem.Status); + Assert.IsFalse(string.IsNullOrWhiteSpace(functionCallItem.Name)); + Assert.AreEqual(functionCallItem.Arguments, deltaBuilders[functionCallItem.CallId].ToString()); + break; + + default: + Assert.Fail($"Unknown output item type {responseOutputDone.Item.GetType()}"); + break; + } + + break; + case SessionUpdateResponseDone responseDone: + Assert.IsNotNull(responseDone.Response); + + Assert.AreEqual(VoiceLiveResponseStatus.Completed, responseDone.Response.Status); + Assert.AreEqual(responseId, responseDone.Response.Id); + + var usage = responseDone.Response.Usage; + Assert.IsNotNull(usage); + Assert.AreEqual(usage.InputTokens, + usage.InputTokenDetails.AudioTokens + usage.InputTokenDetails.TextTokens + usage.InputTokenDetails.CachedTokens); + Assert.AreEqual(usage.InputTokenDetails.CachedTokens, + usage.InputTokenDetails.CachedTokensDetails.TextTokens + usage.InputTokenDetails.CachedTokensDetails.AudioTokens); + Assert.AreEqual(usage.OutputTokens, + usage.OutputTokenDetails.AudioTokens + usage.OutputTokenDetails.TextTokens); + Assert.AreEqual(usage.TotalTokens, usage.InputTokens + usage.OutputTokens); + + Assert.IsTrue(responseDone.Response.Output.Count > 0); + switch (responseDone.Response.Output[0]) + { + case ResponseMessageItem messageItem: + Assert.AreEqual(ResponseMessageRole.Assistant, messageItem.Role); + Assert.AreEqual(VoiceLiveResponseItemStatus.Completed, messageItem.Status); + Assert.AreEqual(responseItemId, messageItem.Id); + Assert.IsTrue(messageItem.Content.Count > 0); + switch (messageItem.Content[0]) + { + case ResponseTextContentPart textPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(textPart.Text)); + Assert.AreEqual(textPart.Text.Length, deltaBuilders[messageItem.Id].ToString().Length); + Assert.AreEqual(textPart.Text, deltaBuilders[messageItem.Id].ToString()); + break; + case ResponseAudioContentPart audioPart: + Assert.IsFalse(string.IsNullOrWhiteSpace(audioPart.Transcript)); + Assert.AreEqual(audioPart.Transcript, deltaBuilders[messageItem.Id].ToString()); + break; + default: + Assert.Fail($"Unknown content part type {messageItem.Content[0].GetType()}"); + break; + } + break; + + case ResponseFunctionCallItem functionCallItem: + Assert.AreEqual(VoiceLiveResponseItemStatus.Completed, functionCallItem.Status); + Assert.AreEqual(responseItemId, functionCallItem.Id); + Assert.IsFalse(string.IsNullOrWhiteSpace(functionCallItem.Name)); + Assert.AreEqual(functionCallItem.Arguments, deltaBuilders[functionCallItem.CallId].ToString()); + break; + + default: + Assert.Fail($"Unknown output item type {responseDone.Response.Output[0].GetType()}"); + break; + } + break; + + case SessionUpdateResponseFunctionCallArgumentsDelta functionCallDelta: + Assert.AreEqual(responseId, functionCallDelta.ResponseId); + Assert.AreEqual(responseItemId, functionCallDelta.ItemId); + Assert.IsFalse(string.IsNullOrEmpty(functionCallDelta.Delta)); + deltaBuilders[functionCallDelta.CallId].Append(functionCallDelta.Delta); + break; + + case SessionUpdateResponseFunctionCallArgumentsDone functionCallDone: + Assert.AreEqual(responseId, functionCallDone.ResponseId); + Assert.AreEqual(responseItemId, functionCallDone.ItemId); + Assert.IsFalse(string.IsNullOrEmpty(functionCallDone.Arguments)); + Assert.AreEqual(functionCallDone.Arguments.Length, deltaBuilders[functionCallDone.CallId].ToString().Length); + Assert.AreEqual(functionCallDone.Arguments, deltaBuilders[functionCallDone.CallId].ToString()); + break; + + default: + Assert.Fail($"Unknown output item type {item.GetType()}"); + break; + } + } + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/ErrorTests.cs b/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/ErrorTests.cs new file mode 100644 index 000000000000..cb2f1a4e40ba --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/ErrorTests.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Net.WebSockets; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.VoiceLive.Tests +{ + public class ErrorTests : VoiceLiveTestBase + { + private HashSet _eventIDs = new HashSet(); + + public ErrorTests() : base(true) + { } + + public ErrorTests(bool isAsync) : base(isAsync) + { + } + + [LiveOnly] + [TestCase] + public async Task BadModelName() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var voice = new AzureStandardVoice("en-US-AriaNeural"); + + var options = new VoiceLiveSessionOptions() + { + Model = "invalidModelName", + InputAudioFormat = AudioFormat.Pcm16, + Voice = voice + }; + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + + var sessionUpdated = await GetNextUpdate(updatesEnum, false).ConfigureAwait(false); + } + + [LiveOnly] + [TestCase] + public async Task BadVoiceName() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var voice = new AzureStandardVoice("NotARealVoice"); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + InputAudioFormat = AudioFormat.Pcm16, + Voice = voice + }; + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + + var sessionCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + var sessionUpdated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + Assert.IsFalse(await updatesEnum.MoveNextAsync().ConfigureAwait(false)); + } + + [TestCase] + public void BadEndpoint() + { + var vlc = new VoiceLiveClient(new Uri("wss://www.invalid"), new AzureKeyCredential("key")); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + InputAudioFormat = AudioFormat.Pcm16, + }; + Assert.ThrowsAsync(typeof(WebSocketException), () => vlc.StartSessionAsync(options, TimeoutToken)); + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/SessionConfigTests.cs b/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/SessionConfigTests.cs new file mode 100644 index 000000000000..80abec650904 --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/LiveTests/SessionConfigTests.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.VoiceLive.Tests +{ + public class SessionConfigTests : VoiceLiveTestBase + { + private HashSet _eventIDs = new HashSet(); + + public SessionConfigTests() : base(true) + { } + + public SessionConfigTests(bool isAsync) : base(isAsync) + { + } + + [Ignore("WIP")] + [LiveOnly] + [TestCase] + public async Task AzureStandardVoice() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var voice = new AzureStandardVoice("en-US-AriaNeural"); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + InputAudioFormat = AudioFormat.Pcm16, + Voice = voice + }; + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + + var sessionCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + var sessionUpdated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + var updatedVoice = sessionUpdated.Session.Voice; + Assert.IsNotNull(updatedVoice); + + var standardVoice = SafeCast(updatedVoice); + Assert.AreEqual(voice.Name, standardVoice.Name); + } + + //[Ignore("Service issues")] + [LiveOnly] + [TestCase] + public async Task DisableToolCalls() + { + var vlc = string.IsNullOrEmpty(TestEnvironment.ApiKey) ? + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new DefaultAzureCredential(true)) : + new VoiceLiveClient(new Uri(TestEnvironment.Endpoint), new AzureKeyCredential(TestEnvironment.ApiKey)); + + var options = new VoiceLiveSessionOptions() + { + Model = "gpt-4o", + Modalities = { InputModality.Text }, + ToolChoice = ToolChoiceLiteral.None + }; + + options.Tools.Add(FunctionCalls.AdditionDefinition); + + var session = await vlc.StartSessionAsync(options, TimeoutToken).ConfigureAwait(false); + + // Should get two updates back. + var updatesEnum = session.GetUpdatesAsync(TimeoutToken).GetAsyncEnumerator(); + var sessionCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + await Task.Delay(TimeSpan.FromSeconds(5)).ConfigureAwait(false); + + var sessionUpdated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + + var content = new InputTextContentPart("What is 13 plus 29?"); + + await session.AddItemAsync(new UserMessageItem(new[] { content }), null, TimeoutToken).ConfigureAwait(false); + + var conversationItemCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + await session.StartResponseAsync(TimeoutToken).ConfigureAwait(false); + var responseCreated = await GetNextUpdate(updatesEnum).ConfigureAwait(false); + var responseItems = await CollectResponseUpdates(updatesEnum, TimeoutToken).ConfigureAwait(false); + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/TestSetup.cs b/sdk/ai/Azure.AI.VoiceLive/tests/TestSetup.cs new file mode 100644 index 000000000000..4f3a6edd8bdb --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/TestSetup.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.AI.VoiceLive.Tests.Infrastructure; +using NUnit.Framework; +using System; +using System.IO; + +namespace Azure.AI.VoiceLive.Tests +{ + [SetUpFixture] + public class TestSetup + { + [OneTimeSetUp] + public void SetupOnce() + { + // Ensure test audio directories exist + string testAudioPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "Audio"); + TestDataValidator.EnsureTestDataDirectoryStructure(testAudioPath); + + // Generate basic test tones if needed + GeneratePlaceholderTestAudio(testAudioPath); + + // Validate required test files + TestDataValidator.ValidateRequiredTestFiles(testAudioPath); + + TestContext.WriteLine($"Test environment setup complete. Audio path: {testAudioPath}"); + } + + /// + /// Generates minimal test audio files for testing if they don't exist + /// + private void GeneratePlaceholderTestAudio(string testAudioPath) + { + // Generate basic tone files + GenerateToneIfMissing(Path.Combine(testAudioPath, "Tones", "1khz_sine.wav"), 1000); + GenerateToneIfMissing(Path.Combine(testAudioPath, "Tones", "440hz_sine.wav"), 440); + + // Generate simulated speech patterns + GenerateSpeechPatternIfMissing( + Path.Combine(testAudioPath, "Basic", "synthetic_hello.wav"), + TimeSpan.FromSeconds(1)); + + GenerateSpeechPatternIfMissing( + Path.Combine(testAudioPath, "Questions", "synthetic_question.wav"), + TimeSpan.FromSeconds(2)); + } + + /// + /// Generates a tone file if it doesn't exist + /// + private void GenerateToneIfMissing(string filePath, double frequency) + { + if (!File.Exists(filePath)) + { + TestContext.WriteLine($"Generating tone file: {filePath}"); + + var toneData = TestAudioGenerator.GenerateTone( + frequency, + TimeSpan.FromSeconds(2)); + + var wavData = TestAudioGenerator.WrapInWavHeader(toneData); + File.WriteAllBytes(filePath, wavData); + } + } + + /// + /// Generates a simulated speech pattern if file doesn't exist + /// + private void GenerateSpeechPatternIfMissing(string filePath, TimeSpan duration) + { + if (!File.Exists(filePath)) + { + TestContext.WriteLine($"Generating speech pattern file: {filePath}"); + /* + var audioData = TestAudioGenerator.GenerateMockAudioResponse( + (int)duration.TotalMilliseconds); + + var wavData = TestAudioGenerator.WrapInWavHeader(audioData); + File.WriteAllBytes(filePath, wavData); + */ + } + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionConfigurationTests.cs b/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionConfigurationTests.cs index 8e5523cf26e5..335446174c52 100644 --- a/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionConfigurationTests.cs +++ b/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionConfigurationTests.cs @@ -10,6 +10,7 @@ using Azure.AI.VoiceLive; using Azure.AI.VoiceLive.Tests.Infrastructure; using Azure.Core; +using Azure.Core.TestFramework; using NUnit.Framework; namespace Azure.AI.VoiceLive.Tests @@ -48,7 +49,8 @@ private static List GetSentMessagesOfType(FakeWebSocket socket, st var docs = new List(); foreach (var msg in socket.GetSentTextMessages()) { - if (string.IsNullOrWhiteSpace(msg)) continue; + if (string.IsNullOrWhiteSpace(msg)) + continue; try { var doc = JsonDocument.Parse(msg); @@ -74,7 +76,7 @@ public async Task ConfigureConversationSession_SetsModalitiesAndVoice() { var session = CreateSessionWithFakeSocket(out var fake); - var options = new SessionOptions + var options = new VoiceLiveSessionOptions { Voice = new AzureStandardVoice(TestConstants.VoiceName), Model = TestConstants.ModelName, @@ -118,7 +120,7 @@ public async Task ConfigureConversationSession_SetsModalitiesAndVoice() public async Task ConfigureConversationSession_IncludesTools() { var session = CreateSessionWithFakeSocket(out var fake); - var options = new SessionOptions + var options = new VoiceLiveSessionOptions { Model = TestConstants.ModelName, Voice = new AzureStandardVoice(TestConstants.VoiceName) @@ -152,11 +154,11 @@ public async Task MultipleConfigureCalls_SendsMultipleUpdateMessages() { var session = CreateSessionWithFakeSocket(out var fake); - var options1 = new SessionOptions { Model = TestConstants.ModelName }; + var options1 = new VoiceLiveSessionOptions { Model = TestConstants.ModelName }; options1.Modalities.Clear(); options1.Modalities.Add(InputModality.Text); - var options2 = new SessionOptions { Model = TestConstants.ModelName }; + var options2 = new VoiceLiveSessionOptions { Model = TestConstants.ModelName }; options2.Modalities.Clear(); options2.Modalities.Add(InputModality.Audio); @@ -167,7 +169,66 @@ public async Task MultipleConfigureCalls_SendsMultipleUpdateMessages() Assert.That(updateMessages.Count, Is.GreaterThanOrEqualTo(2), "Expected two session.update messages after two configuration calls."); // Dispose docs not used further - foreach (var d in updateMessages) d.Dispose(); + foreach (var d in updateMessages) + d.Dispose(); + } + + [Ignore("WIP")] + [Test] + public void VoiceSetGetTest() + { + var voice = new AzureStandardVoice("en-US-JennyNeural"); + + var sessionOpts = new VoiceLiveSessionOptions + { + Model = TestConstants.ModelName, + Voice = voice + }; + + Assert.That(sessionOpts.Voice, Is.Not.Null); + Assert.That(sessionOpts.Voice, Is.TypeOf()); + var retrievedVoice = (AzureStandardVoice)sessionOpts.Voice; + Assert.That(retrievedVoice.Name, Is.EqualTo("en-US-JennyNeural")); + } + + [Test] + public void MaxTokensSetGetTest() + { + var sessionOpts = new VoiceLiveSessionOptions + { + Model = TestConstants.ModelName, + MaxResponseOutputTokens = 4 + }; + + Assert.AreEqual(4, sessionOpts.MaxResponseOutputTokens.NumericValue); + + var sessionOpts2 = new VoiceLiveSessionOptions + { + Model = TestConstants.ModelName, + MaxResponseOutputTokens = ResponseMaxOutputTokensOption.CreateInfiniteMaxTokensOption() + }; + + Assert.IsNull(sessionOpts2.MaxResponseOutputTokens.NumericValue); + } + + [Test] + public void ToolChoiceSetGet() + { + var sessionOpts = new VoiceLiveSessionOptions + { + Model = TestConstants.ModelName, + ToolChoice = "my_tool" + }; + + Assert.AreEqual("my_tool", sessionOpts.ToolChoice.FunctionName); + + var sessionOpts2 = new VoiceLiveSessionOptions + { + Model = TestConstants.ModelName, + ToolChoice = ToolChoiceLiteral.None + }; + + Assert.IsNull(sessionOpts2.ToolChoice.FunctionName); } } } diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionDisposalTests.cs b/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionDisposalTests.cs index 9157f86bd444..bbef59f5d09b 100644 --- a/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionDisposalTests.cs +++ b/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveSessionDisposalTests.cs @@ -74,7 +74,7 @@ public void MethodsAfterDispose_ThrowObjectDisposedException() Assert.ThrowsAsync(async () => await session.SendInputAudioAsync(new byte[] { 0x01 })); // ConfigureConversationSessionAsync should throw - var convoOptions = new SessionOptions { Model = TestConstants.ModelName }; + var convoOptions = new VoiceLiveSessionOptions { Model = TestConstants.ModelName }; Assert.ThrowsAsync(async () => await session.ConfigureConversationSessionAsync(convoOptions)); } diff --git a/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveTestBase.cs b/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveTestBase.cs new file mode 100644 index 000000000000..874d4743947f --- /dev/null +++ b/sdk/ai/Azure.AI.VoiceLive/tests/VoiceLiveTestBase.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.AI.VoiceLive.Tests.Infrastructure; +using Azure.Core.TestFramework; +using Azure.Identity; +using Microsoft.Extensions.Logging; +using NUnit.Framework; + +namespace Azure.AI.VoiceLive.Tests +{ + /// + /// Base class for Voice Live Service integration tests. + /// Provides common functionality for all test classes. + /// + [Category("Live")] + [TestFixture] + public abstract class VoiceLiveTestBase : TimeOutTestBase + { + private readonly List _sessions = new List(); + private HashSet _eventIDs = new HashSet(); + protected VoiceLiveClient? Client { get; private set; } + protected TimeSpan DefaultTimeout => TestEnvironment.DefaultTimeout; + + public VoiceLiveTestBase(bool isAsync) : base(isAsync, RecordedTestMode.Live) + { + // Force Live mode - WebSocket tests cannot be recorded + } + + [SetUp] + public virtual void Setup() + { + var endpoint = new Uri(TestEnvironment.Endpoint); + + // Use API key if available, otherwise Azure AD + if (!string.IsNullOrEmpty(TestEnvironment.ApiKey)) + { + var credential = new AzureKeyCredential(TestEnvironment.ApiKey); + Client = new VoiceLiveClient(endpoint, credential); + } + else + { + var credential = new DefaultAzureCredential(); + Client = new VoiceLiveClient(endpoint, credential); + } + } + + [TearDown] + public virtual async Task Teardown() + { + // Clean up all sessions created during test + foreach (var session in _sessions) + { + try + { + await session.DisposeAsync(); + } + catch + { + // Ignore cleanup errors + } + } + _sessions.Clear(); + } + + /// + /// Creates a new Voice Live session with default or specified configuration. + /// + protected async Task CreateSessionAsync( + string model) + { + if (Client == null) + { + throw new InvalidOperationException("Client not initialized. Ensure Setup() has been called."); + } + model ??= TestEnvironment.RealtimeModel; + + var session = await Client.StartSessionAsync(model).ConfigureAwait(false); + _sessions.Add(session); // Track for cleanup + + TestContext.WriteLine($"Session created"); + + return session; + } + + /// + /// Creates a new Voice Live session with default or specified configuration. + /// + protected async Task CreateSessionAsync( + VoiceLiveSessionOptions options) + { + if (Client == null) + { + throw new InvalidOperationException("Client not initialized. Ensure Setup() has been called."); + } + + options ??= new VoiceLiveSessionOptions(); + + var session = await Client.StartSessionAsync(options).ConfigureAwait(false); + _sessions.Add(session); // Track for cleanup + + TestContext.WriteLine($"Session created"); + + return session; + } + + /// + /// Waits for a specific session update type to be received from the WebSocket. + /// + protected async Task WaitForSessionUpdateAsync( + VoiceLiveSession session, + TimeSpan timeout, + Func? predicate = null) where T : SessionUpdate + { + // Implementation would depend on how the VoiceLiveSession exposes updates + // This is a placeholder for the actual implementation + + var cts = new CancellationTokenSource(timeout); + var sw = Stopwatch.StartNew(); + + try + { + // A potential implementation might use a polling approach on some session state + // This is highly dependent on the actual API design + while (!cts.IsCancellationRequested) + { + // We'd need to check for session updates based on the actual API design + // For now, this is just a placeholder + await Task.Delay(100, cts.Token); + } + + TestContext.WriteLine($"Timeout waiting for {typeof(T).Name}"); + throw new TimeoutException($"Did not receive expected session update of type {typeof(T).Name} within {timeout.TotalSeconds} seconds."); + } + catch (OperationCanceledException) + { + TestContext.WriteLine($"Operation canceled while waiting for {typeof(T).Name}"); + throw; + } + finally + { + sw.Stop(); + TestContext.WriteLine($"Waited {sw.ElapsedMilliseconds}ms for {typeof(T).Name}"); + } + } + + /// + /// Loads test audio from the test data directory. + /// + protected byte[] LoadTestAudio(string filename) + { + var path = Path.Combine(TestEnvironment.TestAudioPath, filename); + Assert.True(File.Exists(path), $"Test audio file not found: {path}"); + + var data = File.ReadAllBytes(path); + TestContext.WriteLine($"Loaded audio file: {filename} ({data.Length} bytes)"); + return data; + } + + /// + /// Sends audio and returns once the audio has been sent. + /// + protected async Task SendAudioAsync( + VoiceLiveSession session, + string audioFile) + { + var audio = LoadTestAudio(audioFile); + await session.SendInputAudioAsync(audio); + TestContext.WriteLine($"Sent audio file: {audioFile}"); + } + + /// + /// Creates a voice provider configuration for testing. + /// + protected VoiceProvider CreateVoiceProvider(string voiceType = "azure-platform") + { + switch (voiceType) + { + case "azure-platform": + return new AzurePlatformVoice("en-US-AriaNeural"); + + case "azure-custom": + RequireFeature(TestEnvironment.HasCustomVoice, + "Custom voice not configured"); + return new AzureCustomVoice( + TestEnvironment.CustomVoiceName, + TestEnvironment.CustomVoiceEndpointId); + + case "azure-personal": + RequireFeature(TestEnvironment.HasPersonalVoice, + "Personal voice not configured"); + return new AzurePersonalVoice( + TestEnvironment.PersonalVoiceName, + (AzurePersonalVoiceModel)Enum.Parse(typeof(AzurePersonalVoiceModel), TestEnvironment.PersonalVoiceModel)); + + case "openai": + return new OpenAIVoice(OAIVoice.Alloy); + + case "llm": + return new LlmVoice(LlmVoiceName.Cosyvoice); + + default: + throw new ArgumentException($"Unknown voice type: {voiceType}"); + } + } + + /// + /// Creates turn detection configuration for testing. + /// + protected TurnDetection CreateTurnDetection(string detectionType = "server-vad") + { + switch (detectionType) + { + case "none": + return new NoTurnDetection(); + + case "server-vad": + return new ServerVad + { + Threshold = 0.5f, + SilenceDurationMs = 500, + PrefixPaddingMs = 300 + }; + + case "azure-semantic": + return new AzureSemanticVad + { + Languages = { "en-US" }, + Threshold = 0.7f + }; + + case "azure-multilingual": + return new AzureMultilingualSemanticVad + { + Languages = { "en-US", "es-ES", "fr-FR" }, + Threshold = 0.7f + }; + + default: + throw new ArgumentException($"Unknown detection type: {detectionType}"); + } + } + + /// + /// Measures the time for an operation. + /// + protected async Task MeasureAsync(Func operation) + { + var sw = Stopwatch.StartNew(); + await operation(); + sw.Stop(); + + TestContext.WriteLine($"Operation took {sw.ElapsedMilliseconds}ms"); + return sw.Elapsed; + } + + /// + /// Skips test if condition is not met. + /// + protected void RequireFeature(bool condition, string message) + { + if (!condition) + { + Assert.Ignore($"Skipping test: {message}"); + } + } + + /// + /// Executes a test with the fake WebSocket for unit testing. + /// + internal async Task WithFakeWebSocketAsync(Func testAction) + { + var session = TestSessionFactory.CreateSessionWithFakeSocket(out var fakeSocket); + + try + { + await testAction(session, fakeSocket); + } + finally + { + await session.DisposeAsync(); + } + } + + /// + /// Waits for a specific message type to be sent through the fake WebSocket. + /// + internal async Task WaitForMessageTypeAsync( + FakeWebSocket fakeSocket, + string messageType, + TimeSpan timeout) + { + var deadline = DateTime.UtcNow.Add(timeout); + int lastCount = 0; + + while (DateTime.UtcNow < deadline) + { + var messages = TestUtilities.GetMessagesOfType(fakeSocket, messageType); + + if (messages.Count > lastCount && messages.Count > 0) + { + return messages.Last(); + } + + lastCount = messages.Count; + await Task.Delay(100); + } + + TestContext.WriteLine($"Timeout waiting for message type: {messageType}"); + throw new TimeoutException($"Did not receive message of type {messageType} within {timeout.TotalSeconds} seconds."); + } + + protected void EnsureEventIdsUnique(SessionUpdate sessionUpdate) + { + Assert.IsNotNull(sessionUpdate.EventId, $"Event ID was not specified on type {sessionUpdate.Type}"); + Assert.IsFalse(_eventIDs.Contains(sessionUpdate.EventId), $"EventId {sessionUpdate.EventId} was reused"); + _eventIDs.Add(sessionUpdate.EventId); + } + + protected async Task> CollectResponseUpdates(IAsyncEnumerator updateEnumerator, CancellationToken cancellationToken) + { + List responseUpdates = new List(); + + SessionUpdate currentUpdate; + + do + { + currentUpdate = await GetNextUpdate(updateEnumerator).ConfigureAwait(false); + responseUpdates.Add(currentUpdate); + } while (currentUpdate is not SessionUpdateResponseDone && !cancellationToken.IsCancellationRequested); + + if (cancellationToken.IsCancellationRequested) + { + throw new OperationCanceledException(); + } + + return responseUpdates; + } + + protected async Task GetNextUpdate(IAsyncEnumerator updateEnumerator, bool checkEventId = true) where T : SessionUpdate + { + var currentUpdate = await GetNextUpdate(updateEnumerator, checkEventId).ConfigureAwait(false); + return SafeCast(currentUpdate); + } + + protected T SafeCast(object o) where T : class + { + Assert.IsTrue(o is T, $"Expected {typeof(T).Name} but got {o.GetType().Name}"); +#pragma warning disable CS8603 // Possible null reference return. Assert 2 lines above prevents. + return o as T; +#pragma warning restore CS8603 // Possible null reference return. + } + + protected async Task GetNextUpdate(IAsyncEnumerator updateEnumerator, bool checkEventId = true) + { + var moved = await updateEnumerator.MoveNextAsync().ConfigureAwait(false); + Assert.IsTrue(moved, "Failed to move to the next update."); + var currentUpdate = updateEnumerator.Current; + Assert.IsNotNull(currentUpdate); + if (checkEventId) + { + EnsureEventIdsUnique(currentUpdate); + } + return currentUpdate; + } + } +} diff --git a/sdk/ai/Azure.AI.VoiceLive/tsp-location.yaml b/sdk/ai/Azure.AI.VoiceLive/tsp-location.yaml index b40633ce7865..e48f4b681c85 100644 --- a/sdk/ai/Azure.AI.VoiceLive/tsp-location.yaml +++ b/sdk/ai/Azure.AI.VoiceLive/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai/data-plane/VoiceLive -commit: 83ee88e956df84574d5a592f074216a24be707fe +commit: f99d32b66214505357e68b3523abd2ad209da678 repo: rhurey/azure-rest-api-specs additionalDirectories: - specification/ai/data-plane/VoiceLive diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tsp-location.yaml b/sdk/appconfiguration/Azure.Data.AppConfiguration/tsp-location.yaml index b9ae97fdf9e0..9002028a7d3e 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tsp-location.yaml +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tsp-location.yaml @@ -1,4 +1,4 @@ repo: Azure/azure-rest-api-specs directory: "specification/appconfiguration/AppConfiguration" -commit: 5c7a5cda1558804a0b52001cdf23c4e3ef225567 +commit: cee8b51dc487fd473e2214a32d8eb1083cdabd21 emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-emitter-package.json" \ No newline at end of file diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs index 968dd34d11e4..c3dc767c9f7a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/Extensions/MockableAvsSubscriptionResource.cs @@ -274,7 +274,8 @@ public virtual Pageable GetAvsPrivateClouds(Cancellatio public virtual AsyncPageable GetAvsSkusAsync(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateGetAvsSkusRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => AvsResourceSku.DeserializeAvsResourceSku(e), SkusClientDiagnostics, Pipeline, "MockableAvsSubscriptionResource.GetAvsSkus", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateGetAvsSkusNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AvsResourceSku.DeserializeAvsResourceSku(e), SkusClientDiagnostics, Pipeline, "MockableAvsSubscriptionResource.GetAvsSkus", "value", "nextLink", cancellationToken); } /// @@ -299,7 +300,8 @@ public virtual AsyncPageable GetAvsSkusAsync(CancellationToken c public virtual Pageable GetAvsSkus(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateGetAvsSkusRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => AvsResourceSku.DeserializeAvsResourceSku(e), SkusClientDiagnostics, Pipeline, "MockableAvsSubscriptionResource.GetAvsSkus", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateGetAvsSkusNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AvsResourceSku.DeserializeAvsResourceSku(e), SkusClientDiagnostics, Pipeline, "MockableAvsSubscriptionResource.GetAvsSkus", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/SkusRestOperations.cs index ec5be17dda08..e2c5987d62db 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/RestOperations/SkusRestOperations.cs @@ -113,5 +113,81 @@ public Response GetAvsSkus(string subscriptionId, Cancellation throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateGetAvsSkusNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetAvsSkusNextPageRequest(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); + return message; + } + + /// A list of SKUs. + /// 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> GetAvsSkusNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetAvsSkusNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedResourceSku value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedResourceSku.DeserializePagedResourceSku(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A list of SKUs. + /// 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 GetAvsSkusNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetAvsSkusNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedResourceSku value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedResourceSku.DeserializePagedResourceSku(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/tsp-location.yaml b/sdk/avs/Azure.ResourceManager.Avs/tsp-location.yaml index bed6b6ada9b2..7267ed3bd691 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/tsp-location.yaml +++ b/sdk/avs/Azure.ResourceManager.Avs/tsp-location.yaml @@ -1,3 +1,3 @@ -directory: specification/vmware/Microsoft.AVS.Management -commit: f5600785d041799c82ba06bc838703f3d55ffba2 +directory: specification/vmware/resource-manager/Microsoft.AVS/AVS +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs index 2f4531f685e9..0ce8924e5b52 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs @@ -16,6 +16,96 @@ namespace Azure.ResourceManager.Chaos.Models /// Model factory for models. public static partial class ArmChaosModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// String of the Publisher that this Capability extends. + /// String of the Target Type that this Capability extends. + /// Localized string of the description. + /// URL to retrieve JSON schema of the Capability parameters. + /// String of the URN for this Capability Type. + /// A new instance for mocking. + public static ChaosCapabilityData ChaosCapabilityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string publisher = null, string targetType = null, string description = null, string parametersSchema = null, string urn = null) + { + return new ChaosCapabilityData( + id, + name, + resourceType, + systemData, + publisher, + targetType, + description, + parametersSchema, + urn, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The properties of the target resource. + /// Azure resource location. + /// A new instance for mocking. + public static ChaosTargetData ChaosTargetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, AzureLocation? location = null) + { + properties ??= new Dictionary(); + + return new ChaosTargetData( + id, + name, + resourceType, + systemData, + properties, + location, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// String of the Publisher that this Capability Type extends. + /// String of the Target Type that this Capability Type extends. + /// Localized string of the display name. + /// Localized string of the description. + /// URL to retrieve JSON schema of the Capability Type parameters. + /// String of the URN for this Capability Type. + /// String of the kind of this Capability Type. + /// Control plane actions necessary to execute capability type. + /// Data plane actions necessary to execute capability type. + /// Required Azure Role Definition Ids to execute capability type. + /// Runtime properties of this Capability Type. + /// A new instance for mocking. + public static ChaosCapabilityMetadataData ChaosCapabilityMetadataData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string publisher = null, string targetType = null, string displayName = null, string description = null, string parametersSchema = null, string urn = null, string kind = null, IEnumerable azureRbacActions = null, IEnumerable azureRbacDataActions = null, IEnumerable requiredAzureRoleDefinitionIds = null, string runtimeKind = null) + { + azureRbacActions ??= new List(); + azureRbacDataActions ??= new List(); + requiredAzureRoleDefinitionIds ??= new List(); + + return new ChaosCapabilityMetadataData( + id, + name, + resourceType, + systemData, + publisher, + targetType, + displayName, + description, + parametersSchema, + urn, + kind, + azureRbacActions?.ToList(), + azureRbacDataActions?.ToList(), + requiredAzureRoleDefinitionIds?.ToList(), + runtimeKind != null ? new ChaosCapabilityMetadataRuntimeProperties(runtimeKind, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -179,96 +269,6 @@ public static ExperimentExecutionActionTargetDetailsError ExperimentExecutionAct return new ExperimentExecutionActionTargetDetailsError(code, message, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// String of the Publisher that this Capability extends. - /// String of the Target Type that this Capability extends. - /// Localized string of the description. - /// URL to retrieve JSON schema of the Capability parameters. - /// String of the URN for this Capability Type. - /// A new instance for mocking. - public static ChaosCapabilityData ChaosCapabilityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string publisher = null, string targetType = null, string description = null, string parametersSchema = null, string urn = null) - { - return new ChaosCapabilityData( - id, - name, - resourceType, - systemData, - publisher, - targetType, - description, - parametersSchema, - urn, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// String of the Publisher that this Capability Type extends. - /// String of the Target Type that this Capability Type extends. - /// Localized string of the display name. - /// Localized string of the description. - /// URL to retrieve JSON schema of the Capability Type parameters. - /// String of the URN for this Capability Type. - /// String of the kind of this Capability Type. - /// Control plane actions necessary to execute capability type. - /// Data plane actions necessary to execute capability type. - /// Required Azure Role Definition Ids to execute capability type. - /// Runtime properties of this Capability Type. - /// A new instance for mocking. - public static ChaosCapabilityMetadataData ChaosCapabilityMetadataData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string publisher = null, string targetType = null, string displayName = null, string description = null, string parametersSchema = null, string urn = null, string kind = null, IEnumerable azureRbacActions = null, IEnumerable azureRbacDataActions = null, IEnumerable requiredAzureRoleDefinitionIds = null, string runtimeKind = null) - { - azureRbacActions ??= new List(); - azureRbacDataActions ??= new List(); - requiredAzureRoleDefinitionIds ??= new List(); - - return new ChaosCapabilityMetadataData( - id, - name, - resourceType, - systemData, - publisher, - targetType, - displayName, - description, - parametersSchema, - urn, - kind, - azureRbacActions?.ToList(), - azureRbacDataActions?.ToList(), - requiredAzureRoleDefinitionIds?.ToList(), - runtimeKind != null ? new ChaosCapabilityMetadataRuntimeProperties(runtimeKind, serializedAdditionalRawData: null) : null, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The properties of the target resource. - /// Azure resource location. - /// A new instance for mocking. - public static ChaosTargetData ChaosTargetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary properties = null, AzureLocation? location = null) - { - properties ??= new Dictionary(); - - return new ChaosTargetData( - id, - name, - resourceType, - systemData, - properties, - location, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/ChaosExtensions.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/ChaosExtensions.cs index 65035cd09983..bde87645dcfa 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/ChaosExtensions.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/ChaosExtensions.cs @@ -33,98 +33,98 @@ private static MockableChaosSubscriptionResource GetMockableChaosSubscriptionRes } /// - /// 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 ChaosExperimentResource GetChaosExperimentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ChaosCapabilityResource GetChaosCapabilityResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableChaosArmClient(client).GetChaosExperimentResource(id); + return GetMockableChaosArmClient(client).GetChaosCapabilityResource(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 ChaosExperimentExecutionResource GetChaosExperimentExecutionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ChaosTargetResource GetChaosTargetResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableChaosArmClient(client).GetChaosExperimentExecutionResource(id); + return GetMockableChaosArmClient(client).GetChaosTargetResource(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 ChaosCapabilityResource GetChaosCapabilityResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ChaosCapabilityMetadataResource GetChaosCapabilityMetadataResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableChaosArmClient(client).GetChaosCapabilityResource(id); + return GetMockableChaosArmClient(client).GetChaosCapabilityMetadataResource(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 ChaosCapabilityMetadataResource GetChaosCapabilityMetadataResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ChaosExperimentResource GetChaosExperimentResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableChaosArmClient(client).GetChaosCapabilityMetadataResource(id); + return GetMockableChaosArmClient(client).GetChaosExperimentResource(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 ChaosTargetResource GetChaosTargetResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ChaosExperimentExecutionResource GetChaosExperimentExecutionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableChaosArmClient(client).GetChaosTargetResource(id); + return GetMockableChaosArmClient(client).GetChaosExperimentExecutionResource(id); } /// @@ -147,32 +147,36 @@ public static ChaosTargetMetadataResource GetChaosTargetMetadataResource(this Ar } /// - /// Gets a collection of ChaosExperimentResources in the ResourceGroupResource. + /// Gets a collection of ChaosTargetResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// is null. - /// An object representing collection of ChaosExperimentResources and their operations over a ChaosExperimentResource. - public static ChaosExperimentCollection GetChaosExperiments(this ResourceGroupResource resourceGroupResource) + /// The parent resource provider namespace. + /// The parent resource type. + /// The parent resource name. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// An object representing collection of ChaosTargetResources and their operations over a ChaosTargetResource. + public static ChaosTargetCollection GetChaosTargets(this ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosExperiments(); + return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosTargets(parentProviderNamespace, parentResourceType, parentResourceName); } /// - /// Get a Experiment resource. + /// Get a Target resource that extends a tracked regional resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} /// /// /// Operation Id - /// Experiment_Get + /// Target_Get /// /// /// Default Api Version @@ -180,37 +184,40 @@ public static ChaosExperimentCollection GetChaosExperiments(this ResourceGroupRe /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// String that represents a Experiment resource name. + /// The parent resource provider namespace. + /// The parent resource type. + /// The parent resource name. + /// String that represents a Target resource name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetChaosExperimentAsync(this ResourceGroupResource resourceGroupResource, string experimentName, CancellationToken cancellationToken = default) + public static async Task> GetChaosTargetAsync(this ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosExperimentAsync(experimentName, cancellationToken).ConfigureAwait(false); + return await GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosTargetAsync(parentProviderNamespace, parentResourceType, parentResourceName, targetName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Experiment resource. + /// Get a Target resource that extends a tracked regional resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} /// /// /// Operation Id - /// Experiment_Get + /// Target_Get /// /// /// Default Api Version @@ -218,58 +225,57 @@ public static async Task> GetChaosExperimentAs /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// String that represents a Experiment resource name. + /// The parent resource provider namespace. + /// The parent resource type. + /// The parent resource name. + /// String that represents a Target resource name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetChaosExperiment(this ResourceGroupResource resourceGroupResource, string experimentName, CancellationToken cancellationToken = default) + public static Response GetChaosTarget(this ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosExperiment(experimentName, cancellationToken); + return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosTarget(parentProviderNamespace, parentResourceType, parentResourceName, targetName, cancellationToken); } /// - /// Gets a collection of ChaosTargetResources in the ResourceGroupResource. + /// Gets a collection of ChaosExperimentResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The parent resource provider namespace. - /// The parent resource type. - /// The parent resource name. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - /// An object representing collection of ChaosTargetResources and their operations over a ChaosTargetResource. - public static ChaosTargetCollection GetChaosTargets(this ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName) + /// is null. + /// An object representing collection of ChaosExperimentResources and their operations over a ChaosExperimentResource. + public static ChaosExperimentCollection GetChaosExperiments(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosTargets(parentProviderNamespace, parentResourceType, parentResourceName); + return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosExperiments(); } /// - /// Get a Target resource that extends a tracked regional resource. + /// Get a Experiment resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} /// /// /// Operation Id - /// Target_Get + /// Experiment_Get /// /// /// Default Api Version @@ -277,40 +283,37 @@ public static ChaosTargetCollection GetChaosTargets(this ResourceGroupResource r /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The parent resource provider namespace. - /// The parent resource type. - /// The parent resource name. - /// String that represents a Target resource name. + /// String that represents a Experiment resource name. /// The cancellation token to use. - /// , , , or is null. - /// , , or 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. [ForwardsClientCalls] - public static async Task> GetChaosTargetAsync(this ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) + public static async Task> GetChaosExperimentAsync(this ResourceGroupResource resourceGroupResource, string experimentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosTargetAsync(parentProviderNamespace, parentResourceType, parentResourceName, targetName, cancellationToken).ConfigureAwait(false); + return await GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosExperimentAsync(experimentName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Target resource that extends a tracked regional resource. + /// Get a Experiment resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} /// /// /// Operation Id - /// Target_Get + /// Experiment_Get /// /// /// Default Api Version @@ -318,28 +321,25 @@ public static async Task> GetChaosTargetAsync(this /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The parent resource provider namespace. - /// The parent resource type. - /// The parent resource name. - /// String that represents a Target resource name. + /// String that represents a Experiment resource name. /// The cancellation token to use. - /// , , , or is null. - /// , , or 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. [ForwardsClientCalls] - public static Response GetChaosTarget(this ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) + public static Response GetChaosExperiment(this ResourceGroupResource resourceGroupResource, string experimentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosTarget(parentProviderNamespace, parentResourceType, parentResourceName, targetName, cancellationToken); + return GetMockableChaosResourceGroupResource(resourceGroupResource).GetChaosExperiment(experimentName, cancellationToken); } /// diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosArmClient.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosArmClient.cs index 345f0e6e0fd3..6322b0fa68f5 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosArmClient.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosArmClient.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 ChaosExperimentResource GetChaosExperimentResource(ResourceIdentifier id) - { - ChaosExperimentResource.ValidateResourceId(id); - return new ChaosExperimentResource(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 ChaosExperimentExecutionResource GetChaosExperimentExecutionResource(ResourceIdentifier id) - { - ChaosExperimentExecutionResource.ValidateResourceId(id); - return new ChaosExperimentExecutionResource(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,6 +46,18 @@ public virtual ChaosCapabilityResource GetChaosCapabilityResource(ResourceIdenti return new ChaosCapabilityResource(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 ChaosTargetResource GetChaosTargetResource(ResourceIdentifier id) + { + ChaosTargetResource.ValidateResourceId(id); + return new ChaosTargetResource(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. @@ -83,15 +71,27 @@ public virtual ChaosCapabilityMetadataResource GetChaosCapabilityMetadataResourc } /// - /// 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. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual ChaosTargetResource GetChaosTargetResource(ResourceIdentifier id) + /// Returns a object. + public virtual ChaosExperimentResource GetChaosExperimentResource(ResourceIdentifier id) { - ChaosTargetResource.ValidateResourceId(id); - return new ChaosTargetResource(Client, id); + ChaosExperimentResource.ValidateResourceId(id); + return new ChaosExperimentResource(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 ChaosExperimentExecutionResource GetChaosExperimentExecutionResource(ResourceIdentifier id) + { + ChaosExperimentExecutionResource.ValidateResourceId(id); + return new ChaosExperimentExecutionResource(Client, id); } /// diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosResourceGroupResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosResourceGroupResource.cs index 65b3a4e48793..17138759e7c2 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosResourceGroupResource.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosResourceGroupResource.cs @@ -33,23 +33,28 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of ChaosExperimentResources in the ResourceGroupResource. - /// An object representing collection of ChaosExperimentResources and their operations over a ChaosExperimentResource. - public virtual ChaosExperimentCollection GetChaosExperiments() + /// Gets a collection of ChaosTargetResources in the ResourceGroupResource. + /// The parent resource provider namespace. + /// The parent resource type. + /// The parent resource name. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// An object representing collection of ChaosTargetResources and their operations over a ChaosTargetResource. + public virtual ChaosTargetCollection GetChaosTargets(string parentProviderNamespace, string parentResourceType, string parentResourceName) { - return GetCachedClient(client => new ChaosExperimentCollection(client, Id)); + return new ChaosTargetCollection(Client, Id, parentProviderNamespace, parentResourceType, parentResourceName); } /// - /// Get a Experiment resource. + /// Get a Target resource that extends a tracked regional resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} /// /// /// Operation Id - /// Experiment_Get + /// Target_Get /// /// /// Default Api Version @@ -57,30 +62,33 @@ public virtual ChaosExperimentCollection GetChaosExperiments() /// /// /// Resource - /// + /// /// /// /// - /// String that represents a Experiment resource name. + /// The parent resource provider namespace. + /// The parent resource type. + /// The parent resource name. + /// String that represents a Target resource name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetChaosExperimentAsync(string experimentName, CancellationToken cancellationToken = default) + public virtual async Task> GetChaosTargetAsync(string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) { - return await GetChaosExperiments().GetAsync(experimentName, cancellationToken).ConfigureAwait(false); + return await GetChaosTargets(parentProviderNamespace, parentResourceType, parentResourceName).GetAsync(targetName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Experiment resource. + /// Get a Target resource that extends a tracked regional resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} /// /// /// Operation Id - /// Experiment_Get + /// Target_Get /// /// /// Default Api Version @@ -88,42 +96,40 @@ public virtual async Task> GetChaosExperimentA /// /// /// Resource - /// + /// /// /// /// - /// String that represents a Experiment resource name. + /// The parent resource provider namespace. + /// The parent resource type. + /// The parent resource name. + /// String that represents a Target resource name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetChaosExperiment(string experimentName, CancellationToken cancellationToken = default) + public virtual Response GetChaosTarget(string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) { - return GetChaosExperiments().Get(experimentName, cancellationToken); + return GetChaosTargets(parentProviderNamespace, parentResourceType, parentResourceName).Get(targetName, cancellationToken); } - /// Gets a collection of ChaosTargetResources in the ResourceGroupResource. - /// The parent resource provider namespace. - /// The parent resource type. - /// The parent resource name. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - /// An object representing collection of ChaosTargetResources and their operations over a ChaosTargetResource. - public virtual ChaosTargetCollection GetChaosTargets(string parentProviderNamespace, string parentResourceType, string parentResourceName) + /// Gets a collection of ChaosExperimentResources in the ResourceGroupResource. + /// An object representing collection of ChaosExperimentResources and their operations over a ChaosExperimentResource. + public virtual ChaosExperimentCollection GetChaosExperiments() { - return new ChaosTargetCollection(Client, Id, parentProviderNamespace, parentResourceType, parentResourceName); + return GetCachedClient(client => new ChaosExperimentCollection(client, Id)); } /// - /// Get a Target resource that extends a tracked regional resource. + /// Get a Experiment resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} /// /// /// Operation Id - /// Target_Get + /// Experiment_Get /// /// /// Default Api Version @@ -131,33 +137,30 @@ public virtual ChaosTargetCollection GetChaosTargets(string parentProviderNamesp /// /// /// Resource - /// + /// /// /// /// - /// The parent resource provider namespace. - /// The parent resource type. - /// The parent resource name. - /// String that represents a Target resource name. + /// String that represents a Experiment resource name. /// The cancellation token to use. - /// , , or is null. - /// , , or 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> GetChaosTargetAsync(string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) + public virtual async Task> GetChaosExperimentAsync(string experimentName, CancellationToken cancellationToken = default) { - return await GetChaosTargets(parentProviderNamespace, parentResourceType, parentResourceName).GetAsync(targetName, cancellationToken).ConfigureAwait(false); + return await GetChaosExperiments().GetAsync(experimentName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Target resource that extends a tracked regional resource. + /// Get a Experiment resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName} /// /// /// Operation Id - /// Target_Get + /// Experiment_Get /// /// /// Default Api Version @@ -165,21 +168,18 @@ public virtual async Task> GetChaosTargetAsync(str /// /// /// Resource - /// + /// /// /// /// - /// The parent resource provider namespace. - /// The parent resource type. - /// The parent resource name. - /// String that represents a Target resource name. + /// String that represents a Experiment resource name. /// The cancellation token to use. - /// , , or is null. - /// , , or 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 GetChaosTarget(string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, CancellationToken cancellationToken = default) + public virtual Response GetChaosExperiment(string experimentName, CancellationToken cancellationToken = default) { - return GetChaosTargets(parentProviderNamespace, parentResourceType, parentResourceName).Get(targetName, cancellationToken); + return GetChaosExperiments().Get(experimentName, cancellationToken); } } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionCollection.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionCollection.cs deleted file mode 100644 index 322c11e6d23e..000000000000 --- a/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionCollection.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.Chaos.Samples -{ - public partial class Sample_ChaosExperimentExecutionCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetTheExecutionOfAExperiment() - { - // Generated from example definition: 2025-01-01/Experiments_GetExecution.json - // this example is just showing the usage of "ExperimentExecution_GetExecution" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ChaosExperimentResource created on azure - // for more information of creating ChaosExperimentResource, please refer to the document of ChaosExperimentResource - string subscriptionId = "6b052e15-03d3-4f17-b2e1-be7f07588291"; - string resourceGroupName = "exampleRG"; - string experimentName = "exampleExperiment"; - ResourceIdentifier chaosExperimentResourceId = ChaosExperimentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, experimentName); - ChaosExperimentResource chaosExperiment = client.GetChaosExperimentResource(chaosExperimentResourceId); - - // get the collection of this ChaosExperimentExecutionResource - ChaosExperimentExecutionCollection collection = chaosExperiment.GetChaosExperimentExecutions(); - - // invoke the operation - string executionId = "f24500ad-744e-4a26-864b-b76199eac333"; - ChaosExperimentExecutionResource result = await collection.GetAsync(executionId); - - // 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 - ChaosExperimentExecutionData 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_ListAllExecutionsOfAnExperiment() - { - // Generated from example definition: 2025-01-01/Experiments_ListAllExecutions.json - // this example is just showing the usage of "ExperimentExecution_ListAllExecutions" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ChaosExperimentResource created on azure - // for more information of creating ChaosExperimentResource, please refer to the document of ChaosExperimentResource - string subscriptionId = "6b052e15-03d3-4f17-b2e1-be7f07588291"; - string resourceGroupName = "exampleRG"; - string experimentName = "exampleExperiment"; - ResourceIdentifier chaosExperimentResourceId = ChaosExperimentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, experimentName); - ChaosExperimentResource chaosExperiment = client.GetChaosExperimentResource(chaosExperimentResourceId); - - // get the collection of this ChaosExperimentExecutionResource - ChaosExperimentExecutionCollection collection = chaosExperiment.GetChaosExperimentExecutions(); - - // invoke the operation and iterate over the result - await foreach (ChaosExperimentExecutionResource 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 - ChaosExperimentExecutionData 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_GetTheExecutionOfAExperiment() - { - // Generated from example definition: 2025-01-01/Experiments_GetExecution.json - // this example is just showing the usage of "ExperimentExecution_GetExecution" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ChaosExperimentResource created on azure - // for more information of creating ChaosExperimentResource, please refer to the document of ChaosExperimentResource - string subscriptionId = "6b052e15-03d3-4f17-b2e1-be7f07588291"; - string resourceGroupName = "exampleRG"; - string experimentName = "exampleExperiment"; - ResourceIdentifier chaosExperimentResourceId = ChaosExperimentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, experimentName); - ChaosExperimentResource chaosExperiment = client.GetChaosExperimentResource(chaosExperimentResourceId); - - // get the collection of this ChaosExperimentExecutionResource - ChaosExperimentExecutionCollection collection = chaosExperiment.GetChaosExperimentExecutions(); - - // invoke the operation - string executionId = "f24500ad-744e-4a26-864b-b76199eac333"; - bool result = await collection.ExistsAsync(executionId); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_GetTheExecutionOfAExperiment() - { - // Generated from example definition: 2025-01-01/Experiments_GetExecution.json - // this example is just showing the usage of "ExperimentExecution_GetExecution" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ChaosExperimentResource created on azure - // for more information of creating ChaosExperimentResource, please refer to the document of ChaosExperimentResource - string subscriptionId = "6b052e15-03d3-4f17-b2e1-be7f07588291"; - string resourceGroupName = "exampleRG"; - string experimentName = "exampleExperiment"; - ResourceIdentifier chaosExperimentResourceId = ChaosExperimentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, experimentName); - ChaosExperimentResource chaosExperiment = client.GetChaosExperimentResource(chaosExperimentResourceId); - - // get the collection of this ChaosExperimentExecutionResource - ChaosExperimentExecutionCollection collection = chaosExperiment.GetChaosExperimentExecutions(); - - // invoke the operation - string executionId = "f24500ad-744e-4a26-864b-b76199eac333"; - NullableResponse response = await collection.GetIfExistsAsync(executionId); - ChaosExperimentExecutionResource 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 - ChaosExperimentExecutionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs deleted file mode 100644 index 6cbf5076bc13..000000000000 --- a/sdk/chaos/Azure.ResourceManager.Chaos/tests/Generated/Samples/Sample_ChaosExperimentExecutionResource.cs +++ /dev/null @@ -1,77 +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.Chaos.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.Chaos.Samples -{ - public partial class Sample_ChaosExperimentExecutionResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetTheExecutionOfAExperiment() - { - // Generated from example definition: 2025-01-01/Experiments_GetExecution.json - // this example is just showing the usage of "ExperimentExecution_GetExecution" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ChaosExperimentExecutionResource created on azure - // for more information of creating ChaosExperimentExecutionResource, please refer to the document of ChaosExperimentExecutionResource - string subscriptionId = "6b052e15-03d3-4f17-b2e1-be7f07588291"; - string resourceGroupName = "exampleRG"; - string experimentName = "exampleExperiment"; - string executionId = "f24500ad-744e-4a26-864b-b76199eac333"; - ResourceIdentifier chaosExperimentExecutionResourceId = ChaosExperimentExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, experimentName, executionId); - ChaosExperimentExecutionResource chaosExperimentExecution = client.GetChaosExperimentExecutionResource(chaosExperimentExecutionResourceId); - - // invoke the operation - ChaosExperimentExecutionResource result = await chaosExperimentExecution.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 - ChaosExperimentExecutionData 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 ExecutionDetails_GetExperimentExecutionDetails() - { - // Generated from example definition: 2025-01-01/Experiments_ExecutionDetails.json - // this example is just showing the usage of "ExperimentExecutions_ExecutionDetails" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ChaosExperimentExecutionResource created on azure - // for more information of creating ChaosExperimentExecutionResource, please refer to the document of ChaosExperimentExecutionResource - string subscriptionId = "6b052e15-03d3-4f17-b2e1-be7f07588291"; - string resourceGroupName = "exampleRG"; - string experimentName = "exampleExperiment"; - string executionId = "f24500ad-744e-4a26-864b-b76199eac333"; - ResourceIdentifier chaosExperimentExecutionResourceId = ChaosExperimentExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, experimentName, executionId); - ChaosExperimentExecutionResource chaosExperimentExecution = client.GetChaosExperimentExecutionResource(chaosExperimentExecutionResourceId); - - // invoke the operation - ExperimentExecutionDetails result = await chaosExperimentExecution.ExecutionDetailsAsync(); - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml b/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml index e6814d5ec895..3531e88b907a 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml +++ b/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml @@ -1,3 +1,3 @@ -directory: specification/chaos/Chaos.Management -commit: b15e6baad78142745642047f29e7391ea37ab155 +directory: specification/chaos/resource-manager/Microsoft.Chaos/Chaos +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/CHANGELOG.md b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/CHANGELOG.md index df49ef6c1644..e44f8e234988 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/CHANGELOG.md +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.0.0-beta.4 (Unreleased) +## 2.0.0-beta.5 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 2.0.0-beta.4 (2025-09-18) + +### Breaking Changes + +- removed `AIConversation` and `ConversationalAIItem`, and reuse `TextConversation` and `TextConversationItem` for AI Conversation Analyze feature. + ## 2.0.0-beta.3 (2025-06-23) ### Features Added diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs index d12152014409..3169481c7ba3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs @@ -244,20 +244,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Language.Conversations.Models.AgeUnit left, Azure.AI.Language.Conversations.Models.AgeUnit right) { throw null; } public override string ToString() { throw null; } } - public partial class AIConversation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AIConversation(string id, Azure.AI.Language.Conversations.Models.InputModality modality, string language, System.Collections.Generic.IEnumerable conversationItems) { } - public System.Collections.Generic.IList ConversationItems { get { throw null; } } - public string Id { get { throw null; } } - public string Language { get { throw null; } } - public Azure.AI.Language.Conversations.Models.InputModality Modality { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Conversations.Models.AIConversation 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.Language.Conversations.Models.AIConversation 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 AIConversationLanguageUnderstandingActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AIConversationLanguageUnderstandingActionContent(string projectName, string deploymentName) { } @@ -547,8 +533,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ConversationalAIAnalysisInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ConversationalAIAnalysisInput(System.Collections.Generic.IEnumerable conversations) { } - public System.Collections.Generic.IList Conversations { get { throw null; } } + public ConversationalAIAnalysisInput(System.Collections.Generic.IEnumerable conversations) { } + public System.Collections.Generic.IList Conversations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationalAIAnalysisInput 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) { } @@ -589,19 +575,6 @@ 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 ConversationalAIItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ConversationalAIItem(string id, string participantId, string text) { } - public string Id { get { throw null; } } - public string ParticipantId { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Conversations.Models.ConversationalAIItem 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.Language.Conversations.Models.ConversationalAIItem 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 ConversationalAIResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationalAIResult() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs index 7ecd7ff58c49..a9edfa890bd0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs @@ -244,20 +244,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Language.Conversations.Models.AgeUnit left, Azure.AI.Language.Conversations.Models.AgeUnit right) { throw null; } public override string ToString() { throw null; } } - public partial class AIConversation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AIConversation(string id, Azure.AI.Language.Conversations.Models.InputModality modality, string language, System.Collections.Generic.IEnumerable conversationItems) { } - public System.Collections.Generic.IList ConversationItems { get { throw null; } } - public string Id { get { throw null; } } - public string Language { get { throw null; } } - public Azure.AI.Language.Conversations.Models.InputModality Modality { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Conversations.Models.AIConversation 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.Language.Conversations.Models.AIConversation 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 AIConversationLanguageUnderstandingActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AIConversationLanguageUnderstandingActionContent(string projectName, string deploymentName) { } @@ -547,8 +533,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ConversationalAIAnalysisInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ConversationalAIAnalysisInput(System.Collections.Generic.IEnumerable conversations) { } - public System.Collections.Generic.IList Conversations { get { throw null; } } + public ConversationalAIAnalysisInput(System.Collections.Generic.IEnumerable conversations) { } + public System.Collections.Generic.IList Conversations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationalAIAnalysisInput 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) { } @@ -589,19 +575,6 @@ 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 ConversationalAIItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ConversationalAIItem(string id, string participantId, string text) { } - public string Id { get { throw null; } } - public string ParticipantId { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Conversations.Models.ConversationalAIItem 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.Language.Conversations.Models.ConversationalAIItem 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 ConversationalAIResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationalAIResult() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/assets.json b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/assets.json index e9538c7363aa..9b2fdcb8eca4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/assets.json +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/cognitivelanguage/Azure.AI.Language.Conversations", - "Tag": "net/cognitivelanguage/Azure.AI.Language.Conversations_8d3d549d61" + "Tag": "net/cognitivelanguage/Azure.AI.Language.Conversations_d145117837" } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.md b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.md index ff80b1a8b16f..862d79fa47a3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.md +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.md @@ -30,16 +30,15 @@ string deploymentName = "production"; AnalyzeConversationInput data = new ConversationalAITask( new ConversationalAIAnalysisInput( - conversations: new AIConversation[] { - new AIConversation( + conversations: new TextConversation[] { + new TextConversation( id: "order", - modality: InputModality.Text, language: "en-GB", - conversationItems: new ConversationalAIItem[] + conversationItems: new TextConversationItem[] { - new ConversationalAIItem(id: "1", participantId: "user", text: "Hi"), - new ConversationalAIItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), - new ConversationalAIItem(id: "3", participantId: "user", text: "Send an email to Carol about tomorrow's demo") + new TextConversationItem(id: "1", participantId: "user", text: "Hi"), + new TextConversationItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), + new TextConversationItem(id: "3", participantId: "user", text: "Send an email to Carol about tomorrow's demo") } ) }), diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Azure.AI.Language.Conversations.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Azure.AI.Language.Conversations.csproj index bc09d7964535..f7e61082660e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Azure.AI.Language.Conversations.csproj +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Azure.AI.Language.Conversations.csproj @@ -2,7 +2,7 @@ This is the client library for the Conversations service, a cloud-based conversational AI service that applies custom machine-learning intelligence to a user's conversational, natural language text to predict overall meaning, and pull out relevant, detailed information. Microsoft Azure.AI.Language.Conversations client library - 2.0.0-beta.4 + 2.0.0-beta.5 1.1.0 Azure AI Language Conversations diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs index 98d30a03b075..010b0feaa19e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs @@ -24,23 +24,23 @@ public static ConversationalAITask ConversationalAITask(ConversationalAIAnalysis return new ConversationalAITask(AnalyzeConversationInputKind.ConversationalAI, serializedAdditionalRawData: null, analysisInput, parameters); } - /// Initializes a new instance of . - /// The name of the project to use. - /// The name of the deployment to use. - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - /// A new instance for mocking. - public static AIConversationLanguageUnderstandingActionContent AIConversationLanguageUnderstandingActionContent(string projectName = null, string deploymentName = null, StringIndexType? stringIndexType = null) + /// Initializes a new instance of . + /// Unique identifier for the conversation. + /// Language of the conversation item in BCP-47 format. + /// domain. + /// Ordered list of text conversation items in the conversation. + /// A new instance for mocking. + public static TextConversation TextConversation(string id = null, string language = null, ConversationDomain? domain = null, IEnumerable conversationItems = null) { - return new AIConversationLanguageUnderstandingActionContent(projectName, deploymentName, stringIndexType, serializedAdditionalRawData: null); - } + conversationItems ??= new List(); - /// Initializes a new instance of . - /// The input ConversationItem and its optional parameters. - /// Input parameters necessary for a Conversation language understanding task. - /// A new instance for mocking. - public static ConversationLanguageUnderstandingInput ConversationLanguageUnderstandingInput(ConversationAnalysisInput conversationInput = null, ConversationLanguageUnderstandingActionContent actionContent = null) - { - return new ConversationLanguageUnderstandingInput(AnalyzeConversationInputKind.Conversation, serializedAdditionalRawData: null, conversationInput, actionContent); + return new TextConversation( + id, + language, + InputModality.Text, + domain, + serializedAdditionalRawData: null, + conversationItems?.ToList()); } /// Initializes a new instance of . @@ -63,6 +63,87 @@ public static TextConversationItem TextConversationItem(string id = null, string serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Unique identifier for the conversation. + /// Language of the conversation item in BCP-47 format. + /// modality. + /// domain. + /// A new instance for mocking. + public static ConversationInput ConversationInput(string id = null, string language = null, string modality = null, ConversationDomain? domain = null) + { + return new UnknownConversationInput(id, language, modality == null ? default : new InputModality(modality), domain, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the conversation. + /// Language of the conversation item in BCP-47 format. + /// domain. + /// Ordered list of transcript conversation items in the conversation. + /// A new instance for mocking. + public static TranscriptConversation TranscriptConversation(string id = null, string language = null, ConversationDomain? domain = null, IEnumerable conversationItems = null) + { + conversationItems ??= new List(); + + return new TranscriptConversation( + id, + language, + InputModality.Transcript, + domain, + serializedAdditionalRawData: null, + conversationItems?.ToList()); + } + + /// Initializes a new instance of . + /// The ID of a conversation item. + /// The participant ID of a conversation item. + /// The override language of a conversation item in BCP 47 language representation. + /// Enumeration of supported conversational modalities. + /// Role of the participant. + /// Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers, abbreviations, and other transformations applied. + /// Inverse-text-normalized format with profanity masking applied. + /// Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added. + /// Lexical form of the recognized text from the speech-to-text API, with the actual words recognized. + /// List of word-level audio timing information. + /// Audio timing at the conversation item level. This still can help with AI quality if word-level audio timings are not available. + /// A new instance for mocking. + public static TranscriptConversationItem TranscriptConversationItem(string id = null, string participantId = null, string language = null, InputModality? modality = null, ParticipantRole? role = null, string inverseTextNormalized = null, string maskedInverseTextNormalized = null, string text = null, string lexical = null, IEnumerable wordLevelTimings = null, ConversationItemLevelTiming conversationItemLevelTiming = null) + { + wordLevelTimings ??= new List(); + + return new TranscriptConversationItem( + id, + participantId, + language, + modality, + role, + inverseTextNormalized, + maskedInverseTextNormalized, + text, + lexical, + wordLevelTimings?.ToList(), + conversationItemLevelTiming, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the project to use. + /// The name of the deployment to use. + /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// A new instance for mocking. + public static AIConversationLanguageUnderstandingActionContent AIConversationLanguageUnderstandingActionContent(string projectName = null, string deploymentName = null, StringIndexType? stringIndexType = null) + { + return new AIConversationLanguageUnderstandingActionContent(projectName, deploymentName, stringIndexType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The input ConversationItem and its optional parameters. + /// Input parameters necessary for a Conversation language understanding task. + /// A new instance for mocking. + public static ConversationLanguageUnderstandingInput ConversationLanguageUnderstandingInput(ConversationAnalysisInput conversationInput = null, ConversationLanguageUnderstandingActionContent actionContent = null) + { + return new ConversationLanguageUnderstandingInput(AnalyzeConversationInputKind.Conversation, serializedAdditionalRawData: null, conversationInput, actionContent); + } + /// Initializes a new instance of . /// The name of the project to use. /// The name of the deployment to use. @@ -1024,87 +1105,6 @@ public static AnalyzeConversationOperationInput AnalyzeConversationOperationInpu return new AnalyzeConversationOperationInput(displayName, conversationInput, actions?.ToList(), cancelAfter, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Unique identifier for the conversation. - /// Language of the conversation item in BCP-47 format. - /// modality. - /// domain. - /// A new instance for mocking. - public static ConversationInput ConversationInput(string id = null, string language = null, string modality = null, ConversationDomain? domain = null) - { - return new UnknownConversationInput(id, language, modality == null ? default : new InputModality(modality), domain, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique identifier for the conversation. - /// Language of the conversation item in BCP-47 format. - /// domain. - /// Ordered list of text conversation items in the conversation. - /// A new instance for mocking. - public static TextConversation TextConversation(string id = null, string language = null, ConversationDomain? domain = null, IEnumerable conversationItems = null) - { - conversationItems ??= new List(); - - return new TextConversation( - id, - language, - InputModality.Text, - domain, - serializedAdditionalRawData: null, - conversationItems?.ToList()); - } - - /// Initializes a new instance of . - /// Unique identifier for the conversation. - /// Language of the conversation item in BCP-47 format. - /// domain. - /// Ordered list of transcript conversation items in the conversation. - /// A new instance for mocking. - public static TranscriptConversation TranscriptConversation(string id = null, string language = null, ConversationDomain? domain = null, IEnumerable conversationItems = null) - { - conversationItems ??= new List(); - - return new TranscriptConversation( - id, - language, - InputModality.Transcript, - domain, - serializedAdditionalRawData: null, - conversationItems?.ToList()); - } - - /// Initializes a new instance of . - /// The ID of a conversation item. - /// The participant ID of a conversation item. - /// The override language of a conversation item in BCP 47 language representation. - /// Enumeration of supported conversational modalities. - /// Role of the participant. - /// Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers, abbreviations, and other transformations applied. - /// Inverse-text-normalized format with profanity masking applied. - /// Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added. - /// Lexical form of the recognized text from the speech-to-text API, with the actual words recognized. - /// List of word-level audio timing information. - /// Audio timing at the conversation item level. This still can help with AI quality if word-level audio timings are not available. - /// A new instance for mocking. - public static TranscriptConversationItem TranscriptConversationItem(string id = null, string participantId = null, string language = null, InputModality? modality = null, ParticipantRole? role = null, string inverseTextNormalized = null, string maskedInverseTextNormalized = null, string text = null, string lexical = null, IEnumerable wordLevelTimings = null, ConversationItemLevelTiming conversationItemLevelTiming = null) - { - wordLevelTimings ??= new List(); - - return new TranscriptConversationItem( - id, - participantId, - language, - modality, - role, - inverseTextNormalized, - maskedInverseTextNormalized, - text, - lexical, - wordLevelTimings?.ToList(), - conversationItemLevelTiming, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// logging opt out. /// This field indicates the project name for the model. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml index 79982e8603a8..579881f849b5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml @@ -9,19 +9,19 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new AIConversation[] -{ - new AIConversation("order", InputModality.Text, "en", new ConversationalAIItem[] - { - new ConversationalAIItem("1", "user", "Hi!"), - new ConversationalAIItem("2", "bot", "Hello, how can I help you?"), - new ConversationalAIItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), - new ConversationalAIItem("4", "bot", "Do you have any airline preference?"), - new ConversationalAIItem("5", "user", "No."), - new ConversationalAIItem("6", "user", "I like New York and Boston."), - new ConversationalAIItem("7", "user", "Actualy, change the destination to New York."), - new ConversationalAIItem("8", "user", "Wait, I do not like the food in New York."), - new ConversationalAIItem("9", "user", "Ok, change the destination back to Berlin.") +AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new TextConversation[] +{ + new TextConversation("order", "en", new TextConversationItem[] + { + new TextConversationItem("1", "user", "Hi!"), + new TextConversationItem("2", "bot", "Hello, how can I help you?"), + new TextConversationItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), + new TextConversationItem("4", "bot", "Do you have any airline preference?"), + new TextConversationItem("5", "user", "No."), + new TextConversationItem("6", "user", "I like New York and Boston."), + new TextConversationItem("7", "user", "Actualy, change the destination to New York."), + new TextConversationItem("8", "user", "Wait, I do not like the food in New York."), + new TextConversationItem("9", "user", "Ok, change the destination back to Berlin.") }) }), new AIConversationLanguageUnderstandingActionContent("project1", "deployment1") { @@ -95,19 +95,19 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new AIConversation[] +AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new TextConversation[] { - new AIConversation("order", InputModality.Text, "en", new ConversationalAIItem[] + new TextConversation("order", "en", new TextConversationItem[] { - new ConversationalAIItem("1", "user", "Hi!"), - new ConversationalAIItem("2", "bot", "Hello, how can I help you?"), - new ConversationalAIItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), - new ConversationalAIItem("4", "bot", "Do you have any airline preference?"), - new ConversationalAIItem("5", "user", "No."), - new ConversationalAIItem("6", "user", "I like New York and Boston."), - new ConversationalAIItem("7", "user", "Actualy, change the destination to New York."), - new ConversationalAIItem("8", "user", "Wait, I do not like the food in New York."), - new ConversationalAIItem("9", "user", "Ok, change the destination back to Berlin.") + new TextConversationItem("1", "user", "Hi!"), + new TextConversationItem("2", "bot", "Hello, how can I help you?"), + new TextConversationItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), + new TextConversationItem("4", "bot", "Do you have any airline preference?"), + new TextConversationItem("5", "user", "No."), + new TextConversationItem("6", "user", "I like New York and Boston."), + new TextConversationItem("7", "user", "Actualy, change the destination to New York."), + new TextConversationItem("8", "user", "Wait, I do not like the food in New York."), + new TextConversationItem("9", "user", "Ok, change the destination back to Berlin.") }) }), new AIConversationLanguageUnderstandingActionContent("project1", "deployment1") { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AIConversation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AIConversation.Serialization.cs deleted file mode 100644 index 0565cfa1cd14..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AIConversation.Serialization.cs +++ /dev/null @@ -1,176 +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.AI.Language.Conversations.Models -{ - public partial class AIConversation : 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(AIConversation)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("modality"u8); - writer.WriteStringValue(Modality.ToString()); - writer.WritePropertyName("language"u8); - writer.WriteStringValue(Language); - writer.WritePropertyName("conversationItems"u8); - writer.WriteStartArray(); - foreach (var item in ConversationItems) - { - 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 - } - } - } - - AIConversation 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(AIConversation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAIConversation(document.RootElement, options); - } - - internal static AIConversation DeserializeAIConversation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - InputModality modality = default; - string language = default; - IList conversationItems = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("modality"u8)) - { - modality = new InputModality(property.Value.GetString()); - continue; - } - if (property.NameEquals("language"u8)) - { - language = property.Value.GetString(); - continue; - } - if (property.NameEquals("conversationItems"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConversationalAIItem.DeserializeConversationalAIItem(item, options)); - } - conversationItems = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AIConversation(id, modality, language, conversationItems, 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, AzureAILanguageConversationsContext.Default); - default: - throw new FormatException($"The model {nameof(AIConversation)} does not support writing '{options.Format}' format."); - } - } - - AIConversation 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 DeserializeAIConversation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AIConversation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AIConversation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAIConversation(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AIConversation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AIConversation.cs deleted file mode 100644 index ace9cfdce0d6..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AIConversation.cs +++ /dev/null @@ -1,96 +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.AI.Language.Conversations.Models -{ - /// The Conversations for ai conversation analysis. - public partial class AIConversation - { - /// - /// 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 ID of the conversation. - /// Default modality for all conversation items. - /// Default language for all conversation items in BCP 47 language representation. - /// List of conversation items. - /// , or is null. - public AIConversation(string id, InputModality modality, string language, IEnumerable conversationItems) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(language, nameof(language)); - Argument.AssertNotNull(conversationItems, nameof(conversationItems)); - - Id = id; - Modality = modality; - Language = language; - ConversationItems = conversationItems.ToList(); - } - - /// Initializes a new instance of . - /// The ID of the conversation. - /// Default modality for all conversation items. - /// Default language for all conversation items in BCP 47 language representation. - /// List of conversation items. - /// Keeps track of any properties unknown to the library. - internal AIConversation(string id, InputModality modality, string language, IList conversationItems, IDictionary serializedAdditionalRawData) - { - Id = id; - Modality = modality; - Language = language; - ConversationItems = conversationItems; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AIConversation() - { - } - - /// The ID of the conversation. - public string Id { get; } - /// Default modality for all conversation items. - public InputModality Modality { get; } - /// Default language for all conversation items in BCP 47 language representation. - public string Language { get; } - /// List of conversation items. - public IList ConversationItems { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AzureAILanguageConversationsContext.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AzureAILanguageConversationsContext.cs index 40158613b78a..95a8b480c6b4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AzureAILanguageConversationsContext.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AzureAILanguageConversationsContext.cs @@ -15,7 +15,6 @@ namespace Azure.AI.Language.Conversations /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// [ModelReaderWriterBuildable(typeof(AgeResolution))] - [ModelReaderWriterBuildable(typeof(AIConversation))] [ModelReaderWriterBuildable(typeof(AIConversationLanguageUnderstandingActionContent))] [ModelReaderWriterBuildable(typeof(AnalysisConfig))] [ModelReaderWriterBuildable(typeof(AnalyzeConversationActionResult))] @@ -38,7 +37,6 @@ namespace Azure.AI.Language.Conversations [ModelReaderWriterBuildable(typeof(ConversationalAIAnalysisInput))] [ModelReaderWriterBuildable(typeof(ConversationalAIEntity))] [ModelReaderWriterBuildable(typeof(ConversationalAIIntent))] - [ModelReaderWriterBuildable(typeof(ConversationalAIItem))] [ModelReaderWriterBuildable(typeof(ConversationalAIResult))] [ModelReaderWriterBuildable(typeof(ConversationalAITask))] [ModelReaderWriterBuildable(typeof(ConversationalAITaskResult))] diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.Serialization.cs index 5d417bea0023..1749f2998a6b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.Serialization.cs @@ -78,17 +78,17 @@ internal static ConversationalAIAnalysisInput DeserializeConversationalAIAnalysi { return null; } - IList conversations = default; + IList conversations = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("conversations"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AIConversation.DeserializeAIConversation(item, options)); + array.Add(TextConversation.DeserializeTextConversation(item, options)); } conversations = array; continue; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.cs index 4f8775f55e65..ba53f060fe8f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIAnalysisInput.cs @@ -49,7 +49,7 @@ public partial class ConversationalAIAnalysisInput /// Initializes a new instance of . /// List of multiple conversations. /// is null. - public ConversationalAIAnalysisInput(IEnumerable conversations) + public ConversationalAIAnalysisInput(IEnumerable conversations) { Argument.AssertNotNull(conversations, nameof(conversations)); @@ -59,7 +59,7 @@ public ConversationalAIAnalysisInput(IEnumerable conversations) /// Initializes a new instance of . /// List of multiple conversations. /// Keeps track of any properties unknown to the library. - internal ConversationalAIAnalysisInput(IList conversations, IDictionary serializedAdditionalRawData) + internal ConversationalAIAnalysisInput(IList conversations, IDictionary serializedAdditionalRawData) { Conversations = conversations; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -71,6 +71,6 @@ internal ConversationalAIAnalysisInput() } /// List of multiple conversations. - public IList Conversations { get; } + public IList Conversations { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIItem.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIItem.Serialization.cs deleted file mode 100644 index ba43d18c2c54..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIItem.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.AI.Language.Conversations.Models -{ - public partial class ConversationalAIItem : 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(ConversationalAIItem)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("participantId"u8); - writer.WriteStringValue(ParticipantId); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - 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 - } - } - } - - ConversationalAIItem 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(ConversationalAIItem)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationalAIItem(document.RootElement, options); - } - - internal static ConversationalAIItem DeserializeConversationalAIItem(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string participantId = default; - string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("participantId"u8)) - { - participantId = property.Value.GetString(); - continue; - } - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConversationalAIItem(id, participantId, text, 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, AzureAILanguageConversationsContext.Default); - default: - throw new FormatException($"The model {nameof(ConversationalAIItem)} does not support writing '{options.Format}' format."); - } - } - - ConversationalAIItem 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 DeserializeConversationalAIItem(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConversationalAIItem)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ConversationalAIItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConversationalAIItem(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIItem.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIItem.cs deleted file mode 100644 index 7dac48ab7fad..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalAIItem.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Conversations.Models -{ - /// List of conversation items. - public partial class ConversationalAIItem - { - /// - /// 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 ID of a conversation item. - /// The participant ID of a conversation item. - /// The text input. - /// , or is null. - public ConversationalAIItem(string id, string participantId, string text) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(participantId, nameof(participantId)); - Argument.AssertNotNull(text, nameof(text)); - - Id = id; - ParticipantId = participantId; - Text = text; - } - - /// Initializes a new instance of . - /// The ID of a conversation item. - /// The participant ID of a conversation item. - /// The text input. - /// Keeps track of any properties unknown to the library. - internal ConversationalAIItem(string id, string participantId, string text, IDictionary serializedAdditionalRawData) - { - Id = id; - ParticipantId = participantId; - Text = text; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ConversationalAIItem() - { - } - - /// The ID of a conversation item. - public string Id { get; } - /// The participant ID of a conversation item. - public string ParticipantId { get; } - /// The text input. - public string Text { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/ConversationsClientLiveTests.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/ConversationsClientLiveTests.cs index 473cad607397..d2cbb008c2b9 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/ConversationsClientLiveTests.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/ConversationsClientLiveTests.cs @@ -576,16 +576,15 @@ public async Task AnalyzeConversationAsync_AIConversation() AnalyzeConversationInput data = new ConversationalAITask( new ConversationalAIAnalysisInput( - conversations: new AIConversation[] { - new AIConversation( + conversations: new TextConversation[] { + new TextConversation( id: "order", - modality: InputModality.Text, language: "en-GB", - conversationItems: new ConversationalAIItem[] + conversationItems: new TextConversationItem[] { - new ConversationalAIItem(id: "1", participantId: "user", text: "Hi"), - new ConversationalAIItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), - new ConversationalAIItem(id: "3", participantId: "user", text: "I would like to book a flight.") + new TextConversationItem(id: "1", participantId: "user", text: "Hi"), + new TextConversationItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), + new TextConversationItem(id: "3", participantId: "user", text: "I would like to book a flight.") } ) }), diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs index 5bc6852c44a4..089b67910995 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs @@ -211,19 +211,19 @@ public void Example_Conversations_AnalyzeConversation_SuccessfulAnalyzeConversat AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new AIConversation[] - { -new AIConversation("order", InputModality.Text, "en", new ConversationalAIItem[] -{ -new ConversationalAIItem("1", "user", "Hi!"), -new ConversationalAIItem("2", "bot", "Hello, how can I help you?"), -new ConversationalAIItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), -new ConversationalAIItem("4", "bot", "Do you have any airline preference?"), -new ConversationalAIItem("5", "user", "No."), -new ConversationalAIItem("6", "user", "I like New York and Boston."), -new ConversationalAIItem("7", "user", "Actualy, change the destination to New York."), -new ConversationalAIItem("8", "user", "Wait, I do not like the food in New York."), -new ConversationalAIItem("9", "user", "Ok, change the destination back to Berlin.") + AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new TextConversation[] + { +new TextConversation("order", "en", new TextConversationItem[] +{ +new TextConversationItem("1", "user", "Hi!"), +new TextConversationItem("2", "bot", "Hello, how can I help you?"), +new TextConversationItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), +new TextConversationItem("4", "bot", "Do you have any airline preference?"), +new TextConversationItem("5", "user", "No."), +new TextConversationItem("6", "user", "I like New York and Boston."), +new TextConversationItem("7", "user", "Actualy, change the destination to New York."), +new TextConversationItem("8", "user", "Wait, I do not like the food in New York."), +new TextConversationItem("9", "user", "Ok, change the destination back to Berlin.") }) }), new AIConversationLanguageUnderstandingActionContent("project1", "deployment1") { @@ -240,19 +240,19 @@ public async Task Example_Conversations_AnalyzeConversation_SuccessfulAnalyzeCon AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new AIConversation[] + AnalyzeConversationInput analyzeConversationInput = new ConversationalAITask(new ConversationalAIAnalysisInput(new TextConversation[] { -new AIConversation("order", InputModality.Text, "en", new ConversationalAIItem[] +new TextConversation("order", "en", new TextConversationItem[] { -new ConversationalAIItem("1", "user", "Hi!"), -new ConversationalAIItem("2", "bot", "Hello, how can I help you?"), -new ConversationalAIItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), -new ConversationalAIItem("4", "bot", "Do you have any airline preference?"), -new ConversationalAIItem("5", "user", "No."), -new ConversationalAIItem("6", "user", "I like New York and Boston."), -new ConversationalAIItem("7", "user", "Actualy, change the destination to New York."), -new ConversationalAIItem("8", "user", "Wait, I do not like the food in New York."), -new ConversationalAIItem("9", "user", "Ok, change the destination back to Berlin.") +new TextConversationItem("1", "user", "Hi!"), +new TextConversationItem("2", "bot", "Hello, how can I help you?"), +new TextConversationItem("3", "user", "I would like to book a flight from Paris to Berlin on Oct 10th."), +new TextConversationItem("4", "bot", "Do you have any airline preference?"), +new TextConversationItem("5", "user", "No."), +new TextConversationItem("6", "user", "I like New York and Boston."), +new TextConversationItem("7", "user", "Actualy, change the destination to New York."), +new TextConversationItem("8", "user", "Wait, I do not like the food in New York."), +new TextConversationItem("9", "user", "Ok, change the destination back to Berlin.") }) }), new AIConversationLanguageUnderstandingActionContent("project1", "deployment1") { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.cs index 43965c82ca99..aa74aa90756f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Samples/Sample10_AnalyzeConversation_ConversationalAIPrediction.cs @@ -30,16 +30,15 @@ public void AnalyzeConversationalAI() AnalyzeConversationInput data = new ConversationalAITask( new ConversationalAIAnalysisInput( - conversations: new AIConversation[] { - new AIConversation( + conversations: new TextConversation[] { + new TextConversation( id: "order", - modality: InputModality.Text, language: "en-GB", - conversationItems: new ConversationalAIItem[] + conversationItems: new TextConversationItem[] { - new ConversationalAIItem(id: "1", participantId: "user", text: "Hi"), - new ConversationalAIItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), - new ConversationalAIItem(id: "3", participantId: "user", text: "Send an email to Carol about tomorrow's demo") + new TextConversationItem(id: "1", participantId: "user", text: "Hi"), + new TextConversationItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), + new TextConversationItem(id: "3", participantId: "user", text: "Send an email to Carol about tomorrow's demo") } ) }), @@ -144,17 +143,16 @@ public async Task AnalyzeConversationalAIAsync() AnalyzeConversationInput data = new ConversationalAITask( new ConversationalAIAnalysisInput( - conversations: new AIConversation[] + conversations: new TextConversation[] { - new AIConversation( + new TextConversation( id: "order", - modality: InputModality.Text, language: "en-GB", - conversationItems: new ConversationalAIItem[] + conversationItems: new TextConversationItem[] { - new ConversationalAIItem(id: "1", participantId: "user", text: "Hi"), - new ConversationalAIItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), - new ConversationalAIItem(id: "3", participantId: "user", text: "Send an email to Carol about tomorrow's demo") + new TextConversationItem(id: "1", participantId: "user", text: "Hi"), + new TextConversationItem(id: "2", participantId: "bot", text: "Hello, how can I help you?"), + new TextConversationItem(id: "3", participantId: "user", text: "Send an email to Carol about tomorrow's demo") } ) }), diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml index 162b14af1874..bbd85bf97761 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/cognitiveservices/Language.Conversations -commit: 00e3c94cd8ccd81155b81fd8388c880293394ea3 +commit: e85b022b4319ae7ee9975a0d0a4c3f52bdceb27f repo: Azure/azure-rest-api-specs diff --git a/sdk/communication/Azure.Communication.Email/CHANGELOG.md b/sdk/communication/Azure.Communication.Email/CHANGELOG.md index 4689300731ef..046d7b2f804d 100644 --- a/sdk/communication/Azure.Communication.Email/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.Email/CHANGELOG.md @@ -1,14 +1,11 @@ # Release History -## 1.1.0-beta.3 (Unreleased) +## 1.1.0 (2025-09-01) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Consumers can now provide a value for the `ContentId` property when sending emails with attachments. + This allows consumers to reference attachments in the email body using the `cid` scheme. The `ContentId` property can be set on the `EmailAttachment` object. ## 1.1.0-beta.2 (2024-08-14) diff --git a/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj b/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj index 3c55be1e473c..ee5cfa68635d 100644 --- a/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj +++ b/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj @@ -2,7 +2,7 @@ This client library enables working with the Microsoft Azure Communication Email service. Azure Communication Email Service - 1.1.0-beta.3 + 1.1.0 1.0.1 Microsoft Azure Communication Email Service;Microsoft;Azure;Azure Communication Service;Azure Communication Email Service;Email;Communication diff --git a/sdk/communication/Azure.Communication.Email/src/Generated/EmailRestClient.cs b/sdk/communication/Azure.Communication.Email/src/Generated/EmailRestClient.cs index df7f2a0eec9d..8cc913901942 100644 --- a/sdk/communication/Azure.Communication.Email/src/Generated/EmailRestClient.cs +++ b/sdk/communication/Azure.Communication.Email/src/Generated/EmailRestClient.cs @@ -29,7 +29,7 @@ internal partial class EmailRestClient /// The communication resource, for example https://my-resource.communication.azure.com. /// Api Version. /// , , or is null. - public EmailRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion = "2024-07-01-preview") + public EmailRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion = "2025-09-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/communication/Azure.Communication.Email/src/autorest.md b/sdk/communication/Azure.Communication.Email/src/autorest.md index d3f9b95b32be..49bf4ff6ce36 100644 --- a/sdk/communication/Azure.Communication.Email/src/autorest.md +++ b/sdk/communication/Azure.Communication.Email/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e64ad693df24b47d4009eece6663c8d95cf94be6/specification/communication/data-plane/Email/preview/2024-07-01-preview/CommunicationServicesEmail.json +- https://github.com/Azure/azure-rest-api-specs/blob/83327afe471d7a2eb923de58b163658d45e0e5a7/specification/communication/data-plane/Email/stable/2025-09-01/CommunicationServicesEmail.json generation1-convenience-client: true payload-flattening-threshold: 3 model-namespace: false @@ -15,3 +15,4 @@ directive: transform: > $["x-ms-client-name"] = "content"; ``` + diff --git a/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs index 85d4b5968e6d..0c08d1129a09 100644 --- a/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs +++ b/sdk/communication/Azure.Communication.Messages/tests/NotificationMessagesClient/NotificationMessagesClientLiveTests.cs @@ -606,6 +606,7 @@ public Task SendTextNessage_WithInvalidRecipient_ShouldFail() } [Test] + [Ignore("Disabling this test as for failing Email build.")] public Task SendSuperLongTextMessage_ShouldFail() { // Arrange diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/Azure.ResourceManager.Compute.Recommender.sln b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/Azure.ResourceManager.Compute.Recommender.sln new file mode 100644 index 000000000000..3076787fff2c --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/Azure.ResourceManager.Compute.Recommender.sln @@ -0,0 +1,54 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Compute.Recommender", "src\Azure.ResourceManager.Compute.Recommender.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Compute.Recommender.Tests", "tests\Azure.ResourceManager.Compute.Recommender.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md new file mode 100644 index 000000000000..aa289c087938 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release History + +## 1.0.0-beta.1 (2025-09-30) + +### Features Added + +- Release `Spot Placement Score` version `2025-06-05` diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Directory.Build.props b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/Directory.Build.props similarity index 100% rename from sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Directory.Build.props rename to sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/Directory.Build.props diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/README.md b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/README.md new file mode 100644 index 000000000000..c4b92402fa1c --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Compute Recommender management client library for .NET + +The Microsoft Azure Compute Recommender provides recommendations to help you make informed decisions about deployment of your virtual machines. + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure Compute Recommender management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Compute.Recommender --prerelease +``` + +### Prerequisites + +* You must have a [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ 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 new file mode 100644 index 000000000000..f18534c6bc52 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs @@ -0,0 +1,135 @@ +namespace Azure.ResourceManager.Compute.Recommender +{ + public partial class AzureResourceManagerComputeRecommenderContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerComputeRecommenderContext() { } + public static Azure.ResourceManager.Compute.Recommender.AzureResourceManagerComputeRecommenderContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class ComputeRecommenderDiagnosticData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ComputeRecommenderDiagnosticData() { } + public System.Collections.Generic.IList ComputeRecommenderDiagnosticSupportedResourceTypes { 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.Compute.Recommender.ComputeRecommenderDiagnosticData 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.Compute.Recommender.ComputeRecommenderDiagnosticData 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 ComputeRecommenderDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + 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 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; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData 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 static partial class ComputeRecommenderExtensions + { + public static Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } +} +namespace Azure.ResourceManager.Compute.Recommender.Mocking +{ + public partial class MockableComputeRecommenderArmClient : Azure.ResourceManager.ArmResource + { + protected MockableComputeRecommenderArmClient() { } + public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableComputeRecommenderSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableComputeRecommenderSubscriptionResource() { } + public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic() { throw null; } + } +} +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + public static partial class ArmComputeRecommenderModelFactory + { + public static Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData ComputeRecommenderDiagnosticData(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.IList computeRecommenderDiagnosticSupportedResourceTypes = null) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent ComputeRecommenderGenerateContent(System.Collections.Generic.IEnumerable desiredLocations = null, System.Collections.Generic.IEnumerable desiredSizes = null, int? desiredCount = default(int?), bool? availabilityZones = default(bool?)) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateResult ComputeRecommenderGenerateResult(System.Collections.Generic.IEnumerable desiredLocations = null, System.Collections.Generic.IEnumerable desiredSizes = null, int? desiredCount = default(int?), bool? availabilityZones = default(bool?), System.Collections.Generic.IEnumerable placementScores = null) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderPlacementScore ComputeRecommenderPlacementScore(string sku = null, Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?), string availabilityZone = null, string score = null, bool? isQuotaAvailable = default(bool?)) { throw null; } + } + public partial class ComputeRecommenderGenerateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeRecommenderGenerateContent() { } + public bool? AvailabilityZones { get { throw null; } set { } } + public int? DesiredCount { get { throw null; } set { } } + public System.Collections.Generic.IList DesiredLocations { get { throw null; } } + public System.Collections.Generic.IList DesiredSizes { get { throw null; } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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 ComputeRecommenderGenerateResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ComputeRecommenderGenerateResult() { } + public bool? AvailabilityZones { get { throw null; } } + public int? DesiredCount { get { throw null; } } + public System.Collections.Generic.IList DesiredLocations { get { throw null; } } + public System.Collections.Generic.IList DesiredSizes { get { throw null; } } + public System.Collections.Generic.IList PlacementScores { get { throw null; } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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 ComputeRecommenderPlacementScore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ComputeRecommenderPlacementScore() { } + public string AvailabilityZone { get { throw null; } } + public bool? IsQuotaAvailable { get { throw null; } } + public Azure.Core.AzureLocation? Region { get { throw null; } } + public string Score { get { throw null; } } + public string Sku { get { throw null; } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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 ComputeRecommenderResourceSize : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeRecommenderResourceSize() { } + public string Sku { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderResourceSize 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.Compute.Recommender.Models.ComputeRecommenderResourceSize 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.Compute.Recommender.Models.ComputeRecommenderResourceSize 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.Compute.Recommender.Models.ComputeRecommenderResourceSize 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/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 new file mode 100644 index 000000000000..f18534c6bc52 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs @@ -0,0 +1,135 @@ +namespace Azure.ResourceManager.Compute.Recommender +{ + public partial class AzureResourceManagerComputeRecommenderContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerComputeRecommenderContext() { } + public static Azure.ResourceManager.Compute.Recommender.AzureResourceManagerComputeRecommenderContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class ComputeRecommenderDiagnosticData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ComputeRecommenderDiagnosticData() { } + public System.Collections.Generic.IList ComputeRecommenderDiagnosticSupportedResourceTypes { 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.Compute.Recommender.ComputeRecommenderDiagnosticData 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.Compute.Recommender.ComputeRecommenderDiagnosticData 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 ComputeRecommenderDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + 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 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; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData 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 static partial class ComputeRecommenderExtensions + { + public static Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } +} +namespace Azure.ResourceManager.Compute.Recommender.Mocking +{ + public partial class MockableComputeRecommenderArmClient : Azure.ResourceManager.ArmResource + { + protected MockableComputeRecommenderArmClient() { } + public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableComputeRecommenderSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableComputeRecommenderSubscriptionResource() { } + public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic() { throw null; } + } +} +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + public static partial class ArmComputeRecommenderModelFactory + { + public static Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData ComputeRecommenderDiagnosticData(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.IList computeRecommenderDiagnosticSupportedResourceTypes = null) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent ComputeRecommenderGenerateContent(System.Collections.Generic.IEnumerable desiredLocations = null, System.Collections.Generic.IEnumerable desiredSizes = null, int? desiredCount = default(int?), bool? availabilityZones = default(bool?)) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateResult ComputeRecommenderGenerateResult(System.Collections.Generic.IEnumerable desiredLocations = null, System.Collections.Generic.IEnumerable desiredSizes = null, int? desiredCount = default(int?), bool? availabilityZones = default(bool?), System.Collections.Generic.IEnumerable placementScores = null) { throw null; } + public static Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderPlacementScore ComputeRecommenderPlacementScore(string sku = null, Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?), string availabilityZone = null, string score = null, bool? isQuotaAvailable = default(bool?)) { throw null; } + } + public partial class ComputeRecommenderGenerateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeRecommenderGenerateContent() { } + public bool? AvailabilityZones { get { throw null; } set { } } + public int? DesiredCount { get { throw null; } set { } } + public System.Collections.Generic.IList DesiredLocations { get { throw null; } } + public System.Collections.Generic.IList DesiredSizes { get { throw null; } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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.Compute.Recommender.Models.ComputeRecommenderGenerateContent 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 ComputeRecommenderGenerateResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ComputeRecommenderGenerateResult() { } + public bool? AvailabilityZones { get { throw null; } } + public int? DesiredCount { get { throw null; } } + public System.Collections.Generic.IList DesiredLocations { get { throw null; } } + public System.Collections.Generic.IList DesiredSizes { get { throw null; } } + public System.Collections.Generic.IList PlacementScores { get { throw null; } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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.Compute.Recommender.Models.ComputeRecommenderGenerateResult 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 ComputeRecommenderPlacementScore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ComputeRecommenderPlacementScore() { } + public string AvailabilityZone { get { throw null; } } + public bool? IsQuotaAvailable { get { throw null; } } + public Azure.Core.AzureLocation? Region { get { throw null; } } + public string Score { get { throw null; } } + public string Sku { get { throw null; } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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.Compute.Recommender.Models.ComputeRecommenderPlacementScore 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 ComputeRecommenderResourceSize : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeRecommenderResourceSize() { } + public string Sku { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderResourceSize 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.Compute.Recommender.Models.ComputeRecommenderResourceSize 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.Compute.Recommender.Models.ComputeRecommenderResourceSize 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.Compute.Recommender.Models.ComputeRecommenderResourceSize 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/computerecommender/Azure.ResourceManager.Compute.Recommender/assets.json b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/assets.json new file mode 100644 index 000000000000..c41e695ae8fc --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/computerecommender/Azure.ResourceManager.Compute.Recommender", + "Tag": "" +} 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 new file mode 100644 index 000000000000..53801c37d39e --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Azure.ResourceManager.Compute.Recommender.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider ComputeRecommender. + 1.0.0-beta.1 + 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 new file mode 100644 index 000000000000..96f129492821 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ArmComputeRecommenderModelFactory.cs @@ -0,0 +1,92 @@ +// 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.Core; +using Azure.ResourceManager.Compute.Recommender; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// A factory class for creating instances of the models for mocking. + public static partial class ArmComputeRecommenderModelFactory + { + + /// 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. + /// Describes what are the supported resource types for a diagnostic. + /// A new instance for mocking. + public static ComputeRecommenderDiagnosticData ComputeRecommenderDiagnosticData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IList computeRecommenderDiagnosticSupportedResourceTypes = default) + { + return new ComputeRecommenderDiagnosticData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties: null, + computeRecommenderDiagnosticSupportedResourceTypes is null ? default : new ComputeRecommenderDiagnosticProperties(computeRecommenderDiagnosticSupportedResourceTypes, new Dictionary())); + } + + /// SpotPlacementScores API Input. + /// The desired regions. + /// The desired virtual machine SKU sizes. + /// Desired instance count per region/zone based on the scope. + /// Defines if the scope is zonal or regional. + /// A new instance for mocking. + public static ComputeRecommenderGenerateContent ComputeRecommenderGenerateContent(IEnumerable desiredLocations = default, IEnumerable desiredSizes = default, int? desiredCount = default, bool? availabilityZones = default) + { + desiredLocations ??= new ChangeTrackingList(); + desiredSizes ??= new ChangeTrackingList(); + + return new ComputeRecommenderGenerateContent(desiredLocations.ToList(), desiredSizes.ToList(), desiredCount, availabilityZones, additionalBinaryDataProperties: null); + } + + /// SpotPlacementScores API response. + /// The desired regions. + /// The desired virtual machine SKU sizes. + /// Desired instance count per region/zone based on the scope. + /// Defines if the scope is zonal or regional. + /// A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + /// A new instance for mocking. + public static ComputeRecommenderGenerateResult ComputeRecommenderGenerateResult(IEnumerable desiredLocations = default, IEnumerable desiredSizes = default, int? desiredCount = default, bool? availabilityZones = default, IEnumerable placementScores = default) + { + desiredLocations ??= new ChangeTrackingList(); + desiredSizes ??= new ChangeTrackingList(); + placementScores ??= new ChangeTrackingList(); + + return new ComputeRecommenderGenerateResult( + desiredLocations.ToList(), + desiredSizes.ToList(), + desiredCount, + availabilityZones, + placementScores.ToList(), + additionalBinaryDataProperties: null); + } + + /// The spot placement score for sku/region/zone combination. + /// The resource's CRP virtual machine SKU size. + /// The region. + /// The availability zone. + /// A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + /// Whether the desired quota is available. + /// A new instance for mocking. + public static ComputeRecommenderPlacementScore ComputeRecommenderPlacementScore(string sku = default, AzureLocation? region = default, string availabilityZone = default, string score = default, bool? isQuotaAvailable = default) + { + return new ComputeRecommenderPlacementScore( + sku, + region, + availabilityZone, + score, + isQuotaAvailable, + additionalBinaryDataProperties: null); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticData.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticData.Serialization.cs new file mode 100644 index 000000000000..4b4e5a64b130 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticData.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.Text; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Compute.Recommender.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Recommender +{ + /// Contains metadata of a diagnostic type. + public partial class ComputeRecommenderDiagnosticData : 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(ComputeRecommenderDiagnosticData)} 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. + ComputeRecommenderDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ComputeRecommenderDiagnosticData)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(ComputeRecommenderDiagnosticData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeRecommenderDiagnosticData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ComputeRecommenderDiagnosticData DeserializeComputeRecommenderDiagnosticData(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(); + ComputeRecommenderDiagnosticProperties 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, AzureResourceManagerComputeRecommenderContext.Default); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ComputeRecommenderDiagnosticProperties.DeserializeComputeRecommenderDiagnosticProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ComputeRecommenderDiagnosticData( + 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, AzureResourceManagerComputeRecommenderContext.Default); + default: + throw new FormatException($"The model {nameof(ComputeRecommenderDiagnosticData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + ComputeRecommenderDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ComputeRecommenderDiagnosticData)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 DeserializeComputeRecommenderDiagnosticData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeRecommenderDiagnosticData)} 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 ComputeRecommenderDiagnosticData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeComputeRecommenderDiagnosticData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticData.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticData.cs new file mode 100644 index 000000000000..573020f9db3e --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticData.cs @@ -0,0 +1,52 @@ +// 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.Compute.Recommender.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Recommender +{ + /// Contains metadata of a diagnostic type. + public partial class ComputeRecommenderDiagnosticData : ResourceData + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal ComputeRecommenderDiagnosticData() + { + } + + /// 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. + /// Contains additional properties of a diagnostic. + internal ComputeRecommenderDiagnosticData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, ComputeRecommenderDiagnosticProperties properties) : base(id, name, resourceType, systemData) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// Contains additional properties of a diagnostic. + internal ComputeRecommenderDiagnosticProperties Properties { get; } + + /// Describes what are the supported resource types for a diagnostic. + public IList ComputeRecommenderDiagnosticSupportedResourceTypes + { + get + { + return Properties.SupportedResourceTypes; + } + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.Serialization.cs new file mode 100644 index 000000000000..5dfc94fb50db --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.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.Compute.Recommender +{ + /// + public partial class ComputeRecommenderDiagnosticResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new ComputeRecommenderDiagnosticData(); + + /// 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. + ComputeRecommenderDiagnosticData 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, AzureResourceManagerComputeRecommenderContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + ComputeRecommenderDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeRecommenderContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs new file mode 100644 index 000000000000..861351259b53 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs @@ -0,0 +1,214 @@ +// 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; +using Azure.ResourceManager.Compute.Recommender.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Compute.Recommender +{ + /// + /// A class representing a ComputeRecommenderDiagnostic 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 GetComputeRecommenderDiagnostic method. + /// + public partial class ComputeRecommenderDiagnosticResource : ArmResource + { + private readonly ClientDiagnostics _spotPlacementScoresClientDiagnostics; + private readonly SpotPlacementScores _spotPlacementScoresRestClient; + private readonly ComputeRecommenderDiagnosticData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Compute/locations/placementScores"; + + /// Initializes a new instance of ComputeRecommenderDiagnosticResource for mocking. + protected ComputeRecommenderDiagnosticResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ComputeRecommenderDiagnosticResource(ArmClient client, ComputeRecommenderDiagnosticData 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 ComputeRecommenderDiagnosticResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string computeRecommenderDiagnosticApiVersion); + _spotPlacementScoresClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Compute.Recommender", ResourceType.Namespace, Diagnostics); + _spotPlacementScoresRestClient = new SpotPlacementScores(_spotPlacementScoresClientDiagnostics, Pipeline, Endpoint, computeRecommenderDiagnosticApiVersion ?? "2025-06-05"); + ValidateResourceId(id); + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + public virtual ComputeRecommenderDiagnosticData 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 location. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location) + { + string resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot"; + 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); + } + } + + /// Gets Spot Placement Scores metadata. + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _spotPlacementScoresRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(ComputeRecommenderDiagnosticData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new ComputeRecommenderDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets Spot Placement Scores metadata. + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _spotPlacementScoresRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(ComputeRecommenderDiagnosticData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new ComputeRecommenderDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Generates placement scores for Spot VM skus. + /// 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) + { + Argument.AssertNotNull(spotPlacementScoresInput, nameof(spotPlacementScoresInput)); + + using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Generate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(spotPlacementScoresInput), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(ComputeRecommenderGenerateResult.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Generates placement scores for Spot VM skus. + /// 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) + { + Argument.AssertNotNull(spotPlacementScoresInput, nameof(spotPlacementScoresInput)); + + using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Generate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(spotPlacementScoresInput), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(ComputeRecommenderGenerateResult.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/ComputeRecommenderExtensions.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/ComputeRecommenderExtensions.cs new file mode 100644 index 000000000000..51166f5f8c9d --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/ComputeRecommenderExtensions.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Compute.Recommender.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Compute.Recommender +{ + /// A class to add extension methods to Azure.ResourceManager.Compute.Recommender. + public static partial class ComputeRecommenderExtensions + { + /// + private static MockableComputeRecommenderArmClient GetMockableComputeRecommenderArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableComputeRecommenderArmClient(client0, ResourceIdentifier.Root)); + } + + /// + private static MockableComputeRecommenderSubscriptionResource GetMockableComputeRecommenderSubscriptionResource(SubscriptionResource subscriptionResource) + { + return subscriptionResource.GetCachedClient(client => new MockableComputeRecommenderSubscriptionResource(client, subscriptionResource.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. + /// is null. + /// Returns a object. + public static ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnosticResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeRecommenderArmClient(client).GetComputeRecommenderDiagnosticResource(id); + } + + /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// The the method will execute against. + /// is null. + /// Returns a object. + public static ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeRecommenderSubscriptionResource(subscriptionResource).GetComputeRecommenderDiagnostic(); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderArmClient.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderArmClient.cs new file mode 100644 index 000000000000..c2c8e95a6ead --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderArmClient.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Mocking +{ + /// A class to add extension methods to . + public partial class MockableComputeRecommenderArmClient : ArmResource + { + /// Initializes a new instance of MockableComputeRecommenderArmClient for mocking. + protected MockableComputeRecommenderArmClient() + { + } + + /// 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 MockableComputeRecommenderArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + /// 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 ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnosticResource(ResourceIdentifier id) + { + ComputeRecommenderDiagnosticResource.ValidateResourceId(id); + return new ComputeRecommenderDiagnosticResource(Client, id); + } + } +} 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 new file mode 100644 index 000000000000..110484d982e1 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Compute.Recommender; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Compute.Recommender.Mocking +{ + /// A class to add extension methods to . + public partial class MockableComputeRecommenderSubscriptionResource : ArmResource + { + /// Initializes a new instance of MockableComputeRecommenderSubscriptionResource for mocking. + protected MockableComputeRecommenderSubscriptionResource() + { + } + + /// 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 MockableComputeRecommenderSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// Returns a object. + public virtual ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic() + { + return new ComputeRecommenderDiagnosticResource(Client, Id.AppendProviderResource("Microsoft.Compute", "locations", "spot")); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Argument.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..c3f6f45a9382 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Argument.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal static partial class Argument + { + /// The value. + /// The name. + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + /// The value. + /// The name. + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + /// The value. + /// The name. + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + /// The value. + /// The name. + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..b1c419a2e208 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary + where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + /// The inner dictionary. + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + /// The inner dictionary. + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + /// 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 + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + /// Gets the Keys. + IEnumerable IReadOnlyDictionary.Keys => Keys; + + /// Gets the Values. + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// The item to add. + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + /// The item to search for. + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + /// The array to copy. + /// The index. + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + /// The item to remove. + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + 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) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + /// The key. + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + /// The key to search for. + /// The value. + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ChangeTrackingList.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..1c95c877e4f7 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,168 @@ +// 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.Linq; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal partial class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + /// The inner list. + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + /// The inner list. + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + /// 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 + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// The item to add. + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + /// The item. + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + /// The array to copy to. + /// The array index. + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + /// The item. + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + /// The item. + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + 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) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ClientPipelineExtensions.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ClientPipelineExtensions.cs new file mode 100644 index 000000000000..9b91b22bb109 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenMemberAttribute.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenMemberAttribute.cs new file mode 100644 index 000000000000..4a39ff11cae6 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + [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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenSerializationAttribute.cs new file mode 100644 index 000000000000..10fefc0e3d34 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + [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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenSuppressAttribute.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenSuppressAttribute.cs new file mode 100644 index 000000000000..5d16025a1cac --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + [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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenTypeAttribute.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/CodeGenTypeAttribute.cs new file mode 100644 index 000000000000..c2b4629a9f76 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + [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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ErrorResult.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ErrorResult.cs new file mode 100644 index 000000000000..35c64ceb19cb --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..8179175bbfb8 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,258 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal static partial class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions + { + MaxDepth = 256 + }; + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + Dictionary dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + List list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + string text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + 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"); + } + + public static string GetRequiredString(this JsonElement element) + { + 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}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Optional.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..6fa1bba815bc --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal static partial class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(string value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/RequestContextExtensions.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/RequestContextExtensions.cs new file mode 100644 index 000000000000..1016dbe51072 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/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.Compute.Recommender +{ + 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/TypeFormatters.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/TypeFormatters.cs new file mode 100644 index 000000000000..ae451eb43ccf --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/TypeFormatters.cs @@ -0,0 +1,153 @@ +// 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.Compute.Recommender +{ + 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 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..1eba7f2b5b98 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal partial class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + 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; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} 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 new file mode 100644 index 000000000000..890ad6b24aad --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/AzureResourceManagerComputeRecommenderContext.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using Azure.ResourceManager.Compute.Recommender.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Recommender +{ + /// + /// Context class which will be filled in by the System.ClientModel.SourceGeneration. + /// For more information + /// + [ModelReaderWriterBuildable(typeof(ComputeRecommenderDiagnosticData))] + [ModelReaderWriterBuildable(typeof(ComputeRecommenderDiagnosticProperties))] + [ModelReaderWriterBuildable(typeof(ComputeRecommenderDiagnosticResource))] + [ModelReaderWriterBuildable(typeof(ComputeRecommenderGenerateContent))] + [ModelReaderWriterBuildable(typeof(ComputeRecommenderGenerateResult))] + [ModelReaderWriterBuildable(typeof(ComputeRecommenderPlacementScore))] + [ModelReaderWriterBuildable(typeof(ComputeRecommenderResourceSize))] + [ModelReaderWriterBuildable(typeof(SystemData))] + public partial class AzureResourceManagerComputeRecommenderContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderDiagnosticProperties.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderDiagnosticProperties.Serialization.cs new file mode 100644 index 000000000000..ace62ceb7c39 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderDiagnosticProperties.Serialization.cs @@ -0,0 +1,167 @@ +// 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.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// Contains additional properties of a diagnostic. + internal partial class ComputeRecommenderDiagnosticProperties : 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(ComputeRecommenderDiagnosticProperties)} does not support writing '{format}' format."); + } + if (Optional.IsCollectionDefined(SupportedResourceTypes)) + { + writer.WritePropertyName("supportedResourceTypes"u8); + writer.WriteStartArray(); + foreach (string item in SupportedResourceTypes) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + 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. + ComputeRecommenderDiagnosticProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderDiagnosticProperties 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(ComputeRecommenderDiagnosticProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeRecommenderDiagnosticProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ComputeRecommenderDiagnosticProperties DeserializeComputeRecommenderDiagnosticProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList supportedResourceTypes = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("supportedResourceTypes"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()); + } + } + supportedResourceTypes = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ComputeRecommenderDiagnosticProperties(supportedResourceTypes ?? 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, AzureResourceManagerComputeRecommenderContext.Default); + default: + throw new FormatException($"The model {nameof(ComputeRecommenderDiagnosticProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + ComputeRecommenderDiagnosticProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderDiagnosticProperties 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 DeserializeComputeRecommenderDiagnosticProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeRecommenderDiagnosticProperties)} 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderDiagnosticProperties.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderDiagnosticProperties.cs new file mode 100644 index 000000000000..4a8cbd879ae4 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderDiagnosticProperties.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; +using Azure.ResourceManager.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// Contains additional properties of a diagnostic. + internal partial class ComputeRecommenderDiagnosticProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal ComputeRecommenderDiagnosticProperties() + { + SupportedResourceTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Describes what are the supported resource types for a diagnostic. + /// Keeps track of any properties unknown to the library. + internal ComputeRecommenderDiagnosticProperties(IList supportedResourceTypes, IDictionary additionalBinaryDataProperties) + { + SupportedResourceTypes = supportedResourceTypes; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Describes what are the supported resource types for a diagnostic. + public IList SupportedResourceTypes { get; } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateContent.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateContent.Serialization.cs new file mode 100644 index 000000000000..5313605376c8 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateContent.Serialization.cs @@ -0,0 +1,223 @@ +// 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.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// SpotPlacementScores API Input. + public partial class ComputeRecommenderGenerateContent : 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(ComputeRecommenderGenerateContent)} does not support writing '{format}' format."); + } + if (Optional.IsCollectionDefined(DesiredLocations)) + { + writer.WritePropertyName("desiredLocations"u8); + writer.WriteStartArray(); + foreach (AzureLocation item in DesiredLocations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DesiredSizes)) + { + writer.WritePropertyName("desiredSizes"u8); + writer.WriteStartArray(); + foreach (ComputeRecommenderResourceSize item in DesiredSizes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DesiredCount)) + { + writer.WritePropertyName("desiredCount"u8); + writer.WriteNumberValue(DesiredCount.Value); + } + if (Optional.IsDefined(AvailabilityZones)) + { + writer.WritePropertyName("availabilityZones"u8); + writer.WriteBooleanValue(AvailabilityZones.Value); + } + 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. + ComputeRecommenderGenerateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderGenerateContent 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(ComputeRecommenderGenerateContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeRecommenderGenerateContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ComputeRecommenderGenerateContent DeserializeComputeRecommenderGenerateContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList desiredLocations = default; + IList desiredSizes = default; + int? desiredCount = default; + bool? availabilityZones = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("desiredLocations"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new AzureLocation(item.GetString())); + } + desiredLocations = array; + continue; + } + if (prop.NameEquals("desiredSizes"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ComputeRecommenderResourceSize.DeserializeComputeRecommenderResourceSize(item, options)); + } + desiredSizes = array; + continue; + } + if (prop.NameEquals("desiredCount"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + desiredCount = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("availabilityZones"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityZones = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ComputeRecommenderGenerateContent(desiredLocations ?? new ChangeTrackingList(), desiredSizes ?? new ChangeTrackingList(), desiredCount, availabilityZones, 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, AzureResourceManagerComputeRecommenderContext.Default); + default: + throw new FormatException($"The model {nameof(ComputeRecommenderGenerateContent)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + ComputeRecommenderGenerateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderGenerateContent 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 DeserializeComputeRecommenderGenerateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeRecommenderGenerateContent)} 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(ComputeRecommenderGenerateContent computeRecommenderGenerateContent) + { + if (computeRecommenderGenerateContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(computeRecommenderGenerateContent, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateContent.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateContent.cs new file mode 100644 index 000000000000..941d50fe0918 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateContent.cs @@ -0,0 +1,55 @@ +// 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.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// SpotPlacementScores API Input. + public partial class ComputeRecommenderGenerateContent + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ComputeRecommenderGenerateContent() + { + DesiredLocations = new ChangeTrackingList(); + DesiredSizes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The desired regions. + /// The desired virtual machine SKU sizes. + /// Desired instance count per region/zone based on the scope. + /// Defines if the scope is zonal or regional. + /// Keeps track of any properties unknown to the library. + internal ComputeRecommenderGenerateContent(IList desiredLocations, IList desiredSizes, int? desiredCount, bool? availabilityZones, IDictionary additionalBinaryDataProperties) + { + DesiredLocations = desiredLocations; + DesiredSizes = desiredSizes; + DesiredCount = desiredCount; + AvailabilityZones = availabilityZones; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The desired regions. + public IList DesiredLocations { get; } + + /// The desired virtual machine SKU sizes. + public IList DesiredSizes { get; } + + /// Desired instance count per region/zone based on the scope. + public int? DesiredCount { get; set; } + + /// Defines if the scope is zonal or regional. + public bool? AvailabilityZones { get; set; } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateResult.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateResult.Serialization.cs new file mode 100644 index 000000000000..0c62e5f351a6 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateResult.Serialization.cs @@ -0,0 +1,251 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// SpotPlacementScores API response. + public partial class ComputeRecommenderGenerateResult : 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(ComputeRecommenderGenerateResult)} does not support writing '{format}' format."); + } + if (Optional.IsCollectionDefined(DesiredLocations)) + { + writer.WritePropertyName("desiredLocations"u8); + writer.WriteStartArray(); + foreach (AzureLocation item in DesiredLocations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DesiredSizes)) + { + writer.WritePropertyName("desiredSizes"u8); + writer.WriteStartArray(); + foreach (ComputeRecommenderResourceSize item in DesiredSizes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DesiredCount)) + { + writer.WritePropertyName("desiredCount"u8); + writer.WriteNumberValue(DesiredCount.Value); + } + if (Optional.IsDefined(AvailabilityZones)) + { + writer.WritePropertyName("availabilityZones"u8); + writer.WriteBooleanValue(AvailabilityZones.Value); + } + if (Optional.IsCollectionDefined(PlacementScores)) + { + writer.WritePropertyName("placementScores"u8); + writer.WriteStartArray(); + foreach (ComputeRecommenderPlacementScore item in PlacementScores) + { + 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. + ComputeRecommenderGenerateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderGenerateResult 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(ComputeRecommenderGenerateResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeRecommenderGenerateResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ComputeRecommenderGenerateResult DeserializeComputeRecommenderGenerateResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList desiredLocations = default; + IList desiredSizes = default; + int? desiredCount = default; + bool? availabilityZones = default; + IList placementScores = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("desiredLocations"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new AzureLocation(item.GetString())); + } + desiredLocations = array; + continue; + } + if (prop.NameEquals("desiredSizes"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ComputeRecommenderResourceSize.DeserializeComputeRecommenderResourceSize(item, options)); + } + desiredSizes = array; + continue; + } + if (prop.NameEquals("desiredCount"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + desiredCount = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("availabilityZones"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityZones = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("placementScores"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ComputeRecommenderPlacementScore.DeserializeComputeRecommenderPlacementScore(item, options)); + } + placementScores = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ComputeRecommenderGenerateResult( + desiredLocations ?? new ChangeTrackingList(), + desiredSizes ?? new ChangeTrackingList(), + desiredCount, + availabilityZones, + placementScores ?? 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, AzureResourceManagerComputeRecommenderContext.Default); + default: + throw new FormatException($"The model {nameof(ComputeRecommenderGenerateResult)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + ComputeRecommenderGenerateResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderGenerateResult 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 DeserializeComputeRecommenderGenerateResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeRecommenderGenerateResult)} 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 ComputeRecommenderGenerateResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeComputeRecommenderGenerateResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateResult.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateResult.cs new file mode 100644 index 000000000000..2eb19ef48243 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderGenerateResult.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 Azure.Core; +using Azure.ResourceManager.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// SpotPlacementScores API response. + public partial class ComputeRecommenderGenerateResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal ComputeRecommenderGenerateResult() + { + DesiredLocations = new ChangeTrackingList(); + DesiredSizes = new ChangeTrackingList(); + PlacementScores = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The desired regions. + /// The desired virtual machine SKU sizes. + /// Desired instance count per region/zone based on the scope. + /// Defines if the scope is zonal or regional. + /// A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + /// Keeps track of any properties unknown to the library. + internal ComputeRecommenderGenerateResult(IList desiredLocations, IList desiredSizes, int? desiredCount, bool? availabilityZones, IList placementScores, IDictionary additionalBinaryDataProperties) + { + DesiredLocations = desiredLocations; + DesiredSizes = desiredSizes; + DesiredCount = desiredCount; + AvailabilityZones = availabilityZones; + PlacementScores = placementScores; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The desired regions. + public IList DesiredLocations { get; } + + /// The desired virtual machine SKU sizes. + public IList DesiredSizes { get; } + + /// Desired instance count per region/zone based on the scope. + public int? DesiredCount { get; } + + /// Defines if the scope is zonal or regional. + public bool? AvailabilityZones { get; } + + /// A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + public IList PlacementScores { get; } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderPlacementScore.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderPlacementScore.Serialization.cs new file mode 100644 index 000000000000..2fdf73462cf3 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderPlacementScore.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.Json; +using Azure.Core; +using Azure.ResourceManager.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// The spot placement score for sku/region/zone combination. + public partial class ComputeRecommenderPlacementScore : 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(ComputeRecommenderPlacementScore)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteStringValue(Sku); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region.Value); + } + if (Optional.IsDefined(AvailabilityZone)) + { + writer.WritePropertyName("availabilityZone"u8); + writer.WriteStringValue(AvailabilityZone); + } + if (Optional.IsDefined(Score)) + { + writer.WritePropertyName("score"u8); + writer.WriteStringValue(Score); + } + if (Optional.IsDefined(IsQuotaAvailable)) + { + writer.WritePropertyName("isQuotaAvailable"u8); + writer.WriteBooleanValue(IsQuotaAvailable.Value); + } + 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. + ComputeRecommenderPlacementScore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderPlacementScore 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(ComputeRecommenderPlacementScore)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeRecommenderPlacementScore(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ComputeRecommenderPlacementScore DeserializeComputeRecommenderPlacementScore(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sku = default; + AzureLocation? region = default; + string availabilityZone = default; + string score = default; + bool? isQuotaAvailable = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("sku"u8)) + { + sku = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("region"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + region = new AzureLocation(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("availabilityZone"u8)) + { + availabilityZone = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("score"u8)) + { + score = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("isQuotaAvailable"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isQuotaAvailable = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ComputeRecommenderPlacementScore( + sku, + region, + availabilityZone, + score, + isQuotaAvailable, + 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, AzureResourceManagerComputeRecommenderContext.Default); + default: + throw new FormatException($"The model {nameof(ComputeRecommenderPlacementScore)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + ComputeRecommenderPlacementScore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderPlacementScore 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 DeserializeComputeRecommenderPlacementScore(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeRecommenderPlacementScore)} 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderPlacementScore.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderPlacementScore.cs new file mode 100644 index 000000000000..c6d9234be247 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderPlacementScore.cs @@ -0,0 +1,57 @@ +// 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.Compute.Recommender.Models +{ + /// The spot placement score for sku/region/zone combination. + public partial class ComputeRecommenderPlacementScore + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal ComputeRecommenderPlacementScore() + { + } + + /// Initializes a new instance of . + /// The resource's CRP virtual machine SKU size. + /// The region. + /// The availability zone. + /// A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + /// Whether the desired quota is available. + /// Keeps track of any properties unknown to the library. + internal ComputeRecommenderPlacementScore(string sku, AzureLocation? region, string availabilityZone, string score, bool? isQuotaAvailable, IDictionary additionalBinaryDataProperties) + { + Sku = sku; + Region = region; + AvailabilityZone = availabilityZone; + Score = score; + IsQuotaAvailable = isQuotaAvailable; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The resource's CRP virtual machine SKU size. + public string Sku { get; } + + /// The region. + public AzureLocation? Region { get; } + + /// The availability zone. + public string AvailabilityZone { get; } + + /// A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + public string Score { get; } + + /// Whether the desired quota is available. + public bool? IsQuotaAvailable { get; } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderResourceSize.Serialization.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderResourceSize.Serialization.cs new file mode 100644 index 000000000000..bb375289c96b --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderResourceSize.Serialization.cs @@ -0,0 +1,141 @@ +// 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.Compute.Recommender; + +namespace Azure.ResourceManager.Compute.Recommender.Models +{ + /// SpotPlacementRecommender API response. + public partial class ComputeRecommenderResourceSize : 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(ComputeRecommenderResourceSize)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteStringValue(Sku); + } + 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. + ComputeRecommenderResourceSize IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderResourceSize 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(ComputeRecommenderResourceSize)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeRecommenderResourceSize(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ComputeRecommenderResourceSize DeserializeComputeRecommenderResourceSize(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sku = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("sku"u8)) + { + sku = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ComputeRecommenderResourceSize(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, AzureResourceManagerComputeRecommenderContext.Default); + default: + throw new FormatException($"The model {nameof(ComputeRecommenderResourceSize)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + ComputeRecommenderResourceSize IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ComputeRecommenderResourceSize 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 DeserializeComputeRecommenderResourceSize(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeRecommenderResourceSize)} 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/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderResourceSize.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderResourceSize.cs new file mode 100644 index 000000000000..50d98e517454 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/ComputeRecommenderResourceSize.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.Compute.Recommender.Models +{ + /// SpotPlacementRecommender API response. + public partial class ComputeRecommenderResourceSize + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ComputeRecommenderResourceSize() + { + } + + /// Initializes a new instance of . + /// The resource's CRP virtual machine SKU size. + /// Keeps track of any properties unknown to the library. + internal ComputeRecommenderResourceSize(string sku, IDictionary additionalBinaryDataProperties) + { + Sku = sku; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The resource's CRP virtual machine SKU size. + public string Sku { get; set; } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/RestOperations/SpotPlacementScoresRestOperations.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/RestOperations/SpotPlacementScoresRestOperations.cs new file mode 100644 index 000000000000..c42eebd32adc --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/RestOperations/SpotPlacementScoresRestOperations.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Compute.Recommender +{ + internal partial class SpotPlacementScores + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SpotPlacementScores for mocking. + protected SpotPlacementScores() + { + } + + /// Initializes a new instance of SpotPlacementScores. + /// 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 SpotPlacementScores(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateGetRequest(Guid subscriptionId, AzureLocation location, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId.ToString(), true); + uri.AppendPath("/providers/Microsoft.Compute/locations/", false); + uri.AppendPath(location.ToString(), true); + uri.AppendPath("/placementScores/spot", false); + uri.AppendQuery("api-version", _apiVersion, true); + 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 CreateGenerateRequest(Guid subscriptionId, AzureLocation location, RequestContent content, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId.ToString(), true); + uri.AppendPath("/providers/Microsoft.Compute/locations/", false); + uri.AppendPath(location.ToString(), true); + uri.AppendPath("/placementScores/spot/generate", false); + uri.AppendQuery("api-version", _apiVersion, true); + 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; + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Properties/AssemblyInfo.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..bf77bf459282 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.Compute.Recommender.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namespace 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.Compute")] diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/Azure.ResourceManager.Compute.Recommender.Tests.csproj b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/Azure.ResourceManager.Compute.Recommender.Tests.csproj new file mode 100644 index 000000000000..6c817b0bcb5b --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/Azure.ResourceManager.Compute.Recommender.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/ComputeRecommenderManagementTestBase.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/ComputeRecommenderManagementTestBase.cs new file mode 100644 index 000000000000..29741ccf344d --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/ComputeRecommenderManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Compute.Recommender.Tests +{ + public class ComputeRecommenderManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected ComputeRecommenderManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ComputeRecommenderManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/ComputeRecommenderManagementTestEnvironment.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/ComputeRecommenderManagementTestEnvironment.cs new file mode 100644 index 000000000000..2530eabf9c68 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tests/ComputeRecommenderManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Compute.Recommender.Tests +{ + public class ComputeRecommenderManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tsp-location.yaml b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tsp-location.yaml new file mode 100644 index 000000000000..284e53e598d9 --- /dev/null +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/compute/resource-manager/Microsoft.Compute/RecommenderRP +commit: a61de433bd587bd7e9b65b7c95d6651f9f39e350 +repo: Azure/azure-rest-api-specs +additionalDirectories: +emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" diff --git a/sdk/computerecommender/ci.mgmt.yml b/sdk/computerecommender/ci.mgmt.yml new file mode 100644 index 000000000000..d855ed490a68 --- /dev/null +++ b/sdk/computerecommender/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/computerecommender/ci.mgmt.yml + - sdk/computerecommender/Azure.ResourceManager.Compute.Recommender + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: computerecommender + Artifacts: + - name: Azure.ResourceManager.Compute.Recommender + safeName: AzureResourceManagerComputeRecommender + CheckAOTCompat: true + AOTTestInputs: + - ArtifactName: Azure.ResourceManager.Compute.Recommender + ExpectedWarningsFilepath: None diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/CHANGELOG.md b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/CHANGELOG.md index 6f4be06a9baf..9a9ab33a4966 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/CHANGELOG.md +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,22 @@ ### Other Changes +## 1.2.0-beta.1 (2025-09-12) + +### Features Added + +- Updated the Computeschedule RP api-version from `2025-05-01` to the preview version `2025-04-15-preview`. + - New endpoints were added for the recurring scheduledactions feature which will allow customers to create recurring scheduledactions to perform actions on their virtual machines. These actions include: + - Creating and deleting of recurring starts, deallocates and hibernates on virtual machines. + - Attaching and detaching virtual machines from recurring scheduledactions. + - Cancelling and delaying scheduled/unscheduled occurrences of start/deallocate/hibernates on attached virtual machines attached to recurring scheduledactions. + +## 1.1.0 (2025-09-12) + +### Features Added + +- Updated the Computeschedule RP api-version from `2024-10-01` to the stable version `2025-05-01`. + ## 1.0.0 (2025-01-24) ### Features Added diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.net8.0.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.net8.0.cs index 1fc9b3ac9ce0..1da10c510f0d 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.net8.0.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.net8.0.cs @@ -8,48 +8,277 @@ internal AzureResourceManagerComputeScheduleContext() { } } public static partial class ComputeScheduleExtensions { + public static Azure.Response CancelVirtualMachineOperations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response CancelVirtualMachineOperations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineCreateOperation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineCreateOperationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response ExecuteVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineDeleteOperation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineDeleteOperationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response ExecuteVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response ExecuteVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetAssociatedOccurrences(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAssociatedOccurrencesAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetAssociatedScheduledActions(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAssociatedScheduledActionsAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetScheduledAction(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetScheduledActionAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceResource GetScheduledActionOccurrenceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionResource GetScheduledActionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionCollection GetScheduledActions(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetScheduledActions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetScheduledActionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetVirtualMachineOperationErrors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response GetVirtualMachineOperationErrors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetVirtualMachineOperationStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response GetVirtualMachineOperationStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response SubmitVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response SubmitVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response SubmitVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response SubmitVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response SubmitVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response SubmitVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ScheduledActionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ScheduledActionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string scheduledActionName, Azure.ResourceManager.ComputeSchedule.ScheduledActionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string scheduledActionName, Azure.ResourceManager.ComputeSchedule.ScheduledActionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string scheduledActionName, 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 scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduledActionName, 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 ScheduledActionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.ScheduledActionData 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.ComputeSchedule.ScheduledActionData 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 ScheduledActionOccurrenceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ScheduledActionOccurrenceCollection() { } + public virtual Azure.Response Exists(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string occurrenceId, 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 occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string occurrenceId, 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 ScheduledActionOccurrenceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionOccurrenceData() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData 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.ComputeSchedule.ScheduledActionOccurrenceData 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 ScheduledActionOccurrenceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ScheduledActionOccurrenceResource() { } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Cancel(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelAsync(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delay(Azure.WaitUntil waitUntil, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceDelayContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DelayAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceDelayContent 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; } + public virtual Azure.Pageable GetAttachedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAttachedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData 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.ComputeSchedule.ScheduledActionOccurrenceData 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 ScheduledActionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ScheduledActionResource() { } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionData 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.Response AttachResources(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceAttachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AttachResourcesAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceAttachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CancelNextOccurrence(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelNextOccurrenceAsync(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scheduledActionName) { 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 DetachResources(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceDetachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DetachResourcesAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceDetachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Disable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Enable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableAsync(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.Pageable GetAttachedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAttachedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetScheduledActionOccurrence(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetScheduledActionOccurrenceAsync(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceCollection GetScheduledActionOccurrences() { throw null; } + public virtual Azure.Response PatchResources(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourcePatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PatchResourcesAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourcePatchContent 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; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ComputeSchedule.ScheduledActionData 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.ComputeSchedule.ScheduledActionData 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.Response TriggerManualOccurrence(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TriggerManualOccurrenceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.ComputeSchedule.Mocking { + public partial class MockableComputeScheduleArmClient : Azure.ResourceManager.ArmResource + { + protected MockableComputeScheduleArmClient() { } + public virtual Azure.Pageable GetAssociatedOccurrences(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssociatedOccurrencesAsync(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAssociatedScheduledActions(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssociatedScheduledActionsAsync(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceResource GetScheduledActionOccurrenceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionResource GetScheduledActionResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableComputeScheduleResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableComputeScheduleResourceGroupResource() { } + public virtual Azure.Response GetScheduledAction(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetScheduledActionAsync(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionCollection GetScheduledActions() { throw null; } + } public partial class MockableComputeScheduleSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableComputeScheduleSubscriptionResource() { } + public virtual Azure.Response CancelVirtualMachineOperations(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response CancelVirtualMachineOperations(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineCreateOperation(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineCreateOperationAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineDeallocate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response ExecuteVirtualMachineDeallocate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineDeleteOperation(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineDeleteOperationAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineHibernate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response ExecuteVirtualMachineHibernate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineStart(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response ExecuteVirtualMachineStart(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetScheduledActions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetScheduledActionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetVirtualMachineOperationErrors(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response GetVirtualMachineOperationErrors(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetVirtualMachineOperationStatus(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response GetVirtualMachineOperationStatus(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SubmitVirtualMachineDeallocate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SubmitVirtualMachineDeallocate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SubmitVirtualMachineHibernate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SubmitVirtualMachineHibernate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SubmitVirtualMachineStart(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SubmitVirtualMachineStart(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } @@ -58,15 +287,34 @@ namespace Azure.ResourceManager.ComputeSchedule.Models public static partial class ArmComputeScheduleModelFactory { public static Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsResult CancelOperationsResult(System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.CreateResourceOperationResult CreateResourceOperationResult(string description = null, string type = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.DeallocateResourceOperationResult DeallocateResourceOperationResult(string description = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.DeleteResourceOperationResult DeleteResourceOperationResult(string description = null, string type = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent ExecuteCreateContent(Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload resourceConfigParameters = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters = null, string correlationId = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent ExecuteDeleteContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters = null, System.Collections.Generic.IEnumerable resourcesIds = null, string correlationId = null, bool? isForceDeletion = default(bool?)) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsResult GetOperationErrorsResult(System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusResult GetOperationStatusResult(System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.HibernateResourceOperationResult HibernateResourceOperationResult(string description = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties OccurrenceExtensionProperties(Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable notificationSettings = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState?), Azure.ResponseError errorDetails = null, Azure.Core.ResourceIdentifier scheduledActionId = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionResourceData OccurrenceExtensionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceData OccurrenceResourceData(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 resourceId = null, System.Collections.Generic.IEnumerable notificationSettings = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState?), Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary OccurrenceResultSummary(int total = 0, System.Collections.Generic.IEnumerable statuses = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.OperationErrorDetails OperationErrorDetails(string errorCode = null, string errorDetails = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), System.DateTimeOffset? errorDetailsTimestamp = default(System.DateTimeOffset?), string azureOperationName = null, string crpOperationId = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.OperationErrorsResult OperationErrorsResult(string operationId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? activationOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operationErrors = null, string requestErrorCode = null, string requestErrorDetails = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationDetails ResourceOperationDetails(string operationId = null, Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType? opType = default(Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType?), string subscriptionId = null, System.DateTimeOffset? deadline = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType? deadlineType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOperationState? state = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOperationState?), string timezone = null, string operationTimezone = null, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationError resourceOperationError = null, System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.UserRequestRetryPolicy retryPolicy = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationError ResourceOperationError(string errorCode = null, string errorDetails = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationResult ResourceOperationResult(Azure.Core.ResourceIdentifier resourceId = null, string errorCode = null, string errorDetails = null, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationDetails operation = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload ResourceProvisionPayload(System.Collections.Generic.IDictionary baseProfile = null, System.Collections.Generic.IEnumerable> resourceOverrides = null, int resourceCount = 0, string resourcePrefix = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ResourceResultSummary ResourceResultSummary(string code = null, int count = 0, Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionData ScheduledActionData(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.ComputeSchedule.Models.ScheduledActionProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData ScheduledActionOccurrenceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties ScheduledActionOccurrenceProperties(System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary resultSummary = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState?)) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionProperties ScheduledActionProperties(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType resourceType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType actionType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType), System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule schedule = null, System.Collections.Generic.IEnumerable notificationSettings = null, bool? disabled = default(bool?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceData ScheduledActionResourceData(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 resourceId = null, System.Collections.Generic.IEnumerable notificationSettings = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationResult ScheduledActionResourceOperationResult(int totalResources = 0, System.Collections.Generic.IEnumerable resourcesStatuses = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResources ScheduledActionResources(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceStatus ScheduledActionResourceStatus(Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus status = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties ScheduledActionsExtensionProperties(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType resourceType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType actionType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType), System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule schedule = null, System.Collections.Generic.IEnumerable notificationSettings = null, bool? disabled = default(bool?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState?), System.Collections.Generic.IEnumerable resourceNotificationSettings = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.StartResourceOperationResult StartResourceOperationResult(string description = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.UserRequestSchedule UserRequestSchedule(System.DateTimeOffset? deadline = default(System.DateTimeOffset?), System.DateTimeOffset? userRequestDeadline = default(System.DateTimeOffset?), string timezone = null, string userRequestTimezone = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType deadlineType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType)) { throw null; } } @@ -93,6 +341,20 @@ 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 CreateResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CreateResourceOperationResult() { } + public string Description { get { throw null; } } + public Azure.Core.AzureLocation Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.CreateResourceOperationResult 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.ComputeSchedule.Models.CreateResourceOperationResult 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 DeallocateResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DeallocateResourceOperationResult() { } @@ -107,6 +369,33 @@ 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 DeleteResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeleteResourceOperationResult() { } + public string Description { get { throw null; } } + public Azure.Core.AzureLocation Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.DeleteResourceOperationResult 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.ComputeSchedule.Models.DeleteResourceOperationResult 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 ExecuteCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExecuteCreateContent(Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload resourceConfigParameters, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters) { } + public string CorrelationId { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload ResourceConfigParameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent 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.ComputeSchedule.Models.ExecuteCreateContent 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 ExecuteDeallocateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExecuteDeallocateContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters, Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources resources, string correlationId) { } @@ -120,6 +409,20 @@ 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 ExecuteDeleteContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExecuteDeleteContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters, Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources resources) { } + public string CorrelationId { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } + public bool? IsForceDeletion { get { throw null; } set { } } + public System.Collections.Generic.IList ResourcesIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent 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.ComputeSchedule.Models.ExecuteDeleteContent 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 ExecuteHibernateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExecuteHibernateContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters, Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources resources, string correlationId) { } @@ -205,6 +508,150 @@ 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 NotificationLanguage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NotificationLanguage(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage EnUs { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage 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.ComputeSchedule.Models.NotificationLanguage left, Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage left, Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NotificationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NotificationSettings(string destination, Azure.ResourceManager.ComputeSchedule.Models.NotificationType type, Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage language) { } + public string Destination { get { throw null; } set { } } + public bool? IsDisabled { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage Language { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.NotificationType Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.NotificationSettings 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.ComputeSchedule.Models.NotificationSettings 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 NotificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NotificationType(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.NotificationType Email { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.NotificationType 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.ComputeSchedule.Models.NotificationType left, Azure.ResourceManager.ComputeSchedule.Models.NotificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.NotificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.NotificationType left, Azure.ResourceManager.ComputeSchedule.Models.NotificationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OccurrenceCancelContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OccurrenceCancelContent(System.Collections.Generic.IEnumerable resourceIds) { } + public System.Collections.Generic.IList ResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent 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.ComputeSchedule.Models.OccurrenceCancelContent 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 OccurrenceDelayContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OccurrenceDelayContent(System.DateTimeOffset delay, System.Collections.Generic.IEnumerable resourceIds) { } + public System.DateTimeOffset Delay { get { throw null; } } + public System.Collections.Generic.IList ResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceDelayContent 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.ComputeSchedule.Models.OccurrenceDelayContent 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 OccurrenceExtensionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceExtensionProperties() { } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier ScheduledActionId { get { throw null; } } + public System.DateTimeOffset ScheduledOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties 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.ComputeSchedule.Models.OccurrenceExtensionProperties 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 OccurrenceExtensionResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceExtensionResourceData() { } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionResourceData 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.ComputeSchedule.Models.OccurrenceExtensionResourceData 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 OccurrenceResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceResourceData() { } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public System.DateTimeOffset ScheduledOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceData 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.ComputeSchedule.Models.OccurrenceResourceData 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 OccurrenceResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OccurrenceResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState 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.ComputeSchedule.Models.OccurrenceResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OccurrenceResultSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceResultSummary() { } + public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + public int Total { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary 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.ComputeSchedule.Models.OccurrenceResultSummary 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 OperationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationErrorDetails() { } @@ -306,6 +753,33 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType left, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceProvisionPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceProvisionPayload(int resourceCount) { } + public System.Collections.Generic.IDictionary BaseProfile { get { throw null; } } + public int ResourceCount { get { throw null; } } + public System.Collections.Generic.IList> ResourceOverrides { get { throw null; } } + public string ResourcePrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload 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.ComputeSchedule.Models.ResourceProvisionPayload 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 ResourceResultSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResourceResultSummary() { } + public string Code { get { throw null; } } + public int Count { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ResourceResultSummary 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.ComputeSchedule.Models.ResourceResultSummary 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 ScheduledActionDeadlineType : System.IEquatable { @@ -337,6 +811,42 @@ 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 ScheduledActionOccurrenceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionOccurrenceProperties() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary ResultSummary { get { throw null; } } + public System.DateTimeOffset ScheduledOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties 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.ComputeSchedule.Models.ScheduledActionOccurrenceProperties 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 ScheduledActionOccurrenceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionOccurrenceState(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Canceled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Cancelling { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Created { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Rescheduling { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Scheduled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState 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.ComputeSchedule.Models.ScheduledActionOccurrenceState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ScheduledActionOperationState : System.IEquatable { @@ -381,6 +891,298 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOptimizationPreference left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOptimizationPreference right) { throw null; } public override string ToString() { throw null; } } + public partial class ScheduledActionPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionPatch() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatchProperties Properties { 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) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatch 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.ComputeSchedule.Models.ScheduledActionPatch 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 ScheduledActionPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionPatchProperties() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType? ActionType { get { throw null; } set { } } + public bool? Disabled { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public System.Collections.Generic.IList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType? ResourceType { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule Schedule { get { throw null; } set { } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatchProperties 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.ComputeSchedule.Models.ScheduledActionPatchProperties 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 ScheduledActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionProperties(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType resourceType, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType actionType, System.DateTimeOffset startOn, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule schedule, System.Collections.Generic.IEnumerable notificationSettings) { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType ActionType { get { throw null; } set { } } + public bool? Disabled { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public System.Collections.Generic.IList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType ResourceType { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule Schedule { get { throw null; } set { } } + public System.DateTimeOffset StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionProperties 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.ComputeSchedule.Models.ScheduledActionProperties 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 ScheduledActionResourceAttachContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourceAttachContent(System.Collections.Generic.IEnumerable resources) { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceAttachContent 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.ComputeSchedule.Models.ScheduledActionResourceAttachContent 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 ScheduledActionResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourceData(Azure.Core.ResourceIdentifier resourceId) { } + public System.Collections.Generic.IList NotificationSettings { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceData 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.ComputeSchedule.Models.ScheduledActionResourceData 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 ScheduledActionResourceDetachContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourceDetachContent(System.Collections.Generic.IEnumerable resources) { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceDetachContent 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.ComputeSchedule.Models.ScheduledActionResourceDetachContent 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 ScheduledActionResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionResourceOperationResult() { } + public System.Collections.Generic.IReadOnlyList ResourcesStatuses { get { throw null; } } + public int TotalResources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationResult 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.ComputeSchedule.Models.ScheduledActionResourceOperationResult 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 ScheduledActionResourceOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionResourceOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus 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.ComputeSchedule.Models.ScheduledActionResourceOperationStatus left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ScheduledActionResourcePatchContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourcePatchContent(System.Collections.Generic.IEnumerable resources) { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourcePatchContent 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.ComputeSchedule.Models.ScheduledActionResourcePatchContent 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 ScheduledActionResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState 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.ComputeSchedule.Models.ScheduledActionResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ScheduledActionResources : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionResources() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResources 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.ComputeSchedule.Models.ScheduledActionResources 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 ScheduledActionResourceStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionResourceStatus() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceStatus 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.ComputeSchedule.Models.ScheduledActionResourceStatus 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 ScheduledActionResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionResourceType(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType VirtualMachine { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType VirtualMachineScaleSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType 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.ComputeSchedule.Models.ScheduledActionResourceType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ScheduledActionsExtensionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionsExtensionProperties() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType ActionType { get { throw null; } } + public bool? Disabled { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceNotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType ResourceType { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule Schedule { get { throw null; } } + public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties 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.ComputeSchedule.Models.ScheduledActionsExtensionProperties 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 ScheduledActionsSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionsSchedule(System.TimeSpan scheduledTime, string timeZone, System.Collections.Generic.IEnumerable requestedWeekDays, System.Collections.Generic.IEnumerable requestedMonths, System.Collections.Generic.IEnumerable requestedDaysOfTheMonth) { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType? DeadlineType { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } set { } } + public System.Collections.Generic.IList RequestedDaysOfTheMonth { get { throw null; } } + public System.Collections.Generic.IList RequestedMonths { get { throw null; } } + public System.Collections.Generic.IList RequestedWeekDays { get { throw null; } } + public System.TimeSpan ScheduledTime { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule 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.ComputeSchedule.Models.ScheduledActionsSchedule 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 ScheduledActionsScheduleMonth : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionsScheduleMonth(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth All { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth April { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth August { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth December { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth February { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth January { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth July { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth June { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth March { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth May { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth November { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth October { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth September { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth 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.ComputeSchedule.Models.ScheduledActionsScheduleMonth left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ScheduledActionsScheduleWeekDay : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionsScheduleWeekDay(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay All { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Friday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Monday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Saturday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Sunday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Thursday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Tuesday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay 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.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ScheduledActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionType(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType Deallocate { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType Hibernate { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType Start { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType 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.ComputeSchedule.Models.ScheduledActionType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class StartResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StartResourceOperationResult() { } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs index 1fc9b3ac9ce0..1da10c510f0d 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/api/Azure.ResourceManager.ComputeSchedule.netstandard2.0.cs @@ -8,48 +8,277 @@ internal AzureResourceManagerComputeScheduleContext() { } } public static partial class ComputeScheduleExtensions { + public static Azure.Response CancelVirtualMachineOperations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response CancelVirtualMachineOperations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineCreateOperation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineCreateOperationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response ExecuteVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineDeleteOperation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineDeleteOperationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response ExecuteVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ExecuteVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response ExecuteVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetAssociatedOccurrences(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAssociatedOccurrencesAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetAssociatedScheduledActions(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAssociatedScheduledActionsAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetScheduledAction(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetScheduledActionAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceResource GetScheduledActionOccurrenceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionResource GetScheduledActionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionCollection GetScheduledActions(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetScheduledActions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetScheduledActionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetVirtualMachineOperationErrors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response GetVirtualMachineOperationErrors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetVirtualMachineOperationStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response GetVirtualMachineOperationStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response SubmitVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response SubmitVirtualMachineDeallocate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response SubmitVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response SubmitVirtualMachineHibernate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response SubmitVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Response SubmitVirtualMachineStart(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ScheduledActionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ScheduledActionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string scheduledActionName, Azure.ResourceManager.ComputeSchedule.ScheduledActionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string scheduledActionName, Azure.ResourceManager.ComputeSchedule.ScheduledActionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string scheduledActionName, 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 scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string scheduledActionName, 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 ScheduledActionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.ScheduledActionData 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.ComputeSchedule.ScheduledActionData 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 ScheduledActionOccurrenceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ScheduledActionOccurrenceCollection() { } + public virtual Azure.Response Exists(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string occurrenceId, 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 occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string occurrenceId, 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 ScheduledActionOccurrenceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionOccurrenceData() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData 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.ComputeSchedule.ScheduledActionOccurrenceData 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 ScheduledActionOccurrenceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ScheduledActionOccurrenceResource() { } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Cancel(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelAsync(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delay(Azure.WaitUntil waitUntil, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceDelayContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DelayAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceDelayContent 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; } + public virtual Azure.Pageable GetAttachedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAttachedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData 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.ComputeSchedule.ScheduledActionOccurrenceData 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 ScheduledActionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ScheduledActionResource() { } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionData 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.Response AttachResources(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceAttachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AttachResourcesAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceAttachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CancelNextOccurrence(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelNextOccurrenceAsync(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scheduledActionName) { 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 DetachResources(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceDetachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DetachResourcesAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceDetachContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Disable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Enable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableAsync(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.Pageable GetAttachedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAttachedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetScheduledActionOccurrence(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetScheduledActionOccurrenceAsync(string occurrenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceCollection GetScheduledActionOccurrences() { throw null; } + public virtual Azure.Response PatchResources(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourcePatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PatchResourcesAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourcePatchContent 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; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ComputeSchedule.ScheduledActionData 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.ComputeSchedule.ScheduledActionData 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.Response TriggerManualOccurrence(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TriggerManualOccurrenceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.ComputeSchedule.Mocking { + public partial class MockableComputeScheduleArmClient : Azure.ResourceManager.ArmResource + { + protected MockableComputeScheduleArmClient() { } + public virtual Azure.Pageable GetAssociatedOccurrences(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssociatedOccurrencesAsync(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAssociatedScheduledActions(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssociatedScheduledActionsAsync(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceResource GetScheduledActionOccurrenceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionResource GetScheduledActionResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableComputeScheduleResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableComputeScheduleResourceGroupResource() { } + public virtual Azure.Response GetScheduledAction(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetScheduledActionAsync(string scheduledActionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ComputeSchedule.ScheduledActionCollection GetScheduledActions() { throw null; } + } public partial class MockableComputeScheduleSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableComputeScheduleSubscriptionResource() { } + public virtual Azure.Response CancelVirtualMachineOperations(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response CancelVirtualMachineOperations(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> CancelVirtualMachineOperationsAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineCreateOperation(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineCreateOperationAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineDeallocate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response ExecuteVirtualMachineDeallocate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineDeallocateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineDeleteOperation(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineDeleteOperationAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineHibernate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response ExecuteVirtualMachineHibernate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineHibernateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteVirtualMachineStart(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response ExecuteVirtualMachineStart(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ExecuteVirtualMachineStartAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.ExecuteStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetScheduledActions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetScheduledActionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetVirtualMachineOperationErrors(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response GetVirtualMachineOperationErrors(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationErrorsAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetVirtualMachineOperationStatus(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response GetVirtualMachineOperationStatus(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> GetVirtualMachineOperationStatusAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SubmitVirtualMachineDeallocate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SubmitVirtualMachineDeallocate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> SubmitVirtualMachineDeallocateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitDeallocateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SubmitVirtualMachineHibernate(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SubmitVirtualMachineHibernate(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> SubmitVirtualMachineHibernateAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitHibernateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SubmitVirtualMachineStart(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SubmitVirtualMachineStart(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(Azure.Core.AzureLocation locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> SubmitVirtualMachineStartAsync(string locationparameter, Azure.ResourceManager.ComputeSchedule.Models.SubmitStartContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } @@ -58,15 +287,34 @@ namespace Azure.ResourceManager.ComputeSchedule.Models public static partial class ArmComputeScheduleModelFactory { public static Azure.ResourceManager.ComputeSchedule.Models.CancelOperationsResult CancelOperationsResult(System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.CreateResourceOperationResult CreateResourceOperationResult(string description = null, string type = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.DeallocateResourceOperationResult DeallocateResourceOperationResult(string description = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.DeleteResourceOperationResult DeleteResourceOperationResult(string description = null, string type = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent ExecuteCreateContent(Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload resourceConfigParameters = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters = null, string correlationId = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent ExecuteDeleteContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters = null, System.Collections.Generic.IEnumerable resourcesIds = null, string correlationId = null, bool? isForceDeletion = default(bool?)) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.GetOperationErrorsResult GetOperationErrorsResult(System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.GetOperationStatusResult GetOperationStatusResult(System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.HibernateResourceOperationResult HibernateResourceOperationResult(string description = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties OccurrenceExtensionProperties(Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable notificationSettings = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState?), Azure.ResponseError errorDetails = null, Azure.Core.ResourceIdentifier scheduledActionId = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionResourceData OccurrenceExtensionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceData OccurrenceResourceData(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 resourceId = null, System.Collections.Generic.IEnumerable notificationSettings = null, System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState?), Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary OccurrenceResultSummary(int total = 0, System.Collections.Generic.IEnumerable statuses = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.OperationErrorDetails OperationErrorDetails(string errorCode = null, string errorDetails = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), System.DateTimeOffset? errorDetailsTimestamp = default(System.DateTimeOffset?), string azureOperationName = null, string crpOperationId = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.OperationErrorsResult OperationErrorsResult(string operationId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? activationOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operationErrors = null, string requestErrorCode = null, string requestErrorDetails = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationDetails ResourceOperationDetails(string operationId = null, Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType? opType = default(Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType?), string subscriptionId = null, System.DateTimeOffset? deadline = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType? deadlineType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOperationState? state = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOperationState?), string timezone = null, string operationTimezone = null, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationError resourceOperationError = null, System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.UserRequestRetryPolicy retryPolicy = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationError ResourceOperationError(string errorCode = null, string errorDetails = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationResult ResourceOperationResult(Azure.Core.ResourceIdentifier resourceId = null, string errorCode = null, string errorDetails = null, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationDetails operation = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload ResourceProvisionPayload(System.Collections.Generic.IDictionary baseProfile = null, System.Collections.Generic.IEnumerable> resourceOverrides = null, int resourceCount = 0, string resourcePrefix = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ResourceResultSummary ResourceResultSummary(string code = null, int count = 0, Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionData ScheduledActionData(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.ComputeSchedule.Models.ScheduledActionProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.ScheduledActionOccurrenceData ScheduledActionOccurrenceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties ScheduledActionOccurrenceProperties(System.DateTimeOffset scheduledOn = default(System.DateTimeOffset), Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary resultSummary = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState?)) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionProperties ScheduledActionProperties(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType resourceType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType actionType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType), System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule schedule = null, System.Collections.Generic.IEnumerable notificationSettings = null, bool? disabled = default(bool?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceData ScheduledActionResourceData(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 resourceId = null, System.Collections.Generic.IEnumerable notificationSettings = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationResult ScheduledActionResourceOperationResult(int totalResources = 0, System.Collections.Generic.IEnumerable resourcesStatuses = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResources ScheduledActionResources(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceStatus ScheduledActionResourceStatus(Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus status = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus), Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties ScheduledActionsExtensionProperties(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType resourceType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType actionType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType), System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule schedule = null, System.Collections.Generic.IEnumerable notificationSettings = null, bool? disabled = default(bool?), Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState?), System.Collections.Generic.IEnumerable resourceNotificationSettings = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.StartResourceOperationResult StartResourceOperationResult(string description = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable results = null) { throw null; } public static Azure.ResourceManager.ComputeSchedule.Models.UserRequestSchedule UserRequestSchedule(System.DateTimeOffset? deadline = default(System.DateTimeOffset?), System.DateTimeOffset? userRequestDeadline = default(System.DateTimeOffset?), string timezone = null, string userRequestTimezone = null, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType deadlineType = default(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType)) { throw null; } } @@ -93,6 +341,20 @@ 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 CreateResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CreateResourceOperationResult() { } + public string Description { get { throw null; } } + public Azure.Core.AzureLocation Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.CreateResourceOperationResult 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.ComputeSchedule.Models.CreateResourceOperationResult 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 DeallocateResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DeallocateResourceOperationResult() { } @@ -107,6 +369,33 @@ 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 DeleteResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeleteResourceOperationResult() { } + public string Description { get { throw null; } } + public Azure.Core.AzureLocation Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.DeleteResourceOperationResult 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.ComputeSchedule.Models.DeleteResourceOperationResult 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 ExecuteCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExecuteCreateContent(Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload resourceConfigParameters, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters) { } + public string CorrelationId { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload ResourceConfigParameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ExecuteCreateContent 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.ComputeSchedule.Models.ExecuteCreateContent 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 ExecuteDeallocateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExecuteDeallocateContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters, Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources resources, string correlationId) { } @@ -120,6 +409,20 @@ 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 ExecuteDeleteContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExecuteDeleteContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters, Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources resources) { } + public string CorrelationId { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } } + public bool? IsForceDeletion { get { throw null; } set { } } + public System.Collections.Generic.IList ResourcesIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ExecuteDeleteContent 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.ComputeSchedule.Models.ExecuteDeleteContent 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 ExecuteHibernateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExecuteHibernateContent(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail executionParameters, Azure.ResourceManager.ComputeSchedule.Models.UserRequestResources resources, string correlationId) { } @@ -205,6 +508,150 @@ 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 NotificationLanguage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NotificationLanguage(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage EnUs { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage 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.ComputeSchedule.Models.NotificationLanguage left, Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage left, Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NotificationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NotificationSettings(string destination, Azure.ResourceManager.ComputeSchedule.Models.NotificationType type, Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage language) { } + public string Destination { get { throw null; } set { } } + public bool? IsDisabled { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.NotificationLanguage Language { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.NotificationType Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.NotificationSettings 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.ComputeSchedule.Models.NotificationSettings 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 NotificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NotificationType(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.NotificationType Email { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.NotificationType 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.ComputeSchedule.Models.NotificationType left, Azure.ResourceManager.ComputeSchedule.Models.NotificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.NotificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.NotificationType left, Azure.ResourceManager.ComputeSchedule.Models.NotificationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OccurrenceCancelContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OccurrenceCancelContent(System.Collections.Generic.IEnumerable resourceIds) { } + public System.Collections.Generic.IList ResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceCancelContent 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.ComputeSchedule.Models.OccurrenceCancelContent 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 OccurrenceDelayContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OccurrenceDelayContent(System.DateTimeOffset delay, System.Collections.Generic.IEnumerable resourceIds) { } + public System.DateTimeOffset Delay { get { throw null; } } + public System.Collections.Generic.IList ResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceDelayContent 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.ComputeSchedule.Models.OccurrenceDelayContent 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 OccurrenceExtensionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceExtensionProperties() { } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier ScheduledActionId { get { throw null; } } + public System.DateTimeOffset ScheduledOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties 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.ComputeSchedule.Models.OccurrenceExtensionProperties 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 OccurrenceExtensionResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceExtensionResourceData() { } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceExtensionResourceData 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.ComputeSchedule.Models.OccurrenceExtensionResourceData 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 OccurrenceResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceResourceData() { } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public System.DateTimeOffset ScheduledOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceData 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.ComputeSchedule.Models.OccurrenceResourceData 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 OccurrenceResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OccurrenceResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState 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.ComputeSchedule.Models.OccurrenceResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OccurrenceResultSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OccurrenceResultSummary() { } + public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + public int Total { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary 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.ComputeSchedule.Models.OccurrenceResultSummary 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 OperationErrorDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationErrorDetails() { } @@ -306,6 +753,33 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType left, Azure.ResourceManager.ComputeSchedule.Models.ResourceOperationType right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceProvisionPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceProvisionPayload(int resourceCount) { } + public System.Collections.Generic.IDictionary BaseProfile { get { throw null; } } + public int ResourceCount { get { throw null; } } + public System.Collections.Generic.IList> ResourceOverrides { get { throw null; } } + public string ResourcePrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ResourceProvisionPayload 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.ComputeSchedule.Models.ResourceProvisionPayload 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 ResourceResultSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResourceResultSummary() { } + public string Code { get { throw null; } } + public int Count { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ResourceResultSummary 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.ComputeSchedule.Models.ResourceResultSummary 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 ScheduledActionDeadlineType : System.IEquatable { @@ -337,6 +811,42 @@ 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 ScheduledActionOccurrenceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionOccurrenceProperties() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.OccurrenceResultSummary ResultSummary { get { throw null; } } + public System.DateTimeOffset ScheduledOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceProperties 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.ComputeSchedule.Models.ScheduledActionOccurrenceProperties 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 ScheduledActionOccurrenceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionOccurrenceState(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Canceled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Cancelling { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Created { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Rescheduling { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Scheduled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState 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.ComputeSchedule.Models.ScheduledActionOccurrenceState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOccurrenceState right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ScheduledActionOperationState : System.IEquatable { @@ -381,6 +891,298 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOptimizationPreference left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionOptimizationPreference right) { throw null; } public override string ToString() { throw null; } } + public partial class ScheduledActionPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionPatch() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatchProperties Properties { 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) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatch 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.ComputeSchedule.Models.ScheduledActionPatch 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 ScheduledActionPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionPatchProperties() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType? ActionType { get { throw null; } set { } } + public bool? Disabled { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public System.Collections.Generic.IList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType? ResourceType { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule Schedule { get { throw null; } set { } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionPatchProperties 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.ComputeSchedule.Models.ScheduledActionPatchProperties 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 ScheduledActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionProperties(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType resourceType, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType actionType, System.DateTimeOffset startOn, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule schedule, System.Collections.Generic.IEnumerable notificationSettings) { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType ActionType { get { throw null; } set { } } + public bool? Disabled { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public System.Collections.Generic.IList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType ResourceType { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule Schedule { get { throw null; } set { } } + public System.DateTimeOffset StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionProperties 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.ComputeSchedule.Models.ScheduledActionProperties 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 ScheduledActionResourceAttachContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourceAttachContent(System.Collections.Generic.IEnumerable resources) { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceAttachContent 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.ComputeSchedule.Models.ScheduledActionResourceAttachContent 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 ScheduledActionResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourceData(Azure.Core.ResourceIdentifier resourceId) { } + public System.Collections.Generic.IList NotificationSettings { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceData 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.ComputeSchedule.Models.ScheduledActionResourceData 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 ScheduledActionResourceDetachContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourceDetachContent(System.Collections.Generic.IEnumerable resources) { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceDetachContent 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.ComputeSchedule.Models.ScheduledActionResourceDetachContent 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 ScheduledActionResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionResourceOperationResult() { } + public System.Collections.Generic.IReadOnlyList ResourcesStatuses { get { throw null; } } + public int TotalResources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationResult 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.ComputeSchedule.Models.ScheduledActionResourceOperationResult 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 ScheduledActionResourceOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionResourceOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus 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.ComputeSchedule.Models.ScheduledActionResourceOperationStatus left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ScheduledActionResourcePatchContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionResourcePatchContent(System.Collections.Generic.IEnumerable resources) { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourcePatchContent 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.ComputeSchedule.Models.ScheduledActionResourcePatchContent 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 ScheduledActionResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState 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.ComputeSchedule.Models.ScheduledActionResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ScheduledActionResources : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionResources() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResources 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.ComputeSchedule.Models.ScheduledActionResources 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 ScheduledActionResourceStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionResourceStatus() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceOperationStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceStatus 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.ComputeSchedule.Models.ScheduledActionResourceStatus 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 ScheduledActionResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionResourceType(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType VirtualMachine { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType VirtualMachineScaleSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType 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.ComputeSchedule.Models.ScheduledActionResourceType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ScheduledActionsExtensionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ScheduledActionsExtensionProperties() { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType ActionType { get { throw null; } } + public bool? Disabled { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceNotificationSettings { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionResourceType ResourceType { get { throw null; } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule Schedule { get { throw null; } } + public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsExtensionProperties 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.ComputeSchedule.Models.ScheduledActionsExtensionProperties 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 ScheduledActionsSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduledActionsSchedule(System.TimeSpan scheduledTime, string timeZone, System.Collections.Generic.IEnumerable requestedWeekDays, System.Collections.Generic.IEnumerable requestedMonths, System.Collections.Generic.IEnumerable requestedDaysOfTheMonth) { } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionDeadlineType? DeadlineType { get { throw null; } set { } } + public Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionExecutionParameterDetail ExecutionParameters { get { throw null; } set { } } + public System.Collections.Generic.IList RequestedDaysOfTheMonth { get { throw null; } } + public System.Collections.Generic.IList RequestedMonths { get { throw null; } } + public System.Collections.Generic.IList RequestedWeekDays { get { throw null; } } + public System.TimeSpan ScheduledTime { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsSchedule 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.ComputeSchedule.Models.ScheduledActionsSchedule 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 ScheduledActionsScheduleMonth : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionsScheduleMonth(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth All { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth April { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth August { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth December { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth February { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth January { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth July { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth June { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth March { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth May { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth November { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth October { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth September { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth 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.ComputeSchedule.Models.ScheduledActionsScheduleMonth left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleMonth right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ScheduledActionsScheduleWeekDay : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionsScheduleWeekDay(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay All { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Friday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Monday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Saturday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Sunday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Thursday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Tuesday { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay 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.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionsScheduleWeekDay right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ScheduledActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScheduledActionType(string value) { throw null; } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType Deallocate { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType Hibernate { get { throw null; } } + public static Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType Start { get { throw null; } } + public bool Equals(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType 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.ComputeSchedule.Models.ScheduledActionType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType left, Azure.ResourceManager.ComputeSchedule.Models.ScheduledActionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class StartResourceOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal StartResourceOperationResult() { } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json index 6b26c3501378..a19fa84c2a7a 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/computeschedule/Azure.ResourceManager.ComputeSchedule", - "Tag": "net/computeschedule/Azure.ResourceManager.ComputeSchedule_dba73cf477" + "Tag": "net/computeschedule/Azure.ResourceManager.ComputeSchedule_0d644380f9" } \ No newline at end of file diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Azure.ResourceManager.ComputeSchedule.csproj b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Azure.ResourceManager.ComputeSchedule.csproj index 4fc6fd8ec7c8..f8eae31681ba 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Azure.ResourceManager.ComputeSchedule.csproj +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Azure.ResourceManager.ComputeSchedule.csproj @@ -1,8 +1,8 @@ - 1.1.0-beta.1 + 1.2.0-beta.2 - 1.0.0 + 1.1.0 Azure.ResourceManager.ComputeSchedule Azure Resource Manager client SDK for Azure resource provider ComputeSchedule. azure;management;arm;resource manager;computeschedule diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Extensions/ComputeScheduleExtensions.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Extensions/ComputeScheduleExtensions.cs new file mode 100644 index 000000000000..dd1e48dabcf7 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Extensions/ComputeScheduleExtensions.cs @@ -0,0 +1,578 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.ComputeSchedule.Mocking; +using Azure.ResourceManager.ComputeSchedule.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ComputeSchedule +{ + // Add the following overrides to resolve api-compat issue, the locationparameter changed from to string AzureLocation + public static partial class ComputeScheduleExtensions + { + /// + /// VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineDeallocate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> SubmitVirtualMachineDeallocateAsync(this SubscriptionResource subscriptionResource, string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).SubmitVirtualMachineDeallocateAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineDeallocate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response SubmitVirtualMachineDeallocate(this SubscriptionResource subscriptionResource, string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).SubmitVirtualMachineDeallocate(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineStart + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> SubmitVirtualMachineStartAsync(this SubscriptionResource subscriptionResource, string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).SubmitVirtualMachineStartAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineStart + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response SubmitVirtualMachineStart(this SubscriptionResource subscriptionResource, string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).SubmitVirtualMachineStart(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineHibernate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> SubmitVirtualMachineHibernateAsync(this SubscriptionResource subscriptionResource, string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).SubmitVirtualMachineHibernateAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineHibernate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response SubmitVirtualMachineHibernate(this SubscriptionResource subscriptionResource, string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).SubmitVirtualMachineHibernate(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineStart + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> ExecuteVirtualMachineStartAsync(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineStartAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineStart + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response ExecuteVirtualMachineStart(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineStart(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineHibernate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> ExecuteVirtualMachineHibernateAsync(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineHibernateAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineHibernate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response ExecuteVirtualMachineHibernate(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineHibernate(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationStatus + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> GetVirtualMachineOperationStatusAsync(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetVirtualMachineOperationStatusAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationStatus + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response GetVirtualMachineOperationStatus(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetVirtualMachineOperationStatus(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationErrors + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> GetVirtualMachineOperationErrorsAsync(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetVirtualMachineOperationErrorsAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationErrors + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response GetVirtualMachineOperationErrors(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetVirtualMachineOperationErrors(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeallocate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> ExecuteVirtualMachineDeallocateAsync(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineDeallocateAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeallocate + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response ExecuteVirtualMachineDeallocate(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineDeallocate(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations + /// + /// + /// Operation Id + /// ScheduledActions_CancelVirtualMachineOperations + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static async Task> CancelVirtualMachineOperationsAsync(this SubscriptionResource subscriptionResource, string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).CancelVirtualMachineOperationsAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations + /// + /// + /// Operation Id + /// ScheduledActions_CancelVirtualMachineOperations + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Response CancelVirtualMachineOperations(this SubscriptionResource subscriptionResource, string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).CancelVirtualMachineOperations(locationparameter, content, cancellationToken); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Extensions/MockableComputeScheduleSubscriptionResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Extensions/MockableComputeScheduleSubscriptionResource.cs new file mode 100644 index 000000000000..0c1d5612491c --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Extensions/MockableComputeScheduleSubscriptionResource.cs @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule.Mocking +{ + // Add the following overrides to resolve api-compat issue, the locationparameter changed from to string AzureLocation + public partial class MockableComputeScheduleSubscriptionResource + { + /// + /// VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineDeallocate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> SubmitVirtualMachineDeallocateAsync(string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + => await SubmitVirtualMachineDeallocateAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineDeallocate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response SubmitVirtualMachineDeallocate(string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + => SubmitVirtualMachineDeallocate(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineStart + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> SubmitVirtualMachineStartAsync(string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + => await SubmitVirtualMachineStartAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineStart + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response SubmitVirtualMachineStart(string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + => SubmitVirtualMachineStart(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineHibernate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> SubmitVirtualMachineHibernateAsync(string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + => await SubmitVirtualMachineHibernateAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate + /// + /// + /// Operation Id + /// ScheduledActions_SubmitVirtualMachineHibernate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response SubmitVirtualMachineHibernate(string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + => SubmitVirtualMachineHibernate(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineStart + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> ExecuteVirtualMachineStartAsync(string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + => await ExecuteVirtualMachineStartAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineStart + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response ExecuteVirtualMachineStart(string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + => ExecuteVirtualMachineStart(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineHibernate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> ExecuteVirtualMachineHibernateAsync(string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + => await ExecuteVirtualMachineHibernateAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineHibernate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response ExecuteVirtualMachineHibernate(string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + => ExecuteVirtualMachineHibernate(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationStatus + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetVirtualMachineOperationStatusAsync(string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + => await GetVirtualMachineOperationStatusAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationStatus + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetVirtualMachineOperationStatus(string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + => GetVirtualMachineOperationStatus(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationErrors + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetVirtualMachineOperationErrorsAsync(string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + => await GetVirtualMachineOperationErrorsAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors + /// + /// + /// Operation Id + /// ScheduledActions_GetVirtualMachineOperationErrors + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetVirtualMachineOperationErrors(string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + => GetVirtualMachineOperationErrors(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeallocate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> ExecuteVirtualMachineDeallocateAsync(string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + => await ExecuteVirtualMachineDeallocateAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeallocate + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response ExecuteVirtualMachineDeallocate(string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + => ExecuteVirtualMachineDeallocate(new AzureLocation(locationparameter), content, cancellationToken); + + /// + /// VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations + /// + /// + /// Operation Id + /// ScheduledActions_CancelVirtualMachineOperations + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CancelVirtualMachineOperationsAsync(string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + => await CancelVirtualMachineOperationsAsync(new AzureLocation(locationparameter), content, cancellationToken).ConfigureAwait(false); + + /// + /// VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations + /// + /// + /// Operation Id + /// ScheduledActions_CancelVirtualMachineOperations + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response CancelVirtualMachineOperations(string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + => CancelVirtualMachineOperations(new AzureLocation(locationparameter), content, cancellationToken); + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Models/ScheduledActionPatchProperties.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Models/ScheduledActionPatchProperties.cs new file mode 100644 index 000000000000..89a1ccb87516 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Custom/Models/ScheduledActionPatchProperties.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + [CodeGenModel("ScheduledActionUpdateProperties")] + public partial class ScheduledActionPatchProperties + { + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ArmComputeScheduleModelFactory.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ArmComputeScheduleModelFactory.cs index f90d6dc03e9c..375eb20cf773 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ArmComputeScheduleModelFactory.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ArmComputeScheduleModelFactory.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.ComputeSchedule.Models { @@ -124,6 +125,69 @@ public static StartResourceOperationResult StartResourceOperationResult(string d return new StartResourceOperationResult(description, resourceType, location, results?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// resource creation payload. + /// The execution parameters for the request. + /// CorrelationId item. + /// A new instance for mocking. + public static ExecuteCreateContent ExecuteCreateContent(ResourceProvisionPayload resourceConfigParameters = null, ScheduledActionExecutionParameterDetail executionParameters = null, string correlationId = null) + { + return new ExecuteCreateContent(resourceConfigParameters, executionParameters, correlationId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// JSON object that contains VM properties that are common across all VMs in this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in baseProfile). + /// JSON array, that contains VM properties that should to be overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and create a merged VMProfile. + /// Number of VMs to be created. + /// if resourceOverrides doesn't contain "name", service will create name based of prefix and ResourceCount e.g. resourceprefix-0,resourceprefix-1.. + /// A new instance for mocking. + public static ResourceProvisionPayload ResourceProvisionPayload(IDictionary baseProfile = null, IEnumerable> resourceOverrides = null, int resourceCount = default, string resourcePrefix = null) + { + baseProfile ??= new Dictionary(); + resourceOverrides ??= new List>(); + + return new ResourceProvisionPayload(baseProfile, resourceOverrides?.ToList(), resourceCount, resourcePrefix, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The description of the operation response. + /// The type of resources used in the create request eg virtual machines. + /// The location of the start request eg westus. + /// The results from the start request if no errors exist. + /// A new instance for mocking. + public static CreateResourceOperationResult CreateResourceOperationResult(string description = null, string type = null, AzureLocation location = default, IEnumerable results = null) + { + results ??= new List(); + + return new CreateResourceOperationResult(description, type, location, results?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The execution parameters for the request. + /// The resources for the request. + /// CorrelationId item. + /// Forced delete resource item. + /// A new instance for mocking. + public static ExecuteDeleteContent ExecuteDeleteContent(ScheduledActionExecutionParameterDetail executionParameters = null, IEnumerable resourcesIds = null, string correlationId = null, bool? isForceDeletion = null) + { + resourcesIds ??= new List(); + + return new ExecuteDeleteContent(executionParameters, resourcesIds != null ? new UserRequestResources(resourcesIds?.ToList(), serializedAdditionalRawData: null) : null, correlationId, isForceDeletion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The description of the operation response. + /// The type of resources used in the delete request eg virtual machines. + /// The location of the start request eg westus. + /// The results from the start request if no errors exist. + /// A new instance for mocking. + public static DeleteResourceOperationResult DeleteResourceOperationResult(string description = null, string type = null, AzureLocation location = default, IEnumerable results = null) + { + results ??= new List(); + + return new DeleteResourceOperationResult(description, type, location, results?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// An array of resource operations based on their operation ids. /// A new instance for mocking. @@ -197,5 +261,271 @@ public static OperationErrorDetails OperationErrorDetails(string errorCode = nul crpOperationId, serializedAdditionalRawData: 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. + /// A new instance for mocking. + public static ScheduledActionData ScheduledActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ScheduledActionProperties properties = null) + { + tags ??= new Dictionary(); + + return new ScheduledActionData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The time when the scheduled action is supposed to stop scheduling. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// Tell if the scheduled action is disabled or not. + /// The status of the last provisioning operation performed on the resource. + /// A new instance for mocking. + public static ScheduledActionProperties ScheduledActionProperties(ScheduledActionResourceType resourceType = default, ScheduledActionType actionType = default, DateTimeOffset startOn = default, DateTimeOffset? endOn = null, ScheduledActionsSchedule schedule = null, IEnumerable notificationSettings = null, bool? disabled = null, ScheduledActionResourceProvisioningState? provisioningState = null) + { + notificationSettings ??= new List(); + + return new ScheduledActionProperties( + resourceType, + actionType, + startOn, + endOn, + schedule, + notificationSettings?.ToList(), + disabled, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The desired notification settings for the specified resource. + /// A new instance for mocking. + public static ScheduledActionResourceData ScheduledActionResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier resourceId = null, IEnumerable notificationSettings = null) + { + notificationSettings ??= new List(); + + return new ScheduledActionResourceData( + id, + name, + resourceType, + systemData, + resourceId, + notificationSettings?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The total number of resources operated on. + /// The resource status of for each resource. + /// A new instance for mocking. + public static ScheduledActionResourceOperationResult ScheduledActionResourceOperationResult(int totalResources = default, IEnumerable resourcesStatuses = null) + { + resourcesStatuses ??= new List(); + + return new ScheduledActionResourceOperationResult(totalResources, resourcesStatuses?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The arm identifier of the resource. + /// The state the resource is currently on. + /// Errors encountered while trying to perform. + /// A new instance for mocking. + public static ScheduledActionResourceStatus ScheduledActionResourceStatus(ResourceIdentifier resourceId = null, ScheduledActionResourceOperationStatus status = default, ResponseError error = null) + { + return new ScheduledActionResourceStatus(resourceId, status, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ScheduledActionOccurrenceData ScheduledActionOccurrenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScheduledActionOccurrenceProperties properties = null) + { + return new ScheduledActionOccurrenceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The time the occurrence is scheduled for. This value can be changed by calling the delay API. + /// The result for occurrences that achieved a terminal state. + /// The aggregated provisioning state of the occurrence. + /// A new instance for mocking. + public static ScheduledActionOccurrenceProperties ScheduledActionOccurrenceProperties(DateTimeOffset scheduledOn = default, OccurrenceResultSummary resultSummary = null, ScheduledActionOccurrenceState? provisioningState = null) + { + return new ScheduledActionOccurrenceProperties(scheduledOn, resultSummary, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The total number of resources that the occurrence was supposed to act on. + /// The summarized status of the resources. + /// A new instance for mocking. + public static OccurrenceResultSummary OccurrenceResultSummary(int total = default, IEnumerable statuses = null) + { + statuses ??= new List(); + + return new OccurrenceResultSummary(total, statuses?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The error code for those resources. In case of success, code is populated with Success. + /// The number of resources that the code applies to. + /// The error details for the resources. Not populated on success cases. + /// A new instance for mocking. + public static ResourceResultSummary ResourceResultSummary(string code = null, int count = default, ResponseError errorDetails = null) + { + return new ResourceResultSummary(code, count, errorDetails, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ScheduledActionResources ScheduledActionResources(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScheduledActionsExtensionProperties properties = null) + { + return new ScheduledActionResources( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The time when the scheduled action is supposed to stop scheduling. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// Tell if the scheduled action is disabled or not. + /// The status of the last provisioning operation performed on the resource. + /// The notification settings for the scheduled action at a resource level. Resource level notification settings are scope to specific resources only and submitted through attach requests. + /// A new instance for mocking. + public static ScheduledActionsExtensionProperties ScheduledActionsExtensionProperties(ScheduledActionResourceType resourceType = default, ScheduledActionType actionType = default, DateTimeOffset startOn = default, DateTimeOffset? endOn = null, ScheduledActionsSchedule schedule = null, IEnumerable notificationSettings = null, bool? disabled = null, ScheduledActionResourceProvisioningState? provisioningState = null, IEnumerable resourceNotificationSettings = null) + { + notificationSettings ??= new List(); + resourceNotificationSettings ??= new List(); + + return new ScheduledActionsExtensionProperties( + resourceType, + actionType, + startOn, + endOn, + schedule, + notificationSettings?.ToList(), + disabled, + provisioningState, + resourceNotificationSettings?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The desired notification settings for the specified resource. + /// The time the occurrence is scheduled for the resource. + /// The current state of the resource. + /// Error details for the resource. Only populated if resource is in failed state. + /// A new instance for mocking. + public static OccurrenceResourceData OccurrenceResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier resourceId = null, IEnumerable notificationSettings = null, DateTimeOffset scheduledOn = default, OccurrenceResourceProvisioningState? provisioningState = null, ResponseError errorDetails = null) + { + notificationSettings ??= new List(); + + return new OccurrenceResourceData( + id, + name, + resourceType, + systemData, + resourceId, + notificationSettings?.ToList(), + scheduledOn, + provisioningState, + errorDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static OccurrenceExtensionResourceData OccurrenceExtensionResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, OccurrenceExtensionProperties properties = null) + { + return new OccurrenceExtensionResourceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The desired notification settings for the specified resource. + /// The time the occurrence is scheduled for the resource. Specified in UTC. + /// The current state of the resource. + /// Error details for the resource. Only populated if resource is in failed state. + /// The arm identifier of the scheduled action the occurrence belongs to. + /// A new instance for mocking. + public static OccurrenceExtensionProperties OccurrenceExtensionProperties(ResourceIdentifier resourceId = null, IEnumerable notificationSettings = null, DateTimeOffset scheduledOn = default, OccurrenceResourceProvisioningState? provisioningState = null, ResponseError errorDetails = null, ResourceIdentifier scheduledActionId = null) + { + notificationSettings ??= new List(); + + return new OccurrenceExtensionProperties( + resourceId, + notificationSettings?.ToList(), + scheduledOn, + provisioningState, + errorDetails, + scheduledActionId, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/ComputeScheduleExtensions.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/ComputeScheduleExtensions.cs index 599f4b22f17e..9c8a4b84e509 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/ComputeScheduleExtensions.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/ComputeScheduleExtensions.cs @@ -8,6 +8,7 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure.Core; using Azure.ResourceManager.ComputeSchedule.Mocking; using Azure.ResourceManager.ComputeSchedule.Models; using Azure.ResourceManager.Resources; @@ -17,11 +18,280 @@ namespace Azure.ResourceManager.ComputeSchedule /// A class to add extension methods to Azure.ResourceManager.ComputeSchedule. public static partial class ComputeScheduleExtensions { + private static MockableComputeScheduleArmClient GetMockableComputeScheduleArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableComputeScheduleArmClient(client0)); + } + + private static MockableComputeScheduleResourceGroupResource GetMockableComputeScheduleResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableComputeScheduleResourceGroupResource(client, resource.Id)); + } + private static MockableComputeScheduleSubscriptionResource GetMockableComputeScheduleSubscriptionResource(ArmResource resource) { return resource.GetCachedClient(client => new MockableComputeScheduleSubscriptionResource(client, resource.Id)); } + /// + /// List ScheduledActionResources resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedScheduledActions + /// + /// + /// Operation Id + /// ScheduledActionResources_GetAssociatedScheduledActions + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + public static AsyncPageable GetAssociatedScheduledActionsAsync(this ArmClient client, ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeScheduleArmClient(client).GetAssociatedScheduledActionsAsync(scope, cancellationToken); + } + + /// + /// List ScheduledActionResources resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedScheduledActions + /// + /// + /// Operation Id + /// ScheduledActionResources_GetAssociatedScheduledActions + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + public static Pageable GetAssociatedScheduledActions(this ArmClient client, ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeScheduleArmClient(client).GetAssociatedScheduledActions(scope, cancellationToken); + } + + /// + /// List OccurrenceExtensionResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedOccurrences + /// + /// + /// Operation Id + /// OccurrenceExtensionResource_GetAssociatedOccurrences + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + public static AsyncPageable GetAssociatedOccurrencesAsync(this ArmClient client, ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeScheduleArmClient(client).GetAssociatedOccurrencesAsync(scope, cancellationToken); + } + + /// + /// List OccurrenceExtensionResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedOccurrences + /// + /// + /// Operation Id + /// OccurrenceExtensionResource_GetAssociatedOccurrences + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + public static Pageable GetAssociatedOccurrences(this ArmClient client, ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeScheduleArmClient(client).GetAssociatedOccurrences(scope, cancellationToken); + } + + /// + /// 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 ScheduledActionResource GetScheduledActionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeScheduleArmClient(client).GetScheduledActionResource(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 ScheduledActionOccurrenceResource GetScheduledActionOccurrenceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeScheduleArmClient(client).GetScheduledActionOccurrenceResource(id); + } + + /// + /// Gets a collection of ScheduledActionResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ScheduledActionResources and their operations over a ScheduledActionResource. + public static ScheduledActionCollection GetScheduledActions(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableComputeScheduleResourceGroupResource(resourceGroupResource).GetScheduledActions(); + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetScheduledActionAsync(this ResourceGroupResource resourceGroupResource, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableComputeScheduleResourceGroupResource(resourceGroupResource).GetScheduledActionAsync(scheduledActionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetScheduledAction(this ResourceGroupResource resourceGroupResource, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableComputeScheduleResourceGroupResource(resourceGroupResource).GetScheduledAction(scheduledActionName, cancellationToken); + } + /// /// VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future. /// @@ -35,21 +305,24 @@ private static MockableComputeScheduleSubscriptionResource GetMockableComputeSch /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> SubmitVirtualMachineDeallocateAsync(this SubscriptionResource subscriptionResource, string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> SubmitVirtualMachineDeallocateAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -69,21 +342,24 @@ public static async Task> SubmitVirt /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response SubmitVirtualMachineDeallocate(this SubscriptionResource subscriptionResource, string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response SubmitVirtualMachineDeallocate(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -103,21 +379,24 @@ public static Response SubmitVirtualMachineDe /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> SubmitVirtualMachineHibernateAsync(this SubscriptionResource subscriptionResource, string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> SubmitVirtualMachineHibernateAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -137,21 +416,24 @@ public static async Task> SubmitVirtu /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response SubmitVirtualMachineHibernate(this SubscriptionResource subscriptionResource, string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response SubmitVirtualMachineHibernate(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -171,21 +453,24 @@ public static Response SubmitVirtualMachineHib /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> SubmitVirtualMachineStartAsync(this SubscriptionResource subscriptionResource, string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> SubmitVirtualMachineStartAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -205,21 +490,24 @@ public static async Task> SubmitVirtualMa /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response SubmitVirtualMachineStart(this SubscriptionResource subscriptionResource, string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response SubmitVirtualMachineStart(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -239,21 +527,24 @@ public static Response SubmitVirtualMachineStart(t /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> ExecuteVirtualMachineDeallocateAsync(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ExecuteVirtualMachineDeallocateAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -273,21 +564,24 @@ public static async Task> ExecuteVir /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response ExecuteVirtualMachineDeallocate(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response ExecuteVirtualMachineDeallocate(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -307,21 +601,24 @@ public static Response ExecuteVirtualMachineD /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> ExecuteVirtualMachineHibernateAsync(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ExecuteVirtualMachineHibernateAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -341,21 +638,24 @@ public static async Task> ExecuteVirt /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response ExecuteVirtualMachineHibernate(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response ExecuteVirtualMachineHibernate(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -375,21 +675,24 @@ public static Response ExecuteVirtualMachineHi /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> ExecuteVirtualMachineStartAsync(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ExecuteVirtualMachineStartAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -409,27 +712,178 @@ public static async Task> ExecuteVirtualM /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response ExecuteVirtualMachineStart(this SubscriptionResource subscriptionResource, string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response ExecuteVirtualMachineStart(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineStart(locationparameter, content, cancellationToken); } + /// + /// VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineCreateOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + public static async Task> ExecuteVirtualMachineCreateOperationAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineCreateOperationAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineCreateOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + public static Response ExecuteVirtualMachineCreateOperation(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineCreateOperation(locationparameter, content, cancellationToken); + } + + /// + /// VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeleteOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + public static async Task> ExecuteVirtualMachineDeleteOperationAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteDeleteContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineDeleteOperationAsync(locationparameter, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeleteOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + public static Response ExecuteVirtualMachineDeleteOperation(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, ExecuteDeleteContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).ExecuteVirtualMachineDeleteOperation(locationparameter, content, cancellationToken); + } + /// /// VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines /// @@ -443,21 +897,24 @@ public static Response ExecuteVirtualMachineStart( /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> GetVirtualMachineOperationStatusAsync(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> GetVirtualMachineOperationStatusAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -477,21 +934,24 @@ public static async Task> GetVirtualMachineOp /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response GetVirtualMachineOperationStatus(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response GetVirtualMachineOperationStatus(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -511,21 +971,24 @@ public static Response GetVirtualMachineOperationStatu /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> CancelVirtualMachineOperationsAsync(this SubscriptionResource subscriptionResource, string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> CancelVirtualMachineOperationsAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -545,21 +1008,24 @@ public static async Task> CancelVirtualMachineO /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response CancelVirtualMachineOperations(this SubscriptionResource subscriptionResource, string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response CancelVirtualMachineOperations(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -579,21 +1045,24 @@ public static Response CancelVirtualMachineOperations(th /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static async Task> GetVirtualMachineOperationErrorsAsync(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> GetVirtualMachineOperationErrorsAsync(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -613,25 +1082,100 @@ public static async Task> GetVirtualMachineOp /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// , or is null. - public static Response GetVirtualMachineOperationErrors(this SubscriptionResource subscriptionResource, string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + /// or is null. + public static Response GetVirtualMachineOperationErrors(this SubscriptionResource subscriptionResource, AzureLocation locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetVirtualMachineOperationErrors(locationparameter, content, cancellationToken); } + + /// + /// List ScheduledAction resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/scheduledActions + /// + /// + /// Operation Id + /// ScheduledAction_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetScheduledActionsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetScheduledActionsAsync(cancellationToken); + } + + /// + /// List ScheduledAction resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/scheduledActions + /// + /// + /// Operation Id + /// ScheduledAction_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetScheduledActions(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableComputeScheduleSubscriptionResource(subscriptionResource).GetScheduledActions(cancellationToken); + } } } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleArmClient.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleArmClient.cs new file mode 100644 index 000000000000..1537e8c2e60b --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleArmClient.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableComputeScheduleArmClient : ArmResource + { + private ClientDiagnostics _scheduledActionExtensionClientDiagnostics; + private ScheduledActionExtensionRestOperations _scheduledActionExtensionRestClient; + private ClientDiagnostics _occurrenceExtensionClientDiagnostics; + private OccurrenceExtensionRestOperations _occurrenceExtensionRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableComputeScheduleArmClient() + { + } + + /// 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 MockableComputeScheduleArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableComputeScheduleArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private ClientDiagnostics ScheduledActionExtensionClientDiagnostics => _scheduledActionExtensionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ScheduledActionExtensionRestOperations ScheduledActionExtensionRestClient => _scheduledActionExtensionRestClient ??= new ScheduledActionExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics OccurrenceExtensionClientDiagnostics => _occurrenceExtensionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OccurrenceExtensionRestOperations OccurrenceExtensionRestClient => _occurrenceExtensionRestClient ??= new OccurrenceExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List ScheduledActionResources resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedScheduledActions + /// + /// + /// Operation Id + /// ScheduledActionResources_GetAssociatedScheduledActions + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAssociatedScheduledActionsAsync(ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ScheduledActionExtensionRestClient.CreateGetAssociatedScheduledActionsRequest(scope); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ScheduledActionExtensionRestClient.CreateGetAssociatedScheduledActionsNextPageRequest(nextLink, scope); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ScheduledActionResources.DeserializeScheduledActionResources(e), ScheduledActionExtensionClientDiagnostics, Pipeline, "MockableComputeScheduleArmClient.GetAssociatedScheduledActions", "value", "nextLink", cancellationToken); + } + + /// + /// List ScheduledActionResources resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedScheduledActions + /// + /// + /// Operation Id + /// ScheduledActionResources_GetAssociatedScheduledActions + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAssociatedScheduledActions(ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ScheduledActionExtensionRestClient.CreateGetAssociatedScheduledActionsRequest(scope); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ScheduledActionExtensionRestClient.CreateGetAssociatedScheduledActionsNextPageRequest(nextLink, scope); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ScheduledActionResources.DeserializeScheduledActionResources(e), ScheduledActionExtensionClientDiagnostics, Pipeline, "MockableComputeScheduleArmClient.GetAssociatedScheduledActions", "value", "nextLink", cancellationToken); + } + + /// + /// List OccurrenceExtensionResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedOccurrences + /// + /// + /// Operation Id + /// OccurrenceExtensionResource_GetAssociatedOccurrences + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAssociatedOccurrencesAsync(ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => OccurrenceExtensionRestClient.CreateGetAssociatedOccurrencesRequest(scope); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OccurrenceExtensionRestClient.CreateGetAssociatedOccurrencesNextPageRequest(nextLink, scope); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OccurrenceExtensionResourceData.DeserializeOccurrenceExtensionResourceData(e), OccurrenceExtensionClientDiagnostics, Pipeline, "MockableComputeScheduleArmClient.GetAssociatedOccurrences", "value", "nextLink", cancellationToken); + } + + /// + /// List OccurrenceExtensionResource resources by parent + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.ComputeSchedule/associatedOccurrences + /// + /// + /// Operation Id + /// OccurrenceExtensionResource_GetAssociatedOccurrences + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// + /// The scope that the resource will apply against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAssociatedOccurrences(ResourceIdentifier scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => OccurrenceExtensionRestClient.CreateGetAssociatedOccurrencesRequest(scope); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OccurrenceExtensionRestClient.CreateGetAssociatedOccurrencesNextPageRequest(nextLink, scope); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OccurrenceExtensionResourceData.DeserializeOccurrenceExtensionResourceData(e), OccurrenceExtensionClientDiagnostics, Pipeline, "MockableComputeScheduleArmClient.GetAssociatedOccurrences", "value", "nextLink", cancellationToken); + } + /// + /// 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 ScheduledActionResource GetScheduledActionResource(ResourceIdentifier id) + { + ScheduledActionResource.ValidateResourceId(id); + return new ScheduledActionResource(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 ScheduledActionOccurrenceResource GetScheduledActionOccurrenceResource(ResourceIdentifier id) + { + ScheduledActionOccurrenceResource.ValidateResourceId(id); + return new ScheduledActionOccurrenceResource(Client, id); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleResourceGroupResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleResourceGroupResource.cs new file mode 100644 index 000000000000..74a24d8d500b --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableComputeScheduleResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableComputeScheduleResourceGroupResource() + { + } + + /// 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 MockableComputeScheduleResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of ScheduledActionResources in the ResourceGroupResource. + /// An object representing collection of ScheduledActionResources and their operations over a ScheduledActionResource. + public virtual ScheduledActionCollection GetScheduledActions() + { + return GetCachedClient(client => new ScheduledActionCollection(client, Id)); + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetScheduledActionAsync(string scheduledActionName, CancellationToken cancellationToken = default) + { + return await GetScheduledActions().GetAsync(scheduledActionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetScheduledAction(string scheduledActionName, CancellationToken cancellationToken = default) + { + return GetScheduledActions().Get(scheduledActionName, cancellationToken); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleSubscriptionResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleSubscriptionResource.cs index e25fb1608042..39c1d1dd010b 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleSubscriptionResource.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Extensions/MockableComputeScheduleSubscriptionResource.cs @@ -8,6 +8,7 @@ using System; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.ComputeSchedule.Models; @@ -17,8 +18,8 @@ namespace Azure.ResourceManager.ComputeSchedule.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableComputeScheduleSubscriptionResource : ArmResource { - private ClientDiagnostics _scheduledActionsClientDiagnostics; - private ScheduledActionsRestOperations _scheduledActionsRestClient; + private ClientDiagnostics _scheduledActionClientDiagnostics; + private ScheduledActionsRestOperations _scheduledActionRestClient; /// Initializes a new instance of the class for mocking. protected MockableComputeScheduleSubscriptionResource() @@ -32,8 +33,8 @@ internal MockableComputeScheduleSubscriptionResource(ArmClient client, ResourceI { } - private ClientDiagnostics ScheduledActionsClientDiagnostics => _scheduledActionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ScheduledActionsRestOperations ScheduledActionsRestClient => _scheduledActionsRestClient ??= new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ScheduledActionClientDiagnostics => _scheduledActionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ScheduledActionResource.ResourceType.Namespace, Diagnostics); + private ScheduledActionsRestOperations ScheduledActionRestClient => _scheduledActionRestClient ??= new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ScheduledActionResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -54,25 +55,27 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> SubmitVirtualMachineDeallocateAsync(string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> SubmitVirtualMachineDeallocateAsync(AzureLocation locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineDeallocate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineDeallocate"); scope.Start(); try { - var response = await ScheduledActionsRestClient.SubmitVirtualMachineDeallocateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.SubmitVirtualMachineDeallocateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -95,25 +98,27 @@ public virtual async Task> SubmitVir /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response SubmitVirtualMachineDeallocate(string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response SubmitVirtualMachineDeallocate(AzureLocation locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineDeallocate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineDeallocate"); scope.Start(); try { - var response = ScheduledActionsRestClient.SubmitVirtualMachineDeallocate(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.SubmitVirtualMachineDeallocate(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -136,25 +141,27 @@ public virtual Response SubmitVirtualMachineD /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> SubmitVirtualMachineHibernateAsync(string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> SubmitVirtualMachineHibernateAsync(AzureLocation locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineHibernate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineHibernate"); scope.Start(); try { - var response = await ScheduledActionsRestClient.SubmitVirtualMachineHibernateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.SubmitVirtualMachineHibernateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -177,25 +184,27 @@ public virtual async Task> SubmitVirt /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response SubmitVirtualMachineHibernate(string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response SubmitVirtualMachineHibernate(AzureLocation locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineHibernate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineHibernate"); scope.Start(); try { - var response = ScheduledActionsRestClient.SubmitVirtualMachineHibernate(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.SubmitVirtualMachineHibernate(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -218,25 +227,27 @@ public virtual Response SubmitVirtualMachineHi /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> SubmitVirtualMachineStartAsync(string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> SubmitVirtualMachineStartAsync(AzureLocation locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineStart"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineStart"); scope.Start(); try { - var response = await ScheduledActionsRestClient.SubmitVirtualMachineStartAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.SubmitVirtualMachineStartAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -259,25 +270,27 @@ public virtual async Task> SubmitVirtualM /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response SubmitVirtualMachineStart(string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response SubmitVirtualMachineStart(AzureLocation locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineStart"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.SubmitVirtualMachineStart"); scope.Start(); try { - var response = ScheduledActionsRestClient.SubmitVirtualMachineStart(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.SubmitVirtualMachineStart(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -300,25 +313,27 @@ public virtual Response SubmitVirtualMachineStart( /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> ExecuteVirtualMachineDeallocateAsync(string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ExecuteVirtualMachineDeallocateAsync(AzureLocation locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineDeallocate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineDeallocate"); scope.Start(); try { - var response = await ScheduledActionsRestClient.ExecuteVirtualMachineDeallocateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.ExecuteVirtualMachineDeallocateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -341,25 +356,27 @@ public virtual async Task> ExecuteVi /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response ExecuteVirtualMachineDeallocate(string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response ExecuteVirtualMachineDeallocate(AzureLocation locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineDeallocate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineDeallocate"); scope.Start(); try { - var response = ScheduledActionsRestClient.ExecuteVirtualMachineDeallocate(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.ExecuteVirtualMachineDeallocate(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -382,25 +399,27 @@ public virtual Response ExecuteVirtualMachine /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> ExecuteVirtualMachineHibernateAsync(string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ExecuteVirtualMachineHibernateAsync(AzureLocation locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineHibernate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineHibernate"); scope.Start(); try { - var response = await ScheduledActionsRestClient.ExecuteVirtualMachineHibernateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.ExecuteVirtualMachineHibernateAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -423,25 +442,27 @@ public virtual async Task> ExecuteVir /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response ExecuteVirtualMachineHibernate(string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response ExecuteVirtualMachineHibernate(AzureLocation locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineHibernate"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineHibernate"); scope.Start(); try { - var response = ScheduledActionsRestClient.ExecuteVirtualMachineHibernate(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.ExecuteVirtualMachineHibernate(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -464,25 +485,27 @@ public virtual Response ExecuteVirtualMachineH /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> ExecuteVirtualMachineStartAsync(string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ExecuteVirtualMachineStartAsync(AzureLocation locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineStart"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineStart"); scope.Start(); try { - var response = await ScheduledActionsRestClient.ExecuteVirtualMachineStartAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.ExecuteVirtualMachineStartAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -505,25 +528,199 @@ public virtual async Task> ExecuteVirtual /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response ExecuteVirtualMachineStart(AzureLocation locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineStart"); + scope.Start(); + try + { + var response = ScheduledActionRestClient.ExecuteVirtualMachineStart(Id.SubscriptionId, locationparameter, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineCreateOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> ExecuteVirtualMachineCreateOperationAsync(AzureLocation locationparameter, ExecuteCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineCreateOperation"); + scope.Start(); + try + { + var response = await ScheduledActionRestClient.ExecuteVirtualMachineCreateOperationAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineCreateOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response ExecuteVirtualMachineCreateOperation(AzureLocation locationparameter, ExecuteCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineCreateOperation"); + scope.Start(); + try + { + var response = ScheduledActionRestClient.ExecuteVirtualMachineCreateOperation(Id.SubscriptionId, locationparameter, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeleteOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response ExecuteVirtualMachineStart(string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ExecuteVirtualMachineDeleteOperationAsync(AzureLocation locationparameter, ExecuteDeleteContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineStart"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineDeleteOperation"); scope.Start(); try { - var response = ScheduledActionsRestClient.ExecuteVirtualMachineStart(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = await ScheduledActionRestClient.ExecuteVirtualMachineDeleteOperationAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDelete + /// + /// + /// Operation Id + /// ScheduledActions_ExecuteVirtualMachineDeleteOperation + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response ExecuteVirtualMachineDeleteOperation(AzureLocation locationparameter, ExecuteDeleteContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.ExecuteVirtualMachineDeleteOperation"); + scope.Start(); + try + { + var response = ScheduledActionRestClient.ExecuteVirtualMachineDeleteOperation(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -546,25 +743,27 @@ public virtual Response ExecuteVirtualMachineStart /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> GetVirtualMachineOperationStatusAsync(string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> GetVirtualMachineOperationStatusAsync(AzureLocation locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationStatus"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationStatus"); scope.Start(); try { - var response = await ScheduledActionsRestClient.GetVirtualMachineOperationStatusAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.GetVirtualMachineOperationStatusAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -587,25 +786,27 @@ public virtual async Task> GetVirtualMachineO /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response GetVirtualMachineOperationStatus(string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response GetVirtualMachineOperationStatus(AzureLocation locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationStatus"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationStatus"); scope.Start(); try { - var response = ScheduledActionsRestClient.GetVirtualMachineOperationStatus(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.GetVirtualMachineOperationStatus(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -628,25 +829,27 @@ public virtual Response GetVirtualMachineOperationStat /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CancelVirtualMachineOperationsAsync(string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CancelVirtualMachineOperationsAsync(AzureLocation locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.CancelVirtualMachineOperations"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.CancelVirtualMachineOperations"); scope.Start(); try { - var response = await ScheduledActionsRestClient.CancelVirtualMachineOperationsAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.CancelVirtualMachineOperationsAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -669,25 +872,27 @@ public virtual async Task> CancelVirtualMachine /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response CancelVirtualMachineOperations(string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CancelVirtualMachineOperations(AzureLocation locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.CancelVirtualMachineOperations"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.CancelVirtualMachineOperations"); scope.Start(); try { - var response = ScheduledActionsRestClient.CancelVirtualMachineOperations(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.CancelVirtualMachineOperations(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -710,25 +915,27 @@ public virtual Response CancelVirtualMachineOperations(s /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> GetVirtualMachineOperationErrorsAsync(string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> GetVirtualMachineOperationErrorsAsync(AzureLocation locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationErrors"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationErrors"); scope.Start(); try { - var response = await ScheduledActionsRestClient.GetVirtualMachineOperationErrorsAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); + var response = await ScheduledActionRestClient.GetVirtualMachineOperationErrorsAsync(Id.SubscriptionId, locationparameter, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -751,25 +958,27 @@ public virtual async Task> GetVirtualMachineO /// /// /// Default Api Version - /// 2024-10-01 + /// 2025-04-15-preview + /// + /// + /// Resource + /// /// /// /// /// The location name. /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response GetVirtualMachineOperationErrors(string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response GetVirtualMachineOperationErrors(AzureLocation locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationErrors"); + using var scope = ScheduledActionClientDiagnostics.CreateScope("MockableComputeScheduleSubscriptionResource.GetVirtualMachineOperationErrors"); scope.Start(); try { - var response = ScheduledActionsRestClient.GetVirtualMachineOperationErrors(Id.SubscriptionId, locationparameter, content, cancellationToken); + var response = ScheduledActionRestClient.GetVirtualMachineOperationErrors(Id.SubscriptionId, locationparameter, content, cancellationToken); return response; } catch (Exception e) @@ -778,5 +987,65 @@ public virtual Response GetVirtualMachineOperationErro throw; } } + + /// + /// List ScheduledAction resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/scheduledActions + /// + /// + /// Operation Id + /// ScheduledAction_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetScheduledActionsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ScheduledActionRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ScheduledActionRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ScheduledActionResource(Client, ScheduledActionData.DeserializeScheduledActionData(e)), ScheduledActionClientDiagnostics, Pipeline, "MockableComputeScheduleSubscriptionResource.GetScheduledActions", "value", "nextLink", cancellationToken); + } + + /// + /// List ScheduledAction resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/scheduledActions + /// + /// + /// Operation Id + /// ScheduledAction_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetScheduledActions(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ScheduledActionRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ScheduledActionRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ScheduledActionResource(Client, ScheduledActionData.DeserializeScheduledActionData(e)), ScheduledActionClientDiagnostics, Pipeline, "MockableComputeScheduleSubscriptionResource.GetScheduledActions", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ComputeScheduleArmOperation.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ComputeScheduleArmOperation.cs new file mode 100644 index 000000000000..73fc1a7df7cc --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ComputeScheduleArmOperation.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ComputeSchedule +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ComputeScheduleArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of ComputeScheduleArmOperation for mocking. + protected ComputeScheduleArmOperation() + { + } + + internal ComputeScheduleArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ComputeScheduleArmOperation(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) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "ComputeScheduleArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerComputeScheduleContext.Default); + using var document = JsonDocument.Parse(data); + var lroDetails = document.RootElement; + return lroDetails.GetProperty("id").GetString(); + } + /// + 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ComputeScheduleArmOperationOfT.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ComputeScheduleArmOperationOfT.cs new file mode 100644 index 000000000000..df70e90800d2 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ComputeScheduleArmOperationOfT.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ComputeSchedule +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ComputeScheduleArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of ComputeScheduleArmOperation for mocking. + protected ComputeScheduleArmOperation() + { + } + + internal ComputeScheduleArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ComputeScheduleArmOperation(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) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "ComputeScheduleArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerComputeScheduleContext.Default); + using var document = JsonDocument.Parse(data); + var lroDetails = document.RootElement; + return lroDetails.GetProperty("id").GetString(); + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + 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 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ScheduledActionOperationSource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ScheduledActionOperationSource.cs new file mode 100644 index 000000000000..70be0b0e54bc --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ScheduledActionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.ComputeSchedule +{ + internal class ScheduledActionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ScheduledActionOperationSource(ArmClient client) + { + _client = client; + } + + ScheduledActionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerComputeScheduleContext.Default); + return new ScheduledActionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerComputeScheduleContext.Default); + return await Task.FromResult(new ScheduledActionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ScheduledActionResourceOperationResultOperationSource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ScheduledActionResourceOperationResultOperationSource.cs new file mode 100644 index 000000000000..9c8260c199c7 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/LongRunningOperation/ScheduledActionResourceOperationResultOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + internal class ScheduledActionResourceOperationResultOperationSource : IOperationSource + { + ScheduledActionResourceOperationResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/AzureResourceManagerComputeScheduleContext.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/AzureResourceManagerComputeScheduleContext.cs index 73ef477751c2..7bfa851244aa 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/AzureResourceManagerComputeScheduleContext.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/AzureResourceManagerComputeScheduleContext.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using Azure.ResourceManager.ComputeSchedule.Models; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.ComputeSchedule { @@ -16,8 +17,12 @@ namespace Azure.ResourceManager.ComputeSchedule /// [ModelReaderWriterBuildable(typeof(CancelOperationsContent))] [ModelReaderWriterBuildable(typeof(CancelOperationsResult))] + [ModelReaderWriterBuildable(typeof(CreateResourceOperationResult))] [ModelReaderWriterBuildable(typeof(DeallocateResourceOperationResult))] + [ModelReaderWriterBuildable(typeof(DeleteResourceOperationResult))] + [ModelReaderWriterBuildable(typeof(ExecuteCreateContent))] [ModelReaderWriterBuildable(typeof(ExecuteDeallocateContent))] + [ModelReaderWriterBuildable(typeof(ExecuteDeleteContent))] [ModelReaderWriterBuildable(typeof(ExecuteHibernateContent))] [ModelReaderWriterBuildable(typeof(ExecuteStartContent))] [ModelReaderWriterBuildable(typeof(GetOperationErrorsContent))] @@ -25,17 +30,50 @@ namespace Azure.ResourceManager.ComputeSchedule [ModelReaderWriterBuildable(typeof(GetOperationStatusContent))] [ModelReaderWriterBuildable(typeof(GetOperationStatusResult))] [ModelReaderWriterBuildable(typeof(HibernateResourceOperationResult))] + [ModelReaderWriterBuildable(typeof(NotificationSettings))] + [ModelReaderWriterBuildable(typeof(OccurrenceCancelContent))] + [ModelReaderWriterBuildable(typeof(OccurrenceDelayContent))] + [ModelReaderWriterBuildable(typeof(OccurrenceExtensionProperties))] + [ModelReaderWriterBuildable(typeof(OccurrenceExtensionResourceData))] + [ModelReaderWriterBuildable(typeof(OccurrenceExtensionResourceListResult))] + [ModelReaderWriterBuildable(typeof(OccurrenceListResult))] + [ModelReaderWriterBuildable(typeof(OccurrenceResourceData))] + [ModelReaderWriterBuildable(typeof(OccurrenceResourceListResponse))] + [ModelReaderWriterBuildable(typeof(OccurrenceResultSummary))] [ModelReaderWriterBuildable(typeof(OperationErrorDetails))] [ModelReaderWriterBuildable(typeof(OperationErrorsResult))] + [ModelReaderWriterBuildable(typeof(ResourceListResponse))] [ModelReaderWriterBuildable(typeof(ResourceOperationDetails))] [ModelReaderWriterBuildable(typeof(ResourceOperationError))] [ModelReaderWriterBuildable(typeof(ResourceOperationResult))] + [ModelReaderWriterBuildable(typeof(ResourceProvisionPayload))] + [ModelReaderWriterBuildable(typeof(ResourceResultSummary))] [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(ScheduledActionData))] [ModelReaderWriterBuildable(typeof(ScheduledActionExecutionParameterDetail))] + [ModelReaderWriterBuildable(typeof(ScheduledActionListResult))] + [ModelReaderWriterBuildable(typeof(ScheduledActionOccurrenceData))] + [ModelReaderWriterBuildable(typeof(ScheduledActionOccurrenceProperties))] + [ModelReaderWriterBuildable(typeof(ScheduledActionOccurrenceResource))] + [ModelReaderWriterBuildable(typeof(ScheduledActionPatch))] + [ModelReaderWriterBuildable(typeof(ScheduledActionPatchProperties))] + [ModelReaderWriterBuildable(typeof(ScheduledActionProperties))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResource))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourceAttachContent))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourceData))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourceDetachContent))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourceOperationResult))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourcePatchContent))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResources))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourcesListResult))] + [ModelReaderWriterBuildable(typeof(ScheduledActionResourceStatus))] + [ModelReaderWriterBuildable(typeof(ScheduledActionsExtensionProperties))] + [ModelReaderWriterBuildable(typeof(ScheduledActionsSchedule))] [ModelReaderWriterBuildable(typeof(StartResourceOperationResult))] [ModelReaderWriterBuildable(typeof(SubmitDeallocateContent))] [ModelReaderWriterBuildable(typeof(SubmitHibernateContent))] [ModelReaderWriterBuildable(typeof(SubmitStartContent))] + [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserRequestResources))] [ModelReaderWriterBuildable(typeof(UserRequestRetryPolicy))] [ModelReaderWriterBuildable(typeof(UserRequestSchedule))] diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CreateResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CreateResourceOperationResult.Serialization.cs new file mode 100644 index 000000000000..98145ea98500 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CreateResourceOperationResult.Serialization.cs @@ -0,0 +1,167 @@ +// 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.ComputeSchedule.Models +{ + public partial class CreateResourceOperationResult : 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(CreateResourceOperationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (Optional.IsCollectionDefined(Results)) + { + writer.WritePropertyName("results"u8); + writer.WriteStartArray(); + foreach (var item in Results) + { + 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 + } + } + } + + CreateResourceOperationResult 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(CreateResourceOperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateResourceOperationResult(document.RootElement, options); + } + + internal static CreateResourceOperationResult DeserializeCreateResourceOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + string type = default; + AzureLocation location = default; + IReadOnlyList results = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("results"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceOperationResult.DeserializeResourceOperationResult(item, options)); + } + results = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateResourceOperationResult(description, type, location, results ?? 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(CreateResourceOperationResult)} does not support writing '{options.Format}' format."); + } + } + + CreateResourceOperationResult 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 DeserializeCreateResourceOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateResourceOperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CreateResourceOperationResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CreateResourceOperationResult.cs new file mode 100644 index 000000000000..60b10f1d33f0 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/CreateResourceOperationResult.cs @@ -0,0 +1,94 @@ +// 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.ComputeSchedule.Models +{ + /// The response from a create request. + public partial class CreateResourceOperationResult + { + /// + /// 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 description of the operation response. + /// The type of resources used in the create request eg virtual machines. + /// The location of the start request eg westus. + /// or is null. + internal CreateResourceOperationResult(string description, string type, AzureLocation location) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(type, nameof(type)); + + Description = description; + Type = type; + Location = location; + Results = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The description of the operation response. + /// The type of resources used in the create request eg virtual machines. + /// The location of the start request eg westus. + /// The results from the start request if no errors exist. + /// Keeps track of any properties unknown to the library. + internal CreateResourceOperationResult(string description, string type, AzureLocation location, IReadOnlyList results, IDictionary serializedAdditionalRawData) + { + Description = description; + Type = type; + Location = location; + Results = results; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateResourceOperationResult() + { + } + + /// The description of the operation response. + public string Description { get; } + /// The type of resources used in the create request eg virtual machines. + public string Type { get; } + /// The location of the start request eg westus. + public AzureLocation Location { get; } + /// The results from the start request if no errors exist. + public IReadOnlyList Results { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeleteResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeleteResourceOperationResult.Serialization.cs new file mode 100644 index 000000000000..fbe6eddc3886 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeleteResourceOperationResult.Serialization.cs @@ -0,0 +1,167 @@ +// 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.ComputeSchedule.Models +{ + public partial class DeleteResourceOperationResult : 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(DeleteResourceOperationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (Optional.IsCollectionDefined(Results)) + { + writer.WritePropertyName("results"u8); + writer.WriteStartArray(); + foreach (var item in Results) + { + 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 + } + } + } + + DeleteResourceOperationResult 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(DeleteResourceOperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeleteResourceOperationResult(document.RootElement, options); + } + + internal static DeleteResourceOperationResult DeserializeDeleteResourceOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + string type = default; + AzureLocation location = default; + IReadOnlyList results = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("results"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceOperationResult.DeserializeResourceOperationResult(item, options)); + } + results = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeleteResourceOperationResult(description, type, location, results ?? 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(DeleteResourceOperationResult)} does not support writing '{options.Format}' format."); + } + } + + DeleteResourceOperationResult 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 DeserializeDeleteResourceOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeleteResourceOperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeleteResourceOperationResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeleteResourceOperationResult.cs new file mode 100644 index 000000000000..880209a70316 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/DeleteResourceOperationResult.cs @@ -0,0 +1,94 @@ +// 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.ComputeSchedule.Models +{ + /// The response from a delete request. + public partial class DeleteResourceOperationResult + { + /// + /// 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 description of the operation response. + /// The type of resources used in the delete request eg virtual machines. + /// The location of the start request eg westus. + /// or is null. + internal DeleteResourceOperationResult(string description, string type, AzureLocation location) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(type, nameof(type)); + + Description = description; + Type = type; + Location = location; + Results = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The description of the operation response. + /// The type of resources used in the delete request eg virtual machines. + /// The location of the start request eg westus. + /// The results from the start request if no errors exist. + /// Keeps track of any properties unknown to the library. + internal DeleteResourceOperationResult(string description, string type, AzureLocation location, IReadOnlyList results, IDictionary serializedAdditionalRawData) + { + Description = description; + Type = type; + Location = location; + Results = results; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeleteResourceOperationResult() + { + } + + /// The description of the operation response. + public string Description { get; } + /// The type of resources used in the delete request eg virtual machines. + public string Type { get; } + /// The location of the start request eg westus. + public AzureLocation Location { get; } + /// The results from the start request if no errors exist. + public IReadOnlyList Results { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteCreateContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteCreateContent.Serialization.cs new file mode 100644 index 000000000000..eb724b40a98a --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteCreateContent.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.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + public partial class ExecuteCreateContent : 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(ExecuteCreateContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceConfigParameters"u8); + writer.WriteObjectValue(ResourceConfigParameters, options); + writer.WritePropertyName("executionParameters"u8); + writer.WriteObjectValue(ExecutionParameters, options); + if (Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationid"u8); + writer.WriteStringValue(CorrelationId); + } + 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 + } + } + } + + ExecuteCreateContent 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(ExecuteCreateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExecuteCreateContent(document.RootElement, options); + } + + internal static ExecuteCreateContent DeserializeExecuteCreateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceProvisionPayload resourceConfigParameters = default; + ScheduledActionExecutionParameterDetail executionParameters = default; + string correlationid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceConfigParameters"u8)) + { + resourceConfigParameters = ResourceProvisionPayload.DeserializeResourceProvisionPayload(property.Value, options); + continue; + } + if (property.NameEquals("executionParameters"u8)) + { + executionParameters = ScheduledActionExecutionParameterDetail.DeserializeScheduledActionExecutionParameterDetail(property.Value, options); + continue; + } + if (property.NameEquals("correlationid"u8)) + { + correlationid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExecuteCreateContent(resourceConfigParameters, executionParameters, correlationid, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ExecuteCreateContent)} does not support writing '{options.Format}' format."); + } + } + + ExecuteCreateContent 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 DeserializeExecuteCreateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExecuteCreateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteCreateContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteCreateContent.cs new file mode 100644 index 000000000000..f3dfb6219ffb --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteCreateContent.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; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The ExecuteCreateRequest request for create operations. + public partial class ExecuteCreateContent + { + /// + /// 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 . + /// resource creation payload. + /// The execution parameters for the request. + /// or is null. + public ExecuteCreateContent(ResourceProvisionPayload resourceConfigParameters, ScheduledActionExecutionParameterDetail executionParameters) + { + Argument.AssertNotNull(resourceConfigParameters, nameof(resourceConfigParameters)); + Argument.AssertNotNull(executionParameters, nameof(executionParameters)); + + ResourceConfigParameters = resourceConfigParameters; + ExecutionParameters = executionParameters; + } + + /// Initializes a new instance of . + /// resource creation payload. + /// The execution parameters for the request. + /// CorrelationId item. + /// Keeps track of any properties unknown to the library. + internal ExecuteCreateContent(ResourceProvisionPayload resourceConfigParameters, ScheduledActionExecutionParameterDetail executionParameters, string correlationId, IDictionary serializedAdditionalRawData) + { + ResourceConfigParameters = resourceConfigParameters; + ExecutionParameters = executionParameters; + CorrelationId = correlationId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExecuteCreateContent() + { + } + + /// resource creation payload. + public ResourceProvisionPayload ResourceConfigParameters { get; } + /// The execution parameters for the request. + public ScheduledActionExecutionParameterDetail ExecutionParameters { get; } + /// CorrelationId item. + public string CorrelationId { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeleteContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeleteContent.Serialization.cs new file mode 100644 index 000000000000..9c545edc2402 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeleteContent.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.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + public partial class ExecuteDeleteContent : 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(ExecuteDeleteContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("executionParameters"u8); + writer.WriteObjectValue(ExecutionParameters, options); + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources, options); + if (Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationid"u8); + writer.WriteStringValue(CorrelationId); + } + if (Optional.IsDefined(IsForceDeletion)) + { + writer.WritePropertyName("forceDeletion"u8); + writer.WriteBooleanValue(IsForceDeletion.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 + } + } + } + + ExecuteDeleteContent 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(ExecuteDeleteContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExecuteDeleteContent(document.RootElement, options); + } + + internal static ExecuteDeleteContent DeserializeExecuteDeleteContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionExecutionParameterDetail executionParameters = default; + UserRequestResources resources = default; + string correlationid = default; + bool? forceDeletion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("executionParameters"u8)) + { + executionParameters = ScheduledActionExecutionParameterDetail.DeserializeScheduledActionExecutionParameterDetail(property.Value, options); + continue; + } + if (property.NameEquals("resources"u8)) + { + resources = UserRequestResources.DeserializeUserRequestResources(property.Value, options); + continue; + } + if (property.NameEquals("correlationid"u8)) + { + correlationid = property.Value.GetString(); + continue; + } + if (property.NameEquals("forceDeletion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + forceDeletion = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExecuteDeleteContent(executionParameters, resources, correlationid, forceDeletion, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ExecuteDeleteContent)} does not support writing '{options.Format}' format."); + } + } + + ExecuteDeleteContent 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 DeserializeExecuteDeleteContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExecuteDeleteContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeleteContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeleteContent.cs new file mode 100644 index 000000000000..f53f8d9b0a5f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ExecuteDeleteContent.cs @@ -0,0 +1,97 @@ +// 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.ComputeSchedule.Models +{ + /// The ExecuteDeleteRequest for delete VM operation. + public partial class ExecuteDeleteContent + { + /// + /// 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 execution parameters for the request. + /// The resources for the request. + /// or is null. + public ExecuteDeleteContent(ScheduledActionExecutionParameterDetail executionParameters, UserRequestResources resources) + { + Argument.AssertNotNull(executionParameters, nameof(executionParameters)); + Argument.AssertNotNull(resources, nameof(resources)); + + ExecutionParameters = executionParameters; + Resources = resources; + } + + /// Initializes a new instance of . + /// The execution parameters for the request. + /// The resources for the request. + /// CorrelationId item. + /// Forced delete resource item. + /// Keeps track of any properties unknown to the library. + internal ExecuteDeleteContent(ScheduledActionExecutionParameterDetail executionParameters, UserRequestResources resources, string correlationId, bool? isForceDeletion, IDictionary serializedAdditionalRawData) + { + ExecutionParameters = executionParameters; + Resources = resources; + CorrelationId = correlationId; + IsForceDeletion = isForceDeletion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExecuteDeleteContent() + { + } + + /// The execution parameters for the request. + public ScheduledActionExecutionParameterDetail ExecutionParameters { get; } + /// The resources for the request. + internal UserRequestResources Resources { get; } + /// The resource ids used for the request. + public IList ResourcesIds + { + get => Resources?.Ids; + } + + /// CorrelationId item. + public string CorrelationId { get; set; } + /// Forced delete resource item. + public bool? IsForceDeletion { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationLanguage.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationLanguage.cs new file mode 100644 index 000000000000..95f0b8259d34 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationLanguage.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The notification languages currently supported. + public readonly partial struct NotificationLanguage : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NotificationLanguage(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnUsValue = "en-us"; + + /// American english language. + public static NotificationLanguage EnUs { get; } = new NotificationLanguage(EnUsValue); + /// Determines if two values are the same. + public static bool operator ==(NotificationLanguage left, NotificationLanguage right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NotificationLanguage left, NotificationLanguage right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NotificationLanguage(string value) => new NotificationLanguage(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NotificationLanguage other && Equals(other); + /// + public bool Equals(NotificationLanguage 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationSettings.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationSettings.Serialization.cs new file mode 100644 index 000000000000..dd4ba7b1daa8 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationSettings.Serialization.cs @@ -0,0 +1,157 @@ +// 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.ComputeSchedule.Models +{ + public partial class NotificationSettings : 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(NotificationSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("destination"u8); + writer.WriteStringValue(Destination); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language.ToString()); + if (Optional.IsDefined(IsDisabled)) + { + writer.WritePropertyName("disabled"u8); + writer.WriteBooleanValue(IsDisabled.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 + } + } + } + + NotificationSettings 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(NotificationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNotificationSettings(document.RootElement, options); + } + + internal static NotificationSettings DeserializeNotificationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string destination = default; + NotificationType type = default; + NotificationLanguage language = default; + bool? disabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destination"u8)) + { + destination = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new NotificationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("language"u8)) + { + language = new NotificationLanguage(property.Value.GetString()); + continue; + } + if (property.NameEquals("disabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NotificationSettings(destination, type, language, disabled, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(NotificationSettings)} does not support writing '{options.Format}' format."); + } + } + + NotificationSettings 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 DeserializeNotificationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NotificationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationSettings.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationSettings.cs new file mode 100644 index 000000000000..9b9b0e84d13b --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationSettings.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The information about notifications to be send to about upcoming operations. + public partial class NotificationSettings + { + /// + /// 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 . + /// Where the notification should be sent. For email, it should follow email format. + /// Type of notification to be sent. + /// The language the notification should be sent on. + /// is null. + public NotificationSettings(string destination, NotificationType type, NotificationLanguage language) + { + Argument.AssertNotNull(destination, nameof(destination)); + + Destination = destination; + Type = type; + Language = language; + } + + /// Initializes a new instance of . + /// Where the notification should be sent. For email, it should follow email format. + /// Type of notification to be sent. + /// The language the notification should be sent on. + /// Tells if the notification is enabled or not. + /// Keeps track of any properties unknown to the library. + internal NotificationSettings(string destination, NotificationType type, NotificationLanguage language, bool? isDisabled, IDictionary serializedAdditionalRawData) + { + Destination = destination; + Type = type; + Language = language; + IsDisabled = isDisabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NotificationSettings() + { + } + + /// Where the notification should be sent. For email, it should follow email format. + public string Destination { get; set; } + /// Type of notification to be sent. + public NotificationType Type { get; set; } + /// The language the notification should be sent on. + public NotificationLanguage Language { get; set; } + /// Tells if the notification is enabled or not. + public bool? IsDisabled { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationType.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationType.cs new file mode 100644 index 000000000000..58d7046c8894 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/NotificationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The type of notification supported. + public readonly partial struct NotificationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NotificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EmailValue = "Email"; + + /// Notify through e-mail. + public static NotificationType Email { get; } = new NotificationType(EmailValue); + /// Determines if two values are the same. + public static bool operator ==(NotificationType left, NotificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NotificationType left, NotificationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NotificationType(string value) => new NotificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NotificationType other && Equals(other); + /// + public bool Equals(NotificationType 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceCancelContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceCancelContent.Serialization.cs new file mode 100644 index 000000000000..4457e9d0d28d --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceCancelContent.Serialization.cs @@ -0,0 +1,148 @@ +// 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.ComputeSchedule.Models +{ + public partial class OccurrenceCancelContent : 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(OccurrenceCancelContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceIds"u8); + writer.WriteStartArray(); + foreach (var item in ResourceIds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + 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 + } + } + } + + OccurrenceCancelContent 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(OccurrenceCancelContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceCancelContent(document.RootElement, options); + } + + internal static OccurrenceCancelContent DeserializeOccurrenceCancelContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + resourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OccurrenceCancelContent(resourceIds, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceCancelContent)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceCancelContent 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 DeserializeOccurrenceCancelContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceCancelContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceCancelContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceCancelContent.cs new file mode 100644 index 000000000000..9b61ff0bc795 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceCancelContent.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 System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The request to cancel an occurrence. + public partial class OccurrenceCancelContent + { + /// + /// 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 resources the cancellation should act on. If no resource is passed in the list, Scheduled Action will cancel the occurrence for all resources. + /// is null. + public OccurrenceCancelContent(IEnumerable resourceIds) + { + Argument.AssertNotNull(resourceIds, nameof(resourceIds)); + + ResourceIds = resourceIds.ToList(); + } + + /// Initializes a new instance of . + /// The resources the cancellation should act on. If no resource is passed in the list, Scheduled Action will cancel the occurrence for all resources. + /// Keeps track of any properties unknown to the library. + internal OccurrenceCancelContent(IList resourceIds, IDictionary serializedAdditionalRawData) + { + ResourceIds = resourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceCancelContent() + { + } + + /// The resources the cancellation should act on. If no resource is passed in the list, Scheduled Action will cancel the occurrence for all resources. + public IList ResourceIds { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceDelayContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceDelayContent.Serialization.cs new file mode 100644 index 000000000000..7792be3b8fe9 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceDelayContent.Serialization.cs @@ -0,0 +1,156 @@ +// 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.ComputeSchedule.Models +{ + public partial class OccurrenceDelayContent : 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(OccurrenceDelayContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("delay"u8); + writer.WriteStringValue(Delay, "O"); + writer.WritePropertyName("resourceIds"u8); + writer.WriteStartArray(); + foreach (var item in ResourceIds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + 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 + } + } + } + + OccurrenceDelayContent 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(OccurrenceDelayContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceDelayContent(document.RootElement, options); + } + + internal static OccurrenceDelayContent DeserializeOccurrenceDelayContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset delay = default; + IList resourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("delay"u8)) + { + delay = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + resourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OccurrenceDelayContent(delay, resourceIds, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceDelayContent)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceDelayContent 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 DeserializeOccurrenceDelayContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceDelayContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceDelayContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceDelayContent.cs new file mode 100644 index 000000000000..c016475851d8 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceDelayContent.cs @@ -0,0 +1,83 @@ +// 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.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Request to ask for a delay in an occurrence, delay should be set to client local time eg (ACST) 2025-05-30T22:03:00+09:30, (PST) 2025-05-30T06:35:00-07:00. + public partial class OccurrenceDelayContent + { + /// + /// 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 exact time to delay the operations to. + /// The resources that should be delayed. If empty, the delay will apply to the all resources in the occurrence. + /// is null. + public OccurrenceDelayContent(DateTimeOffset delay, IEnumerable resourceIds) + { + Argument.AssertNotNull(resourceIds, nameof(resourceIds)); + + Delay = delay; + ResourceIds = resourceIds.ToList(); + } + + /// Initializes a new instance of . + /// The exact time to delay the operations to. + /// The resources that should be delayed. If empty, the delay will apply to the all resources in the occurrence. + /// Keeps track of any properties unknown to the library. + internal OccurrenceDelayContent(DateTimeOffset delay, IList resourceIds, IDictionary serializedAdditionalRawData) + { + Delay = delay; + ResourceIds = resourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceDelayContent() + { + } + + /// The exact time to delay the operations to. + public DateTimeOffset Delay { get; } + /// The resources that should be delayed. If empty, the delay will apply to the all resources in the occurrence. + public IList ResourceIds { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionProperties.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionProperties.Serialization.cs new file mode 100644 index 000000000000..8e27f7449984 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionProperties.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + public partial class OccurrenceExtensionProperties : 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(OccurrenceExtensionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (Optional.IsCollectionDefined(NotificationSettings)) + { + writer.WritePropertyName("notificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in NotificationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, options); + } + writer.WritePropertyName("scheduledActionId"u8); + writer.WriteStringValue(ScheduledActionId); + 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 + } + } + } + + OccurrenceExtensionProperties 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(OccurrenceExtensionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceExtensionProperties(document.RootElement, options); + } + + internal static OccurrenceExtensionProperties DeserializeOccurrenceExtensionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IReadOnlyList notificationSettings = default; + DateTimeOffset scheduledTime = default; + OccurrenceResourceProvisioningState? provisioningState = default; + ResponseError errorDetails = default; + ResourceIdentifier scheduledActionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + notificationSettings = array; + continue; + } + if (property.NameEquals("scheduledTime"u8)) + { + scheduledTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OccurrenceResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (property.NameEquals("scheduledActionId"u8)) + { + scheduledActionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OccurrenceExtensionProperties( + resourceId, + notificationSettings ?? new ChangeTrackingList(), + scheduledTime, + provisioningState, + errorDetails, + scheduledActionId, + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceExtensionProperties)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceExtensionProperties 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 DeserializeOccurrenceExtensionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceExtensionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionProperties.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionProperties.cs new file mode 100644 index 000000000000..ebe228fdb9db --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionProperties.cs @@ -0,0 +1,111 @@ +// 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.ComputeSchedule.Models +{ + /// The properties of the occurrence extension. + public partial class OccurrenceExtensionProperties + { + /// + /// 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 ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The time the occurrence is scheduled for the resource. Specified in UTC. + /// The arm identifier of the scheduled action the occurrence belongs to. + /// or is null. + internal OccurrenceExtensionProperties(ResourceIdentifier resourceId, DateTimeOffset scheduledOn, ResourceIdentifier scheduledActionId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(scheduledActionId, nameof(scheduledActionId)); + + ResourceId = resourceId; + NotificationSettings = new ChangeTrackingList(); + ScheduledOn = scheduledOn; + ScheduledActionId = scheduledActionId; + } + + /// Initializes a new instance of . + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The desired notification settings for the specified resource. + /// The time the occurrence is scheduled for the resource. Specified in UTC. + /// The current state of the resource. + /// Error details for the resource. Only populated if resource is in failed state. + /// The arm identifier of the scheduled action the occurrence belongs to. + /// Keeps track of any properties unknown to the library. + internal OccurrenceExtensionProperties(ResourceIdentifier resourceId, IReadOnlyList notificationSettings, DateTimeOffset scheduledOn, OccurrenceResourceProvisioningState? provisioningState, ResponseError errorDetails, ResourceIdentifier scheduledActionId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + NotificationSettings = notificationSettings; + ScheduledOn = scheduledOn; + ProvisioningState = provisioningState; + ErrorDetails = errorDetails; + ScheduledActionId = scheduledActionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceExtensionProperties() + { + } + + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + public ResourceIdentifier ResourceId { get; } + /// The desired notification settings for the specified resource. + public IReadOnlyList NotificationSettings { get; } + /// The time the occurrence is scheduled for the resource. Specified in UTC. + public DateTimeOffset ScheduledOn { get; } + /// The current state of the resource. + public OccurrenceResourceProvisioningState? ProvisioningState { get; } + /// Error details for the resource. Only populated if resource is in failed state. + public ResponseError ErrorDetails { get; } + /// The arm identifier of the scheduled action the occurrence belongs to. + public ResourceIdentifier ScheduledActionId { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceData.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceData.Serialization.cs new file mode 100644 index 000000000000..76250cb19c0a --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.ComputeSchedule.Models +{ + public partial class OccurrenceExtensionResourceData : 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(OccurrenceExtensionResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + OccurrenceExtensionResourceData 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(OccurrenceExtensionResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceExtensionResourceData(document.RootElement, options); + } + + internal static OccurrenceExtensionResourceData DeserializeOccurrenceExtensionResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OccurrenceExtensionProperties 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 = OccurrenceExtensionProperties.DeserializeOccurrenceExtensionProperties(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, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OccurrenceExtensionResourceData( + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceExtensionResourceData)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceExtensionResourceData 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 DeserializeOccurrenceExtensionResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceExtensionResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceData.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceData.cs new file mode 100644 index 000000000000..653f318e5156 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceData.cs @@ -0,0 +1,71 @@ +// 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.ComputeSchedule.Models +{ + /// The scheduled action extension. + public partial class OccurrenceExtensionResourceData : 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 . + internal OccurrenceExtensionResourceData() + { + } + + /// 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 OccurrenceExtensionResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, OccurrenceExtensionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public OccurrenceExtensionProperties Properties { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceListResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceListResult.Serialization.cs new file mode 100644 index 000000000000..7ea0886658ad --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ComputeSchedule.Models +{ + internal partial class OccurrenceExtensionResourceListResult : 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(OccurrenceExtensionResourceListResult)} 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 + } + } + } + + OccurrenceExtensionResourceListResult 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(OccurrenceExtensionResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceExtensionResourceListResult(document.RootElement, options); + } + + internal static OccurrenceExtensionResourceListResult DeserializeOccurrenceExtensionResourceListResult(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(OccurrenceExtensionResourceData.DeserializeOccurrenceExtensionResourceData(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 OccurrenceExtensionResourceListResult(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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceExtensionResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceExtensionResourceListResult 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 DeserializeOccurrenceExtensionResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceExtensionResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceListResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceListResult.cs new file mode 100644 index 000000000000..ae234f39c9c8 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceExtensionResourceListResult.cs @@ -0,0 +1,80 @@ +// 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.ComputeSchedule.Models +{ + /// The response of a OccurrenceExtensionResource list operation. + internal partial class OccurrenceExtensionResourceListResult + { + /// + /// 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 OccurrenceExtensionResource items on this page. + /// is null. + internal OccurrenceExtensionResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OccurrenceExtensionResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OccurrenceExtensionResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceExtensionResourceListResult() + { + } + + /// The OccurrenceExtensionResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceListResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceListResult.Serialization.cs new file mode 100644 index 000000000000..a7d407222e32 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ComputeSchedule.Models +{ + internal partial class OccurrenceListResult : 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(OccurrenceListResult)} 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 + } + } + } + + OccurrenceListResult 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(OccurrenceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceListResult(document.RootElement, options); + } + + internal static OccurrenceListResult DeserializeOccurrenceListResult(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(ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(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 OccurrenceListResult(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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceListResult)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceListResult 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 DeserializeOccurrenceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceListResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceListResult.cs new file mode 100644 index 000000000000..43f7c8b3c5e7 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceListResult.cs @@ -0,0 +1,80 @@ +// 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.ComputeSchedule.Models +{ + /// The response of a Occurrence list operation. + internal partial class OccurrenceListResult + { + /// + /// 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 Occurrence items on this page. + /// is null. + internal OccurrenceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Occurrence items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OccurrenceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceListResult() + { + } + + /// The Occurrence items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceData.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceData.Serialization.cs new file mode 100644 index 000000000000..545a50fe8e56 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceData.Serialization.cs @@ -0,0 +1,218 @@ +// 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.ComputeSchedule.Models +{ + public partial class OccurrenceResourceData : 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(OccurrenceResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (Optional.IsCollectionDefined(NotificationSettings)) + { + writer.WritePropertyName("notificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in NotificationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, options); + } + } + + OccurrenceResourceData 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(OccurrenceResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceResourceData(document.RootElement, options); + } + + internal static OccurrenceResourceData DeserializeOccurrenceResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IReadOnlyList notificationSettings = default; + DateTimeOffset scheduledTime = default; + OccurrenceResourceProvisioningState? provisioningState = default; + ResponseError errorDetails = 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("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + notificationSettings = array; + continue; + } + if (property.NameEquals("scheduledTime"u8)) + { + scheduledTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OccurrenceResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerComputeScheduleContext.Default); + 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, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OccurrenceResourceData( + id, + name, + type, + systemData, + resourceId, + notificationSettings ?? new ChangeTrackingList(), + scheduledTime, + provisioningState, + errorDetails, + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceResourceData)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceResourceData 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 DeserializeOccurrenceResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceData.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceData.cs new file mode 100644 index 000000000000..7f9c9d02d21c --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceData.cs @@ -0,0 +1,109 @@ +// 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.ComputeSchedule.Models +{ + /// Represents an scheduled action resource metadata. + public partial class OccurrenceResourceData : 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 . + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The time the occurrence is scheduled for the resource. + /// is null. + internal OccurrenceResourceData(ResourceIdentifier resourceId, DateTimeOffset scheduledOn) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + NotificationSettings = new ChangeTrackingList(); + ScheduledOn = scheduledOn; + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The desired notification settings for the specified resource. + /// The time the occurrence is scheduled for the resource. + /// The current state of the resource. + /// Error details for the resource. Only populated if resource is in failed state. + /// Keeps track of any properties unknown to the library. + internal OccurrenceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier resourceId, IReadOnlyList notificationSettings, DateTimeOffset scheduledOn, OccurrenceResourceProvisioningState? provisioningState, ResponseError errorDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ResourceId = resourceId; + NotificationSettings = notificationSettings; + ScheduledOn = scheduledOn; + ProvisioningState = provisioningState; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceResourceData() + { + } + + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + public ResourceIdentifier ResourceId { get; } + /// The desired notification settings for the specified resource. + public IReadOnlyList NotificationSettings { get; } + /// The time the occurrence is scheduled for the resource. + public DateTimeOffset ScheduledOn { get; } + /// The current state of the resource. + public OccurrenceResourceProvisioningState? ProvisioningState { get; } + /// Error details for the resource. Only populated if resource is in failed state. + public ResponseError ErrorDetails { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceListResponse.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceListResponse.Serialization.cs new file mode 100644 index 000000000000..d804f2b5495c --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceListResponse.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ComputeSchedule.Models +{ + internal partial class OccurrenceResourceListResponse : 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(OccurrenceResourceListResponse)} 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 + } + } + } + + OccurrenceResourceListResponse 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(OccurrenceResourceListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceResourceListResponse(document.RootElement, options); + } + + internal static OccurrenceResourceListResponse DeserializeOccurrenceResourceListResponse(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(OccurrenceResourceData.DeserializeOccurrenceResourceData(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 OccurrenceResourceListResponse(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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceResourceListResponse)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceResourceListResponse 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 DeserializeOccurrenceResourceListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceResourceListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceListResponse.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceListResponse.cs new file mode 100644 index 000000000000..c93b2964c6f2 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceListResponse.cs @@ -0,0 +1,80 @@ +// 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.ComputeSchedule.Models +{ + /// Paged collection of OccurrenceResource items. + internal partial class OccurrenceResourceListResponse + { + /// + /// 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 OccurrenceResource items on this page. + /// is null. + internal OccurrenceResourceListResponse(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OccurrenceResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OccurrenceResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceResourceListResponse() + { + } + + /// The OccurrenceResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceProvisioningState.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceProvisioningState.cs new file mode 100644 index 000000000000..8b95b002c077 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResourceProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct OccurrenceResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OccurrenceResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static OccurrenceResourceProvisioningState Succeeded { get; } = new OccurrenceResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static OccurrenceResourceProvisioningState Failed { get; } = new OccurrenceResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static OccurrenceResourceProvisioningState Canceled { get; } = new OccurrenceResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(OccurrenceResourceProvisioningState left, OccurrenceResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OccurrenceResourceProvisioningState left, OccurrenceResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OccurrenceResourceProvisioningState(string value) => new OccurrenceResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OccurrenceResourceProvisioningState other && Equals(other); + /// + public bool Equals(OccurrenceResourceProvisioningState 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResultSummary.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResultSummary.Serialization.cs new file mode 100644 index 000000000000..c3c6bc51ebe5 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResultSummary.Serialization.cs @@ -0,0 +1,144 @@ +// 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.ComputeSchedule.Models +{ + public partial class OccurrenceResultSummary : 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(OccurrenceResultSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); + writer.WritePropertyName("statuses"u8); + writer.WriteStartArray(); + foreach (var item in Statuses) + { + 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 + } + } + } + + OccurrenceResultSummary 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(OccurrenceResultSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOccurrenceResultSummary(document.RootElement, options); + } + + internal static OccurrenceResultSummary DeserializeOccurrenceResultSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int total = default; + IReadOnlyList statuses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("total"u8)) + { + total = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("statuses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceResultSummary.DeserializeResourceResultSummary(item, options)); + } + statuses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OccurrenceResultSummary(total, statuses, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(OccurrenceResultSummary)} does not support writing '{options.Format}' format."); + } + } + + OccurrenceResultSummary 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 DeserializeOccurrenceResultSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OccurrenceResultSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResultSummary.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResultSummary.cs new file mode 100644 index 000000000000..7144602bf34e --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/OccurrenceResultSummary.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.Linq; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The summarized provisioning result of an occurrence. + public partial class OccurrenceResultSummary + { + /// + /// 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 total number of resources that the occurrence was supposed to act on. + /// The summarized status of the resources. + /// is null. + internal OccurrenceResultSummary(int total, IEnumerable statuses) + { + Argument.AssertNotNull(statuses, nameof(statuses)); + + Total = total; + Statuses = statuses.ToList(); + } + + /// Initializes a new instance of . + /// The total number of resources that the occurrence was supposed to act on. + /// The summarized status of the resources. + /// Keeps track of any properties unknown to the library. + internal OccurrenceResultSummary(int total, IReadOnlyList statuses, IDictionary serializedAdditionalRawData) + { + Total = total; + Statuses = statuses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OccurrenceResultSummary() + { + } + + /// The total number of resources that the occurrence was supposed to act on. + public int Total { get; } + /// The summarized status of the resources. + public IReadOnlyList Statuses { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceListResponse.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceListResponse.Serialization.cs new file mode 100644 index 000000000000..4c2e5ee4909e --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceListResponse.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ComputeSchedule.Models +{ + internal partial class ResourceListResponse : 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(ResourceListResponse)} 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 + } + } + } + + ResourceListResponse 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(ResourceListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceListResponse(document.RootElement, options); + } + + internal static ResourceListResponse DeserializeResourceListResponse(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(ScheduledActionResourceData.DeserializeScheduledActionResourceData(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 ResourceListResponse(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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceListResponse)} does not support writing '{options.Format}' format."); + } + } + + ResourceListResponse 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 DeserializeResourceListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceListResponse.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceListResponse.cs new file mode 100644 index 000000000000..f433a0b0f16f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceListResponse.cs @@ -0,0 +1,80 @@ +// 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.ComputeSchedule.Models +{ + /// Paged collection of ScheduledActionResource items. + internal partial class ResourceListResponse + { + /// + /// 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 ScheduledActionResource items on this page. + /// is null. + internal ResourceListResponse(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ScheduledActionResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceListResponse() + { + } + + /// The ScheduledActionResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceProvisionPayload.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceProvisionPayload.Serialization.cs new file mode 100644 index 000000000000..887d12a0ac6e --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceProvisionPayload.Serialization.cs @@ -0,0 +1,249 @@ +// 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.ComputeSchedule.Models +{ + public partial class ResourceProvisionPayload : 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(ResourceProvisionPayload)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(BaseProfile)) + { + writer.WritePropertyName("baseProfile"u8); + writer.WriteStartObject(); + foreach (var item in BaseProfile) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ResourceOverrides)) + { + writer.WritePropertyName("resourceOverrides"u8); + writer.WriteStartArray(); + foreach (var item in ResourceOverrides) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item) + { + writer.WritePropertyName(item0.Key); + if (item0.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item0.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("resourceCount"u8); + writer.WriteNumberValue(ResourceCount); + if (Optional.IsDefined(ResourcePrefix)) + { + writer.WritePropertyName("resourcePrefix"u8); + writer.WriteStringValue(ResourcePrefix); + } + 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 + } + } + } + + ResourceProvisionPayload 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(ResourceProvisionPayload)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProvisionPayload(document.RootElement, options); + } + + internal static ResourceProvisionPayload DeserializeResourceProvisionPayload(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary baseProfile = default; + IList> resourceOverrides = default; + int resourceCount = default; + string resourcePrefix = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + baseProfile = dictionary; + continue; + } + if (property.NameEquals("resourceOverrides"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in item.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + array.Add(dictionary); + } + } + resourceOverrides = array; + continue; + } + if (property.NameEquals("resourceCount"u8)) + { + resourceCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resourcePrefix"u8)) + { + resourcePrefix = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProvisionPayload(baseProfile ?? new ChangeTrackingDictionary(), resourceOverrides ?? new ChangeTrackingList>(), resourceCount, resourcePrefix, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProvisionPayload)} does not support writing '{options.Format}' format."); + } + } + + ResourceProvisionPayload 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 DeserializeResourceProvisionPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProvisionPayload)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceProvisionPayload.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceProvisionPayload.cs new file mode 100644 index 000000000000..b5138c724e06 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceProvisionPayload.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Resource creation data model. + public partial class ResourceProvisionPayload + { + /// + /// 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 . + /// Number of VMs to be created. + public ResourceProvisionPayload(int resourceCount) + { + BaseProfile = new ChangeTrackingDictionary(); + ResourceOverrides = new ChangeTrackingList>(); + ResourceCount = resourceCount; + } + + /// Initializes a new instance of . + /// JSON object that contains VM properties that are common across all VMs in this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in baseProfile). + /// JSON array, that contains VM properties that should to be overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and create a merged VMProfile. + /// Number of VMs to be created. + /// if resourceOverrides doesn't contain "name", service will create name based of prefix and ResourceCount e.g. resourceprefix-0,resourceprefix-1.. + /// Keeps track of any properties unknown to the library. + internal ResourceProvisionPayload(IDictionary baseProfile, IList> resourceOverrides, int resourceCount, string resourcePrefix, IDictionary serializedAdditionalRawData) + { + BaseProfile = baseProfile; + ResourceOverrides = resourceOverrides; + ResourceCount = resourceCount; + ResourcePrefix = resourcePrefix; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceProvisionPayload() + { + } + + /// + /// JSON object that contains VM properties that are common across all VMs in this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in baseProfile) + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary BaseProfile { get; } + /// + /// JSON array, that contains VM properties that should to be overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and create a merged VMProfile. + /// + /// To assign an object to the element 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" }. + /// + /// + /// + /// + public IList> ResourceOverrides { get; } + /// Number of VMs to be created. + public int ResourceCount { get; } + /// if resourceOverrides doesn't contain "name", service will create name based of prefix and ResourceCount e.g. resourceprefix-0,resourceprefix-1.. + public string ResourcePrefix { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceResultSummary.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceResultSummary.Serialization.cs new file mode 100644 index 000000000000..16df3dc274de --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceResultSummary.Serialization.cs @@ -0,0 +1,150 @@ +// 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.ComputeSchedule.Models +{ + public partial class ResourceResultSummary : 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(ResourceResultSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + if (Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, 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 + } + } + } + + ResourceResultSummary 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(ResourceResultSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceResultSummary(document.RootElement, options); + } + + internal static ResourceResultSummary DeserializeResourceResultSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + int count = default; + ResponseError errorDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceResultSummary(code, count, errorDetails, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceResultSummary)} does not support writing '{options.Format}' format."); + } + } + + ResourceResultSummary 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 DeserializeResourceResultSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceResultSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceResultSummary.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceResultSummary.cs new file mode 100644 index 000000000000..022572ab8ce9 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ResourceResultSummary.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; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The status of the resources. + public partial class ResourceResultSummary + { + /// + /// 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 error code for those resources. In case of success, code is populated with Success. + /// The number of resources that the code applies to. + /// is null. + internal ResourceResultSummary(string code, int count) + { + Argument.AssertNotNull(code, nameof(code)); + + Code = code; + Count = count; + } + + /// Initializes a new instance of . + /// The error code for those resources. In case of success, code is populated with Success. + /// The number of resources that the code applies to. + /// The error details for the resources. Not populated on success cases. + /// Keeps track of any properties unknown to the library. + internal ResourceResultSummary(string code, int count, ResponseError errorDetails, IDictionary serializedAdditionalRawData) + { + Code = code; + Count = count; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceResultSummary() + { + } + + /// The error code for those resources. In case of success, code is populated with Success. + public string Code { get; } + /// The number of resources that the code applies to. + public int Count { get; } + /// The error details for the resources. Not populated on success cases. + public ResponseError ErrorDetails { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionListResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionListResult.Serialization.cs new file mode 100644 index 000000000000..9d26b471bc9f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ComputeSchedule.Models +{ + internal partial class ScheduledActionListResult : 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(ScheduledActionListResult)} 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 + } + } + } + + ScheduledActionListResult 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(ScheduledActionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionListResult(document.RootElement, options); + } + + internal static ScheduledActionListResult DeserializeScheduledActionListResult(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(ScheduledActionData.DeserializeScheduledActionData(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 ScheduledActionListResult(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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionListResult)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionListResult 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 DeserializeScheduledActionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionListResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionListResult.cs new file mode 100644 index 000000000000..3d70db224779 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionListResult.cs @@ -0,0 +1,80 @@ +// 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.ComputeSchedule.Models +{ + /// The response of a ScheduledAction list operation. + internal partial class ScheduledActionListResult + { + /// + /// 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 ScheduledAction items on this page. + /// is null. + internal ScheduledActionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ScheduledAction items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionListResult() + { + } + + /// The ScheduledAction items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceProperties.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceProperties.Serialization.cs new file mode 100644 index 000000000000..af4928038e4b --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceProperties.Serialization.cs @@ -0,0 +1,155 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionOccurrenceProperties : 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(ScheduledActionOccurrenceProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn, "O"); + } + if (options.Format != "W") + { + writer.WritePropertyName("resultSummary"u8); + writer.WriteObjectValue(ResultSummary, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + ScheduledActionOccurrenceProperties 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(ScheduledActionOccurrenceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionOccurrenceProperties(document.RootElement, options); + } + + internal static ScheduledActionOccurrenceProperties DeserializeScheduledActionOccurrenceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset scheduledTime = default; + OccurrenceResultSummary resultSummary = default; + ScheduledActionOccurrenceState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scheduledTime"u8)) + { + scheduledTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resultSummary"u8)) + { + resultSummary = OccurrenceResultSummary.DeserializeOccurrenceResultSummary(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ScheduledActionOccurrenceState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionOccurrenceProperties(scheduledTime, resultSummary, provisioningState, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionOccurrenceProperties)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionOccurrenceProperties 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 DeserializeScheduledActionOccurrenceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionOccurrenceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceProperties.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceProperties.cs new file mode 100644 index 000000000000..060189464ee1 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceProperties.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; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Properties for an occurrence. + public partial class ScheduledActionOccurrenceProperties + { + /// + /// 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 time the occurrence is scheduled for. This value can be changed by calling the delay API. + /// The result for occurrences that achieved a terminal state. + internal ScheduledActionOccurrenceProperties(DateTimeOffset scheduledOn, OccurrenceResultSummary resultSummary) + { + ScheduledOn = scheduledOn; + ResultSummary = resultSummary; + } + + /// Initializes a new instance of . + /// The time the occurrence is scheduled for. This value can be changed by calling the delay API. + /// The result for occurrences that achieved a terminal state. + /// The aggregated provisioning state of the occurrence. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionOccurrenceProperties(DateTimeOffset scheduledOn, OccurrenceResultSummary resultSummary, ScheduledActionOccurrenceState? provisioningState, IDictionary serializedAdditionalRawData) + { + ScheduledOn = scheduledOn; + ResultSummary = resultSummary; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionOccurrenceProperties() + { + } + + /// The time the occurrence is scheduled for. This value can be changed by calling the delay API. + public DateTimeOffset ScheduledOn { get; } + /// The result for occurrences that achieved a terminal state. + public OccurrenceResultSummary ResultSummary { get; } + /// The aggregated provisioning state of the occurrence. + public ScheduledActionOccurrenceState? ProvisioningState { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceState.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceState.cs new file mode 100644 index 000000000000..33787dfd81c2 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionOccurrenceState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The state the occurrence is at a given time. + public readonly partial struct ScheduledActionOccurrenceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionOccurrenceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string ReschedulingValue = "Rescheduling"; + private const string ScheduledValue = "Scheduled"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancellingValue = "Cancelling"; + private const string CanceledValue = "Canceled"; + + /// The occurrence was created. + public static ScheduledActionOccurrenceState Created { get; } = new ScheduledActionOccurrenceState(CreatedValue); + /// The occurrence is being rescheduled. + public static ScheduledActionOccurrenceState Rescheduling { get; } = new ScheduledActionOccurrenceState(ReschedulingValue); + /// The occurrence has been scheduled. + public static ScheduledActionOccurrenceState Scheduled { get; } = new ScheduledActionOccurrenceState(ScheduledValue); + /// The occurrence has successfully ran. + public static ScheduledActionOccurrenceState Succeeded { get; } = new ScheduledActionOccurrenceState(SucceededValue); + /// The occurrence has failed during its scheduling. + public static ScheduledActionOccurrenceState Failed { get; } = new ScheduledActionOccurrenceState(FailedValue); + /// The occurrence is going through cancellation. + public static ScheduledActionOccurrenceState Cancelling { get; } = new ScheduledActionOccurrenceState(CancellingValue); + /// The occurrence has been canceled. + public static ScheduledActionOccurrenceState Canceled { get; } = new ScheduledActionOccurrenceState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionOccurrenceState left, ScheduledActionOccurrenceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionOccurrenceState left, ScheduledActionOccurrenceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionOccurrenceState(string value) => new ScheduledActionOccurrenceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionOccurrenceState other && Equals(other); + /// + public bool Equals(ScheduledActionOccurrenceState 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatch.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatch.Serialization.cs new file mode 100644 index 000000000000..3dc024e96c5b --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionPatch : 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(ScheduledActionPatch)} does not support writing '{format}' format."); + } + + 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 (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + ScheduledActionPatch 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(ScheduledActionPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionPatch(document.RootElement, options); + } + + internal static ScheduledActionPatch DeserializeScheduledActionPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ScheduledActionPatchProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ScheduledActionPatchProperties.DeserializeScheduledActionPatchProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionPatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionPatch)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionPatch 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 DeserializeScheduledActionPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatch.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatch.cs new file mode 100644 index 000000000000..a08754f04585 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The type used for update operations of the ScheduledAction. + public partial class ScheduledActionPatch + { + /// + /// 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 ScheduledActionPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionPatch(IDictionary tags, ScheduledActionPatchProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public ScheduledActionPatchProperties Properties { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatchProperties.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatchProperties.Serialization.cs new file mode 100644 index 000000000000..5bb385b909af --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatchProperties.Serialization.cs @@ -0,0 +1,241 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionPatchProperties : 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(ScheduledActionPatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType.Value.ToString()); + } + if (Optional.IsDefined(ActionType)) + { + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.Value.ToString()); + } + 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(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + } + if (Optional.IsCollectionDefined(NotificationSettings)) + { + writer.WritePropertyName("notificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in NotificationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Disabled)) + { + writer.WritePropertyName("disabled"u8); + writer.WriteBooleanValue(Disabled.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 + } + } + } + + ScheduledActionPatchProperties 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(ScheduledActionPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionPatchProperties(document.RootElement, options); + } + + internal static ScheduledActionPatchProperties DeserializeScheduledActionPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionResourceType? resourceType = default; + ScheduledActionType? actionType = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + ScheduledActionsSchedule schedule = default; + IList notificationSettings = default; + bool? disabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ScheduledActionResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("actionType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionType = new ScheduledActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedule = ScheduledActionsSchedule.DeserializeScheduledActionsSchedule(property.Value, options); + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + notificationSettings = array; + continue; + } + if (property.NameEquals("disabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionPatchProperties( + resourceType, + actionType, + startTime, + endTime, + schedule, + notificationSettings ?? new ChangeTrackingList(), + disabled, + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionPatchProperties 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 DeserializeScheduledActionPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatchProperties.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatchProperties.cs new file mode 100644 index 000000000000..77fce05c1cbc --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionPatchProperties.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; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The updatable properties of the ScheduledAction. + public partial class ScheduledActionPatchProperties + { + /// + /// 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 ScheduledActionPatchProperties() + { + NotificationSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The time when the scheduled action is supposed to stop scheduling. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// Tell if the scheduled action is disabled or not. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionPatchProperties(ScheduledActionResourceType? resourceType, ScheduledActionType? actionType, DateTimeOffset? startOn, DateTimeOffset? endOn, ScheduledActionsSchedule schedule, IList notificationSettings, bool? disabled, IDictionary serializedAdditionalRawData) + { + ResourceType = resourceType; + ActionType = actionType; + StartOn = startOn; + EndOn = endOn; + Schedule = schedule; + NotificationSettings = notificationSettings; + Disabled = disabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of resource the scheduled action is targeting. + public ScheduledActionResourceType? ResourceType { get; set; } + /// The action the scheduled action should perform in the resources. + public ScheduledActionType? ActionType { get; set; } + /// The time which the scheduled action is supposed to start running. + public DateTimeOffset? StartOn { get; set; } + /// The time when the scheduled action is supposed to stop scheduling. + public DateTimeOffset? EndOn { get; set; } + /// The schedule the scheduled action is supposed to follow. + public ScheduledActionsSchedule Schedule { get; set; } + /// The notification settings for the scheduled action. + public IList NotificationSettings { get; } + /// Tell if the scheduled action is disabled or not. + public bool? Disabled { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionProperties.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionProperties.Serialization.cs new file mode 100644 index 000000000000..0977427449b4 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionProperties.Serialization.cs @@ -0,0 +1,222 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionProperties : 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(ScheduledActionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType.ToString()); + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.ToString()); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn, "O"); + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + writer.WritePropertyName("notificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in NotificationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(Disabled)) + { + writer.WritePropertyName("disabled"u8); + writer.WriteBooleanValue(Disabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + ScheduledActionProperties 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(ScheduledActionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionProperties(document.RootElement, options); + } + + internal static ScheduledActionProperties DeserializeScheduledActionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionResourceType resourceType = default; + ScheduledActionType actionType = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + ScheduledActionsSchedule schedule = default; + IList notificationSettings = default; + bool? disabled = default; + ScheduledActionResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + resourceType = new ScheduledActionResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("actionType"u8)) + { + actionType = new ScheduledActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("schedule"u8)) + { + schedule = ScheduledActionsSchedule.DeserializeScheduledActionsSchedule(property.Value, options); + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + notificationSettings = array; + continue; + } + if (property.NameEquals("disabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ScheduledActionResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionProperties( + resourceType, + actionType, + startTime, + endTime, + schedule, + notificationSettings, + disabled, + provisioningState, + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionProperties)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionProperties 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 DeserializeScheduledActionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionProperties.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionProperties.cs new file mode 100644 index 000000000000..c5da05f1767e --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionProperties.cs @@ -0,0 +1,113 @@ +// 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.ComputeSchedule.Models +{ + /// Scheduled action properties. + public partial class ScheduledActionProperties + { + /// + /// 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 type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// or is null. + public ScheduledActionProperties(ScheduledActionResourceType resourceType, ScheduledActionType actionType, DateTimeOffset startOn, ScheduledActionsSchedule schedule, IEnumerable notificationSettings) + { + Argument.AssertNotNull(schedule, nameof(schedule)); + Argument.AssertNotNull(notificationSettings, nameof(notificationSettings)); + + ResourceType = resourceType; + ActionType = actionType; + StartOn = startOn; + Schedule = schedule; + NotificationSettings = notificationSettings.ToList(); + } + + /// Initializes a new instance of . + /// The type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The time when the scheduled action is supposed to stop scheduling. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// Tell if the scheduled action is disabled or not. + /// The status of the last provisioning operation performed on the resource. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionProperties(ScheduledActionResourceType resourceType, ScheduledActionType actionType, DateTimeOffset startOn, DateTimeOffset? endOn, ScheduledActionsSchedule schedule, IList notificationSettings, bool? disabled, ScheduledActionResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ResourceType = resourceType; + ActionType = actionType; + StartOn = startOn; + EndOn = endOn; + Schedule = schedule; + NotificationSettings = notificationSettings; + Disabled = disabled; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionProperties() + { + } + + /// The type of resource the scheduled action is targeting. + public ScheduledActionResourceType ResourceType { get; set; } + /// The action the scheduled action should perform in the resources. + public ScheduledActionType ActionType { get; set; } + /// The time which the scheduled action is supposed to start running. + public DateTimeOffset StartOn { get; set; } + /// The time when the scheduled action is supposed to stop scheduling. + public DateTimeOffset? EndOn { get; set; } + /// The schedule the scheduled action is supposed to follow. + public ScheduledActionsSchedule Schedule { get; set; } + /// The notification settings for the scheduled action. + public IList NotificationSettings { get; } + /// Tell if the scheduled action is disabled or not. + public bool? Disabled { get; set; } + /// The status of the last provisioning operation performed on the resource. + public ScheduledActionResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceAttachContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceAttachContent.Serialization.cs new file mode 100644 index 000000000000..768d120a00bb --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceAttachContent.Serialization.cs @@ -0,0 +1,136 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResourceAttachContent : 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(ScheduledActionResourceAttachContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + 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 + } + } + } + + ScheduledActionResourceAttachContent 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(ScheduledActionResourceAttachContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourceAttachContent(document.RootElement, options); + } + + internal static ScheduledActionResourceAttachContent DeserializeScheduledActionResourceAttachContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScheduledActionResourceData.DeserializeScheduledActionResourceData(item, options)); + } + resources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResourceAttachContent(resources, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceAttachContent)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourceAttachContent 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 DeserializeScheduledActionResourceAttachContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceAttachContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceAttachContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceAttachContent.cs new file mode 100644 index 000000000000..12739d4beb78 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceAttachContent.cs @@ -0,0 +1,76 @@ +// 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.ComputeSchedule.Models +{ + /// Request model to attach a list of scheduled action resources. + public partial class ScheduledActionResourceAttachContent + { + /// + /// 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 . + /// List of resources to be attached/patched. + /// is null. + public ScheduledActionResourceAttachContent(IEnumerable resources) + { + Argument.AssertNotNull(resources, nameof(resources)); + + Resources = resources.ToList(); + } + + /// Initializes a new instance of . + /// List of resources to be attached/patched. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourceAttachContent(IList resources, IDictionary serializedAdditionalRawData) + { + Resources = resources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourceAttachContent() + { + } + + /// List of resources to be attached/patched. + public IList Resources { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceData.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceData.Serialization.cs new file mode 100644 index 000000000000..557ab18ab2cb --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceData.Serialization.cs @@ -0,0 +1,174 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResourceData : 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(ScheduledActionResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (Optional.IsCollectionDefined(NotificationSettings)) + { + writer.WritePropertyName("notificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in NotificationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ScheduledActionResourceData 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(ScheduledActionResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourceData(document.RootElement, options); + } + + internal static ScheduledActionResourceData DeserializeScheduledActionResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IList notificationSettings = 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("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + notificationSettings = array; + 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, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResourceData( + id, + name, + type, + systemData, + resourceId, + notificationSettings ?? 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceData)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourceData 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 DeserializeScheduledActionResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceData.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceData.cs new file mode 100644 index 000000000000..90a885b95c8f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceData.cs @@ -0,0 +1,95 @@ +// 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.ComputeSchedule.Models +{ + /// Represents an scheduled action resource metadata. + public partial class ScheduledActionResourceData : 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 . + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// is null. + public ScheduledActionResourceData(ResourceIdentifier resourceId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + NotificationSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + /// The desired notification settings for the specified resource. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier resourceId, IList notificationSettings, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ResourceId = resourceId; + NotificationSettings = notificationSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourceData() + { + } + + /// + /// The ARM Id of the resource. + /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + /// + public ResourceIdentifier ResourceId { get; set; } + /// The desired notification settings for the specified resource. + public IList NotificationSettings { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceDetachContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceDetachContent.Serialization.cs new file mode 100644 index 000000000000..ff1db15f460b --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceDetachContent.Serialization.cs @@ -0,0 +1,148 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResourceDetachContent : 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(ScheduledActionResourceDetachContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + 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 + } + } + } + + ScheduledActionResourceDetachContent 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(ScheduledActionResourceDetachContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourceDetachContent(document.RootElement, options); + } + + internal static ScheduledActionResourceDetachContent DeserializeScheduledActionResourceDetachContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + resources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResourceDetachContent(resources, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceDetachContent)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourceDetachContent 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 DeserializeScheduledActionResourceDetachContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceDetachContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceDetachContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceDetachContent.cs new file mode 100644 index 000000000000..6dd1a99d7840 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceDetachContent.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 System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Request model to detach a list of scheduled action resources. + public partial class ScheduledActionResourceDetachContent + { + /// + /// 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 . + /// List of resources to be detached. + /// is null. + public ScheduledActionResourceDetachContent(IEnumerable resources) + { + Argument.AssertNotNull(resources, nameof(resources)); + + Resources = resources.ToList(); + } + + /// Initializes a new instance of . + /// List of resources to be detached. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourceDetachContent(IList resources, IDictionary serializedAdditionalRawData) + { + Resources = resources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourceDetachContent() + { + } + + /// List of resources to be detached. + public IList Resources { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationResult.Serialization.cs new file mode 100644 index 000000000000..11520536ad4a --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationResult.Serialization.cs @@ -0,0 +1,144 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResourceOperationResult : 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(ScheduledActionResourceOperationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("totalResources"u8); + writer.WriteNumberValue(TotalResources); + writer.WritePropertyName("resourcesStatuses"u8); + writer.WriteStartArray(); + foreach (var item in ResourcesStatuses) + { + 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 + } + } + } + + ScheduledActionResourceOperationResult 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(ScheduledActionResourceOperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourceOperationResult(document.RootElement, options); + } + + internal static ScheduledActionResourceOperationResult DeserializeScheduledActionResourceOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int totalResources = default; + IReadOnlyList resourcesStatuses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalResources"u8)) + { + totalResources = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resourcesStatuses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScheduledActionResourceStatus.DeserializeScheduledActionResourceStatus(item, options)); + } + resourcesStatuses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResourceOperationResult(totalResources, resourcesStatuses, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceOperationResult)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourceOperationResult 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 DeserializeScheduledActionResourceOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceOperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationResult.cs new file mode 100644 index 000000000000..fee71ec669ee --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationResult.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.Linq; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The response from scheduled action resource requests, which contains the status of each resource. + public partial class ScheduledActionResourceOperationResult + { + /// + /// 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 total number of resources operated on. + /// The resource status of for each resource. + /// is null. + internal ScheduledActionResourceOperationResult(int totalResources, IEnumerable resourcesStatuses) + { + Argument.AssertNotNull(resourcesStatuses, nameof(resourcesStatuses)); + + TotalResources = totalResources; + ResourcesStatuses = resourcesStatuses.ToList(); + } + + /// Initializes a new instance of . + /// The total number of resources operated on. + /// The resource status of for each resource. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourceOperationResult(int totalResources, IReadOnlyList resourcesStatuses, IDictionary serializedAdditionalRawData) + { + TotalResources = totalResources; + ResourcesStatuses = resourcesStatuses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourceOperationResult() + { + } + + /// The total number of resources operated on. + public int TotalResources { get; } + /// The resource status of for each resource. + public IReadOnlyList ResourcesStatuses { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationStatus.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationStatus.cs new file mode 100644 index 000000000000..3c57d812c97e --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceOperationStatus.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.ComputeSchedule.Models +{ + /// The state the resource is on after the resource operation is applied. + public readonly partial struct ScheduledActionResourceOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionResourceOperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// The resource operation was successful. + public static ScheduledActionResourceOperationStatus Succeeded { get; } = new ScheduledActionResourceOperationStatus(SucceededValue); + /// The resource operation has failed. + public static ScheduledActionResourceOperationStatus Failed { get; } = new ScheduledActionResourceOperationStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionResourceOperationStatus left, ScheduledActionResourceOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionResourceOperationStatus left, ScheduledActionResourceOperationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionResourceOperationStatus(string value) => new ScheduledActionResourceOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionResourceOperationStatus other && Equals(other); + /// + public bool Equals(ScheduledActionResourceOperationStatus 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcePatchContent.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcePatchContent.Serialization.cs new file mode 100644 index 000000000000..c7f9559383cb --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcePatchContent.Serialization.cs @@ -0,0 +1,136 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResourcePatchContent : 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(ScheduledActionResourcePatchContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + 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 + } + } + } + + ScheduledActionResourcePatchContent 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(ScheduledActionResourcePatchContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourcePatchContent(document.RootElement, options); + } + + internal static ScheduledActionResourcePatchContent DeserializeScheduledActionResourcePatchContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScheduledActionResourceData.DeserializeScheduledActionResourceData(item, options)); + } + resources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResourcePatchContent(resources, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourcePatchContent)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourcePatchContent 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 DeserializeScheduledActionResourcePatchContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourcePatchContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcePatchContent.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcePatchContent.cs new file mode 100644 index 000000000000..b3054dc76f12 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcePatchContent.cs @@ -0,0 +1,76 @@ +// 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.ComputeSchedule.Models +{ + /// Request model perform a resource operation in a list of resources. + public partial class ScheduledActionResourcePatchContent + { + /// + /// 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 list of resources we watch to patch. + /// is null. + public ScheduledActionResourcePatchContent(IEnumerable resources) + { + Argument.AssertNotNull(resources, nameof(resources)); + + Resources = resources.ToList(); + } + + /// Initializes a new instance of . + /// The list of resources we watch to patch. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourcePatchContent(IList resources, IDictionary serializedAdditionalRawData) + { + Resources = resources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourcePatchContent() + { + } + + /// The list of resources we watch to patch. + public IList Resources { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceProvisioningState.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceProvisioningState.cs new file mode 100644 index 000000000000..3ce4fe2192e9 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Provisioning state. + public readonly partial struct ScheduledActionResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionResourceProvisioningState(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 DeletingValue = "Deleting"; + + /// Resource has been created. + public static ScheduledActionResourceProvisioningState Succeeded { get; } = new ScheduledActionResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static ScheduledActionResourceProvisioningState Failed { get; } = new ScheduledActionResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ScheduledActionResourceProvisioningState Canceled { get; } = new ScheduledActionResourceProvisioningState(CanceledValue); + /// Resource is being deleted. + public static ScheduledActionResourceProvisioningState Deleting { get; } = new ScheduledActionResourceProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionResourceProvisioningState left, ScheduledActionResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionResourceProvisioningState left, ScheduledActionResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionResourceProvisioningState(string value) => new ScheduledActionResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionResourceProvisioningState other && Equals(other); + /// + public bool Equals(ScheduledActionResourceProvisioningState 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceStatus.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceStatus.Serialization.cs new file mode 100644 index 000000000000..d10093ea79e4 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceStatus.Serialization.cs @@ -0,0 +1,150 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResourceStatus : 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(ScheduledActionResourceStatus)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + ((IJsonModel)Error).Write(writer, 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 + } + } + } + + ScheduledActionResourceStatus 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(ScheduledActionResourceStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourceStatus(document.RootElement, options); + } + + internal static ScheduledActionResourceStatus DeserializeScheduledActionResourceStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + ScheduledActionResourceOperationStatus status = default; + ResponseError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new ScheduledActionResourceOperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResourceStatus(resourceId, status, error, 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceStatus)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourceStatus 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 DeserializeScheduledActionResourceStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourceStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceStatus.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceStatus.cs new file mode 100644 index 000000000000..5a4f18b46331 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceStatus.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 Azure.Core; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// The status of a resource after a resource level operation was performed. + public partial class ScheduledActionResourceStatus + { + /// + /// 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 arm identifier of the resource. + /// The state the resource is currently on. + /// is null. + internal ScheduledActionResourceStatus(ResourceIdentifier resourceId, ScheduledActionResourceOperationStatus status) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + Status = status; + } + + /// Initializes a new instance of . + /// The arm identifier of the resource. + /// The state the resource is currently on. + /// Errors encountered while trying to perform. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourceStatus(ResourceIdentifier resourceId, ScheduledActionResourceOperationStatus status, ResponseError error, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + Status = status; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourceStatus() + { + } + + /// The arm identifier of the resource. + public ResourceIdentifier ResourceId { get; } + /// The state the resource is currently on. + public ScheduledActionResourceOperationStatus Status { get; } + /// Errors encountered while trying to perform. + public ResponseError Error { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceType.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceType.cs new file mode 100644 index 000000000000..8e9aac9acbc7 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourceType.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.ComputeSchedule.Models +{ + /// The type of resource being targeted. + public readonly partial struct ScheduledActionResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string VirtualMachineValue = "VirtualMachine"; + private const string VirtualMachineScaleSetValue = "VirtualMachineScaleSet"; + + /// Resources defined are Virtual Machines. + public static ScheduledActionResourceType VirtualMachine { get; } = new ScheduledActionResourceType(VirtualMachineValue); + /// Resources defined are Virtual Machines Scale Sets. + public static ScheduledActionResourceType VirtualMachineScaleSet { get; } = new ScheduledActionResourceType(VirtualMachineScaleSetValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionResourceType left, ScheduledActionResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionResourceType left, ScheduledActionResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionResourceType(string value) => new ScheduledActionResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionResourceType other && Equals(other); + /// + public bool Equals(ScheduledActionResourceType 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResources.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResources.Serialization.cs new file mode 100644 index 000000000000..e5ab64275a1c --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResources.Serialization.cs @@ -0,0 +1,155 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionResources : 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(ScheduledActionResources)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ScheduledActionResources 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(ScheduledActionResources)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResources(document.RootElement, options); + } + + internal static ScheduledActionResources DeserializeScheduledActionResources(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionsExtensionProperties 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 = ScheduledActionsExtensionProperties.DeserializeScheduledActionsExtensionProperties(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, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionResources( + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResources)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResources 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 DeserializeScheduledActionResources(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResources)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResources.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResources.cs new file mode 100644 index 000000000000..28c3fd9c1428 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResources.cs @@ -0,0 +1,71 @@ +// 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.ComputeSchedule.Models +{ + /// The scheduled action extension. + public partial class ScheduledActionResources : 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 . + internal ScheduledActionResources() + { + } + + /// 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 ScheduledActionResources(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ScheduledActionsExtensionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ScheduledActionsExtensionProperties Properties { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcesListResult.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcesListResult.Serialization.cs new file mode 100644 index 000000000000..483812116454 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcesListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ComputeSchedule.Models +{ + internal partial class ScheduledActionResourcesListResult : 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(ScheduledActionResourcesListResult)} 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 + } + } + } + + ScheduledActionResourcesListResult 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(ScheduledActionResourcesListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionResourcesListResult(document.RootElement, options); + } + + internal static ScheduledActionResourcesListResult DeserializeScheduledActionResourcesListResult(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(ScheduledActionResources.DeserializeScheduledActionResources(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 ScheduledActionResourcesListResult(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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionResourcesListResult)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionResourcesListResult 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 DeserializeScheduledActionResourcesListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionResourcesListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcesListResult.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcesListResult.cs new file mode 100644 index 000000000000..afb28a605a22 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionResourcesListResult.cs @@ -0,0 +1,80 @@ +// 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.ComputeSchedule.Models +{ + /// The response of a ScheduledActionResources list operation. + internal partial class ScheduledActionResourcesListResult + { + /// + /// 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 ScheduledActionResources items on this page. + /// is null. + internal ScheduledActionResourcesListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ScheduledActionResources items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionResourcesListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionResourcesListResult() + { + } + + /// The ScheduledActionResources items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionType.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionType.cs new file mode 100644 index 000000000000..ea214bae5b36 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Specify which action user wants to be performed on the resources. + public readonly partial struct ScheduledActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartValue = "Start"; + private const string DeallocateValue = "Deallocate"; + private const string HibernateValue = "Hibernate"; + + /// Perform a start action on the specified resources. + public static ScheduledActionType Start { get; } = new ScheduledActionType(StartValue); + /// Perform a deallocate action on the specified resources. + public static ScheduledActionType Deallocate { get; } = new ScheduledActionType(DeallocateValue); + /// Perform hibernate and deallocate on the specified resources. + public static ScheduledActionType Hibernate { get; } = new ScheduledActionType(HibernateValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionType left, ScheduledActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionType left, ScheduledActionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionType(string value) => new ScheduledActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionType other && Equals(other); + /// + public bool Equals(ScheduledActionType 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsExtensionProperties.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsExtensionProperties.Serialization.cs new file mode 100644 index 000000000000..ce3b84d78d6c --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsExtensionProperties.Serialization.cs @@ -0,0 +1,248 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionsExtensionProperties : 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(ScheduledActionsExtensionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType.ToString()); + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.ToString()); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn, "O"); + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + writer.WritePropertyName("notificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in NotificationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(Disabled)) + { + writer.WritePropertyName("disabled"u8); + writer.WriteBooleanValue(Disabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ResourceNotificationSettings)) + { + writer.WritePropertyName("resourceNotificationSettings"u8); + writer.WriteStartArray(); + foreach (var item in ResourceNotificationSettings) + { + 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 + } + } + } + + ScheduledActionsExtensionProperties 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(ScheduledActionsExtensionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionsExtensionProperties(document.RootElement, options); + } + + internal static ScheduledActionsExtensionProperties DeserializeScheduledActionsExtensionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionResourceType resourceType = default; + ScheduledActionType actionType = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + ScheduledActionsSchedule schedule = default; + IReadOnlyList notificationSettings = default; + bool? disabled = default; + ScheduledActionResourceProvisioningState? provisioningState = default; + IReadOnlyList resourceNotificationSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + resourceType = new ScheduledActionResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("actionType"u8)) + { + actionType = new ScheduledActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("schedule"u8)) + { + schedule = ScheduledActionsSchedule.DeserializeScheduledActionsSchedule(property.Value, options); + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + notificationSettings = array; + continue; + } + if (property.NameEquals("disabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ScheduledActionResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceNotificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NotificationSettings.DeserializeNotificationSettings(item, options)); + } + resourceNotificationSettings = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionsExtensionProperties( + resourceType, + actionType, + startTime, + endTime, + schedule, + notificationSettings, + disabled, + provisioningState, + resourceNotificationSettings ?? 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionsExtensionProperties)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionsExtensionProperties 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 DeserializeScheduledActionsExtensionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionsExtensionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsExtensionProperties.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsExtensionProperties.cs new file mode 100644 index 000000000000..01ac56c3a4f1 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsExtensionProperties.cs @@ -0,0 +1,118 @@ +// 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.ComputeSchedule.Models +{ + /// Scheduled action extension properties. + public partial class ScheduledActionsExtensionProperties + { + /// + /// 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 type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// or is null. + internal ScheduledActionsExtensionProperties(ScheduledActionResourceType resourceType, ScheduledActionType actionType, DateTimeOffset startOn, ScheduledActionsSchedule schedule, IEnumerable notificationSettings) + { + Argument.AssertNotNull(schedule, nameof(schedule)); + Argument.AssertNotNull(notificationSettings, nameof(notificationSettings)); + + ResourceType = resourceType; + ActionType = actionType; + StartOn = startOn; + Schedule = schedule; + NotificationSettings = notificationSettings.ToList(); + ResourceNotificationSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of resource the scheduled action is targeting. + /// The action the scheduled action should perform in the resources. + /// The time which the scheduled action is supposed to start running. + /// The time when the scheduled action is supposed to stop scheduling. + /// The schedule the scheduled action is supposed to follow. + /// The notification settings for the scheduled action. + /// Tell if the scheduled action is disabled or not. + /// The status of the last provisioning operation performed on the resource. + /// The notification settings for the scheduled action at a resource level. Resource level notification settings are scope to specific resources only and submitted through attach requests. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionsExtensionProperties(ScheduledActionResourceType resourceType, ScheduledActionType actionType, DateTimeOffset startOn, DateTimeOffset? endOn, ScheduledActionsSchedule schedule, IReadOnlyList notificationSettings, bool? disabled, ScheduledActionResourceProvisioningState? provisioningState, IReadOnlyList resourceNotificationSettings, IDictionary serializedAdditionalRawData) + { + ResourceType = resourceType; + ActionType = actionType; + StartOn = startOn; + EndOn = endOn; + Schedule = schedule; + NotificationSettings = notificationSettings; + Disabled = disabled; + ProvisioningState = provisioningState; + ResourceNotificationSettings = resourceNotificationSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionsExtensionProperties() + { + } + + /// The type of resource the scheduled action is targeting. + public ScheduledActionResourceType ResourceType { get; } + /// The action the scheduled action should perform in the resources. + public ScheduledActionType ActionType { get; } + /// The time which the scheduled action is supposed to start running. + public DateTimeOffset StartOn { get; } + /// The time when the scheduled action is supposed to stop scheduling. + public DateTimeOffset? EndOn { get; } + /// The schedule the scheduled action is supposed to follow. + public ScheduledActionsSchedule Schedule { get; } + /// The notification settings for the scheduled action. + public IReadOnlyList NotificationSettings { get; } + /// Tell if the scheduled action is disabled or not. + public bool? Disabled { get; } + /// The status of the last provisioning operation performed on the resource. + public ScheduledActionResourceProvisioningState? ProvisioningState { get; } + /// The notification settings for the scheduled action at a resource level. Resource level notification settings are scope to specific resources only and submitted through attach requests. + public IReadOnlyList ResourceNotificationSettings { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsSchedule.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsSchedule.Serialization.cs new file mode 100644 index 000000000000..5ebb769ebc78 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsSchedule.Serialization.cs @@ -0,0 +1,226 @@ +// 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.ComputeSchedule.Models +{ + public partial class ScheduledActionsSchedule : 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(ScheduledActionsSchedule)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledTime, "T"); + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + writer.WritePropertyName("requestedWeekDays"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWeekDays) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + writer.WritePropertyName("requestedMonths"u8); + writer.WriteStartArray(); + foreach (var item in RequestedMonths) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + writer.WritePropertyName("requestedDaysOfTheMonth"u8); + writer.WriteStartArray(); + foreach (var item in RequestedDaysOfTheMonth) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(ExecutionParameters)) + { + writer.WritePropertyName("executionParameters"u8); + writer.WriteObjectValue(ExecutionParameters, options); + } + if (Optional.IsDefined(DeadlineType)) + { + writer.WritePropertyName("deadlineType"u8); + writer.WriteStringValue(DeadlineType.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 + } + } + } + + ScheduledActionsSchedule 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(ScheduledActionsSchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionsSchedule(document.RootElement, options); + } + + internal static ScheduledActionsSchedule DeserializeScheduledActionsSchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TimeSpan scheduledTime = default; + string timeZone = default; + IList requestedWeekDays = default; + IList requestedMonths = default; + IList requestedDaysOfTheMonth = default; + ScheduledActionExecutionParameterDetail executionParameters = default; + ScheduledActionDeadlineType? deadlineType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scheduledTime"u8)) + { + scheduledTime = property.Value.GetTimeSpan("T"); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("requestedWeekDays"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ScheduledActionsScheduleWeekDay(item.GetString())); + } + requestedWeekDays = array; + continue; + } + if (property.NameEquals("requestedMonths"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ScheduledActionsScheduleMonth(item.GetString())); + } + requestedMonths = array; + continue; + } + if (property.NameEquals("requestedDaysOfTheMonth"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + requestedDaysOfTheMonth = array; + continue; + } + if (property.NameEquals("executionParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionParameters = ScheduledActionExecutionParameterDetail.DeserializeScheduledActionExecutionParameterDetail(property.Value, options); + continue; + } + if (property.NameEquals("deadlineType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deadlineType = new ScheduledActionDeadlineType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionsSchedule( + scheduledTime, + timeZone, + requestedWeekDays, + requestedMonths, + requestedDaysOfTheMonth, + executionParameters, + deadlineType, + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionsSchedule)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionsSchedule 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 DeserializeScheduledActionsSchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionsSchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsSchedule.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsSchedule.cs new file mode 100644 index 000000000000..97cf2bd3e8f3 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsSchedule.cs @@ -0,0 +1,111 @@ +// 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.ComputeSchedule.Models +{ + /// Specify the schedule in which the scheduled action is supposed to follow. + public partial class ScheduledActionsSchedule + { + /// + /// 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 time the scheduled action is supposed to run on. + /// The timezone the scheduled time is specified on. + /// The week days the scheduled action is supposed to run on. + /// The months the scheduled action is supposed to run on. + /// The days of the month the scheduled action is supposed to run on. If empty, it means it will run on every day of the month. + /// , , or is null. + public ScheduledActionsSchedule(TimeSpan scheduledTime, string timeZone, IEnumerable requestedWeekDays, IEnumerable requestedMonths, IEnumerable requestedDaysOfTheMonth) + { + Argument.AssertNotNull(timeZone, nameof(timeZone)); + Argument.AssertNotNull(requestedWeekDays, nameof(requestedWeekDays)); + Argument.AssertNotNull(requestedMonths, nameof(requestedMonths)); + Argument.AssertNotNull(requestedDaysOfTheMonth, nameof(requestedDaysOfTheMonth)); + + ScheduledTime = scheduledTime; + TimeZone = timeZone; + RequestedWeekDays = requestedWeekDays.ToList(); + RequestedMonths = requestedMonths.ToList(); + RequestedDaysOfTheMonth = requestedDaysOfTheMonth.ToList(); + } + + /// Initializes a new instance of . + /// The time the scheduled action is supposed to run on. + /// The timezone the scheduled time is specified on. + /// The week days the scheduled action is supposed to run on. + /// The months the scheduled action is supposed to run on. + /// The days of the month the scheduled action is supposed to run on. If empty, it means it will run on every day of the month. + /// The execution parameters the scheduled action is supposed to follow. + /// The type of deadline the scheduled action is supposed to follow for the schedule. If no value is passed, it will default to InitiateAt. + /// Keeps track of any properties unknown to the library. + internal ScheduledActionsSchedule(TimeSpan scheduledTime, string timeZone, IList requestedWeekDays, IList requestedMonths, IList requestedDaysOfTheMonth, ScheduledActionExecutionParameterDetail executionParameters, ScheduledActionDeadlineType? deadlineType, IDictionary serializedAdditionalRawData) + { + ScheduledTime = scheduledTime; + TimeZone = timeZone; + RequestedWeekDays = requestedWeekDays; + RequestedMonths = requestedMonths; + RequestedDaysOfTheMonth = requestedDaysOfTheMonth; + ExecutionParameters = executionParameters; + DeadlineType = deadlineType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionsSchedule() + { + } + + /// The time the scheduled action is supposed to run on. + public TimeSpan ScheduledTime { get; set; } + /// The timezone the scheduled time is specified on. + public string TimeZone { get; set; } + /// The week days the scheduled action is supposed to run on. + public IList RequestedWeekDays { get; } + /// The months the scheduled action is supposed to run on. + public IList RequestedMonths { get; } + /// The days of the month the scheduled action is supposed to run on. If empty, it means it will run on every day of the month. + public IList RequestedDaysOfTheMonth { get; } + /// The execution parameters the scheduled action is supposed to follow. + public ScheduledActionExecutionParameterDetail ExecutionParameters { get; set; } + /// The type of deadline the scheduled action is supposed to follow for the schedule. If no value is passed, it will default to InitiateAt. + public ScheduledActionDeadlineType? DeadlineType { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsScheduleMonth.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsScheduleMonth.cs new file mode 100644 index 000000000000..dc669cd80fc9 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsScheduleMonth.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Representation of the months available selection in a gregorian calendar. + public readonly partial struct ScheduledActionsScheduleMonth : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionsScheduleMonth(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JanuaryValue = "January"; + private const string FebruaryValue = "February"; + private const string MarchValue = "March"; + private const string AprilValue = "April"; + private const string MayValue = "May"; + private const string JuneValue = "June"; + private const string JulyValue = "July"; + private const string AugustValue = "August"; + private const string SeptemberValue = "September"; + private const string OctoberValue = "October"; + private const string NovemberValue = "November"; + private const string DecemberValue = "December"; + private const string AllValue = "All"; + + /// The January month. + public static ScheduledActionsScheduleMonth January { get; } = new ScheduledActionsScheduleMonth(JanuaryValue); + /// The February month. + public static ScheduledActionsScheduleMonth February { get; } = new ScheduledActionsScheduleMonth(FebruaryValue); + /// The March month. + public static ScheduledActionsScheduleMonth March { get; } = new ScheduledActionsScheduleMonth(MarchValue); + /// The April month. + public static ScheduledActionsScheduleMonth April { get; } = new ScheduledActionsScheduleMonth(AprilValue); + /// The May month. + public static ScheduledActionsScheduleMonth May { get; } = new ScheduledActionsScheduleMonth(MayValue); + /// The June month. + public static ScheduledActionsScheduleMonth June { get; } = new ScheduledActionsScheduleMonth(JuneValue); + /// The July month. + public static ScheduledActionsScheduleMonth July { get; } = new ScheduledActionsScheduleMonth(JulyValue); + /// The August month. + public static ScheduledActionsScheduleMonth August { get; } = new ScheduledActionsScheduleMonth(AugustValue); + /// The September month. + public static ScheduledActionsScheduleMonth September { get; } = new ScheduledActionsScheduleMonth(SeptemberValue); + /// The October month. + public static ScheduledActionsScheduleMonth October { get; } = new ScheduledActionsScheduleMonth(OctoberValue); + /// The November month. + public static ScheduledActionsScheduleMonth November { get; } = new ScheduledActionsScheduleMonth(NovemberValue); + /// The December month. + public static ScheduledActionsScheduleMonth December { get; } = new ScheduledActionsScheduleMonth(DecemberValue); + /// All months. + public static ScheduledActionsScheduleMonth All { get; } = new ScheduledActionsScheduleMonth(AllValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionsScheduleMonth left, ScheduledActionsScheduleMonth right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionsScheduleMonth left, ScheduledActionsScheduleMonth right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionsScheduleMonth(string value) => new ScheduledActionsScheduleMonth(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionsScheduleMonth other && Equals(other); + /// + public bool Equals(ScheduledActionsScheduleMonth 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsScheduleWeekDay.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsScheduleWeekDay.cs new file mode 100644 index 000000000000..de30058e3485 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/Models/ScheduledActionsScheduleWeekDay.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ComputeSchedule.Models +{ + /// Representation of the possible selection of days in a week in a gregorian calendar. + public readonly partial struct ScheduledActionsScheduleWeekDay : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduledActionsScheduleWeekDay(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MondayValue = "Monday"; + private const string TuesdayValue = "Tuesday"; + private const string WednesdayValue = "Wednesday"; + private const string ThursdayValue = "Thursday"; + private const string FridayValue = "Friday"; + private const string SaturdayValue = "Saturday"; + private const string SundayValue = "Sunday"; + private const string AllValue = "All"; + + /// Monday weekday. + public static ScheduledActionsScheduleWeekDay Monday { get; } = new ScheduledActionsScheduleWeekDay(MondayValue); + /// Tuesday weekday. + public static ScheduledActionsScheduleWeekDay Tuesday { get; } = new ScheduledActionsScheduleWeekDay(TuesdayValue); + /// Wednesday weekday. + public static ScheduledActionsScheduleWeekDay Wednesday { get; } = new ScheduledActionsScheduleWeekDay(WednesdayValue); + /// Thursday weekday. + public static ScheduledActionsScheduleWeekDay Thursday { get; } = new ScheduledActionsScheduleWeekDay(ThursdayValue); + /// Friday weekday. + public static ScheduledActionsScheduleWeekDay Friday { get; } = new ScheduledActionsScheduleWeekDay(FridayValue); + /// Saturday weekday. + public static ScheduledActionsScheduleWeekDay Saturday { get; } = new ScheduledActionsScheduleWeekDay(SaturdayValue); + /// Sunday weekday. + public static ScheduledActionsScheduleWeekDay Sunday { get; } = new ScheduledActionsScheduleWeekDay(SundayValue); + /// All week days. + public static ScheduledActionsScheduleWeekDay All { get; } = new ScheduledActionsScheduleWeekDay(AllValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduledActionsScheduleWeekDay left, ScheduledActionsScheduleWeekDay right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduledActionsScheduleWeekDay left, ScheduledActionsScheduleWeekDay right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScheduledActionsScheduleWeekDay(string value) => new ScheduledActionsScheduleWeekDay(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduledActionsScheduleWeekDay other && Equals(other); + /// + public bool Equals(ScheduledActionsScheduleWeekDay 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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/OccurrenceExtensionRestOperations.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/OccurrenceExtensionRestOperations.cs new file mode 100644 index 000000000000..3de3ed2c6f14 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/OccurrenceExtensionRestOperations.cs @@ -0,0 +1,189 @@ +// 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.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + internal partial class OccurrenceExtensionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OccurrenceExtensionRestOperations. + /// 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 OccurrenceExtensionRestOperations(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-04-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetAssociatedOccurrencesRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/associatedOccurrences", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAssociatedOccurrencesRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/associatedOccurrences", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OccurrenceExtensionResource resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> GetAssociatedOccurrencesAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedOccurrencesRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OccurrenceExtensionResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OccurrenceExtensionResourceListResult.DeserializeOccurrenceExtensionResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OccurrenceExtensionResource resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response GetAssociatedOccurrences(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedOccurrencesRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OccurrenceExtensionResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OccurrenceExtensionResourceListResult.DeserializeOccurrenceExtensionResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAssociatedOccurrencesNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetAssociatedOccurrencesNextPageRequest(string nextLink, string resourceUri) + { + 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 OccurrenceExtensionResource resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> GetAssociatedOccurrencesNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedOccurrencesNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OccurrenceExtensionResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OccurrenceExtensionResourceListResult.DeserializeOccurrenceExtensionResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OccurrenceExtensionResource resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response GetAssociatedOccurrencesNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedOccurrencesNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OccurrenceExtensionResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OccurrenceExtensionResourceListResult.DeserializeOccurrenceExtensionResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/OccurrencesRestOperations.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/OccurrencesRestOperations.cs new file mode 100644 index 000000000000..8262b070e33f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/OccurrencesRestOperations.cs @@ -0,0 +1,723 @@ +// 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.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + internal partial class OccurrencesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OccurrencesRestOperations. + /// 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 OccurrencesRestOperations(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-04-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Occurrence. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// 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 scheduledActionName, string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionOccurrenceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ScheduledActionOccurrenceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Occurrence. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// 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 scheduledActionName, string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionOccurrenceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ScheduledActionOccurrenceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByScheduledActionRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByScheduledActionRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Occurrence resources by ScheduledAction. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByScheduledActionAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateListByScheduledActionRequest(subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OccurrenceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OccurrenceListResult.DeserializeOccurrenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Occurrence resources by ScheduledAction. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByScheduledAction(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateListByScheduledActionRequest(subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OccurrenceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OccurrenceListResult.DeserializeOccurrenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAttachedResourcesRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAttachedResourcesRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List resources attached to Scheduled Actions for the given occurrence. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAttachedResourcesAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var message = CreateGetAttachedResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OccurrenceResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OccurrenceResourceListResponse.DeserializeOccurrenceResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List resources attached to Scheduled Actions for the given occurrence. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetAttachedResources(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var message = CreateGetAttachedResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OccurrenceResourceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OccurrenceResourceListResponse.DeserializeOccurrenceResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceCancelContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceCancelContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendPath("/cancel", 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; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// 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> CancelAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// 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 Cancel(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDelayRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceDelayContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendPath("/delay", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDelayRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceDelayContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/occurrences/", false); + uri.AppendPath(occurrenceId, true); + uri.AppendPath("/delay", 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; + } + + /// A long-running resource action. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// 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 DelayAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceDelayContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDelayRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId, 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); + } + } + + /// A long-running resource action. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// 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 Delay(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, OccurrenceDelayContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDelayRequest(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByScheduledActionNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByScheduledActionNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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 Occurrence resources by ScheduledAction. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByScheduledActionNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateListByScheduledActionNextPageRequest(nextLink, subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OccurrenceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OccurrenceListResult.DeserializeOccurrenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Occurrence resources by ScheduledAction. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByScheduledActionNextPage(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateListByScheduledActionNextPageRequest(nextLink, subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OccurrenceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OccurrenceListResult.DeserializeOccurrenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAttachedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetAttachedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + 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 resources attached to Scheduled Actions for the given occurrence. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAttachedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var message = CreateGetAttachedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OccurrenceResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OccurrenceResourceListResponse.DeserializeOccurrenceResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List resources attached to Scheduled Actions for the given occurrence. + /// 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 ScheduledAction. + /// The name of the Occurrence. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetAttachedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var message = CreateGetAttachedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OccurrenceResourceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OccurrenceResourceListResponse.DeserializeOccurrenceResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionExtensionRestOperations.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionExtensionRestOperations.cs new file mode 100644 index 000000000000..dd134a1d24c4 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionExtensionRestOperations.cs @@ -0,0 +1,189 @@ +// 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.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + internal partial class ScheduledActionExtensionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ScheduledActionExtensionRestOperations. + /// 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 ScheduledActionExtensionRestOperations(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-04-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetAssociatedScheduledActionsRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/associatedScheduledActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAssociatedScheduledActionsRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/associatedScheduledActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ScheduledActionResources resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> GetAssociatedScheduledActionsAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedScheduledActionsRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourcesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourcesListResult.DeserializeScheduledActionResourcesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ScheduledActionResources resources by parent. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response GetAssociatedScheduledActions(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedScheduledActionsRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourcesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourcesListResult.DeserializeScheduledActionResourcesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAssociatedScheduledActionsNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetAssociatedScheduledActionsNextPageRequest(string nextLink, string resourceUri) + { + 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 ScheduledActionResources resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> GetAssociatedScheduledActionsNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedScheduledActionsNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourcesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourcesListResult.DeserializeScheduledActionResourcesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ScheduledActionResources resources by parent. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response GetAssociatedScheduledActionsNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateGetAssociatedScheduledActionsNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourcesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourcesListResult.DeserializeScheduledActionResourcesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs index f97f477230fb..912bc624b0b6 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/RestOperations/ScheduledActionsRestOperations.cs @@ -32,11 +32,11 @@ public ScheduledActionsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-01"; + _apiVersion = apiVersion ?? "2025-04-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateSubmitVirtualMachineDeallocateRequestUri(string subscriptionId, string locationparameter, SubmitDeallocateContent content) + internal RequestUriBuilder CreateSubmitVirtualMachineDeallocateRequestUri(string subscriptionId, AzureLocation locationparameter, SubmitDeallocateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -49,7 +49,7 @@ internal RequestUriBuilder CreateSubmitVirtualMachineDeallocateRequestUri(string return uri; } - internal HttpMessage CreateSubmitVirtualMachineDeallocateRequest(string subscriptionId, string locationparameter, SubmitDeallocateContent content) + internal HttpMessage CreateSubmitVirtualMachineDeallocateRequest(string subscriptionId, AzureLocation locationparameter, SubmitDeallocateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -77,12 +77,11 @@ internal HttpMessage CreateSubmitVirtualMachineDeallocateRequest(string subscrip /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> SubmitVirtualMachineDeallocateAsync(string subscriptionId, string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> SubmitVirtualMachineDeallocateAsync(string subscriptionId, AzureLocation locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateSubmitVirtualMachineDeallocateRequest(subscriptionId, locationparameter, content); @@ -106,12 +105,11 @@ public async Task> SubmitVirtualMach /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response SubmitVirtualMachineDeallocate(string subscriptionId, string locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response SubmitVirtualMachineDeallocate(string subscriptionId, AzureLocation locationparameter, SubmitDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateSubmitVirtualMachineDeallocateRequest(subscriptionId, locationparameter, content); @@ -130,7 +128,7 @@ public Response SubmitVirtualMachineDeallocat } } - internal RequestUriBuilder CreateSubmitVirtualMachineHibernateRequestUri(string subscriptionId, string locationparameter, SubmitHibernateContent content) + internal RequestUriBuilder CreateSubmitVirtualMachineHibernateRequestUri(string subscriptionId, AzureLocation locationparameter, SubmitHibernateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -143,7 +141,7 @@ internal RequestUriBuilder CreateSubmitVirtualMachineHibernateRequestUri(string return uri; } - internal HttpMessage CreateSubmitVirtualMachineHibernateRequest(string subscriptionId, string locationparameter, SubmitHibernateContent content) + internal HttpMessage CreateSubmitVirtualMachineHibernateRequest(string subscriptionId, AzureLocation locationparameter, SubmitHibernateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -171,12 +169,11 @@ internal HttpMessage CreateSubmitVirtualMachineHibernateRequest(string subscript /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> SubmitVirtualMachineHibernateAsync(string subscriptionId, string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> SubmitVirtualMachineHibernateAsync(string subscriptionId, AzureLocation locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateSubmitVirtualMachineHibernateRequest(subscriptionId, locationparameter, content); @@ -200,12 +197,11 @@ public async Task> SubmitVirtualMachi /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response SubmitVirtualMachineHibernate(string subscriptionId, string locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response SubmitVirtualMachineHibernate(string subscriptionId, AzureLocation locationparameter, SubmitHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateSubmitVirtualMachineHibernateRequest(subscriptionId, locationparameter, content); @@ -224,7 +220,7 @@ public Response SubmitVirtualMachineHibernate( } } - internal RequestUriBuilder CreateSubmitVirtualMachineStartRequestUri(string subscriptionId, string locationparameter, SubmitStartContent content) + internal RequestUriBuilder CreateSubmitVirtualMachineStartRequestUri(string subscriptionId, AzureLocation locationparameter, SubmitStartContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -237,7 +233,7 @@ internal RequestUriBuilder CreateSubmitVirtualMachineStartRequestUri(string subs return uri; } - internal HttpMessage CreateSubmitVirtualMachineStartRequest(string subscriptionId, string locationparameter, SubmitStartContent content) + internal HttpMessage CreateSubmitVirtualMachineStartRequest(string subscriptionId, AzureLocation locationparameter, SubmitStartContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -265,12 +261,11 @@ internal HttpMessage CreateSubmitVirtualMachineStartRequest(string subscriptionI /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> SubmitVirtualMachineStartAsync(string subscriptionId, string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> SubmitVirtualMachineStartAsync(string subscriptionId, AzureLocation locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateSubmitVirtualMachineStartRequest(subscriptionId, locationparameter, content); @@ -294,12 +289,11 @@ public async Task> SubmitVirtualMachineSt /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response SubmitVirtualMachineStart(string subscriptionId, string locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response SubmitVirtualMachineStart(string subscriptionId, AzureLocation locationparameter, SubmitStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateSubmitVirtualMachineStartRequest(subscriptionId, locationparameter, content); @@ -318,7 +312,7 @@ public Response SubmitVirtualMachineStart(string s } } - internal RequestUriBuilder CreateExecuteVirtualMachineDeallocateRequestUri(string subscriptionId, string locationparameter, ExecuteDeallocateContent content) + internal RequestUriBuilder CreateExecuteVirtualMachineDeallocateRequestUri(string subscriptionId, AzureLocation locationparameter, ExecuteDeallocateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -331,7 +325,7 @@ internal RequestUriBuilder CreateExecuteVirtualMachineDeallocateRequestUri(strin return uri; } - internal HttpMessage CreateExecuteVirtualMachineDeallocateRequest(string subscriptionId, string locationparameter, ExecuteDeallocateContent content) + internal HttpMessage CreateExecuteVirtualMachineDeallocateRequest(string subscriptionId, AzureLocation locationparameter, ExecuteDeallocateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -359,12 +353,11 @@ internal HttpMessage CreateExecuteVirtualMachineDeallocateRequest(string subscri /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ExecuteVirtualMachineDeallocateAsync(string subscriptionId, string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExecuteVirtualMachineDeallocateAsync(string subscriptionId, AzureLocation locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateExecuteVirtualMachineDeallocateRequest(subscriptionId, locationparameter, content); @@ -388,12 +381,11 @@ public async Task> ExecuteVirtualMac /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ExecuteVirtualMachineDeallocate(string subscriptionId, string locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ExecuteVirtualMachineDeallocate(string subscriptionId, AzureLocation locationparameter, ExecuteDeallocateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateExecuteVirtualMachineDeallocateRequest(subscriptionId, locationparameter, content); @@ -412,7 +404,7 @@ public Response ExecuteVirtualMachineDealloca } } - internal RequestUriBuilder CreateExecuteVirtualMachineHibernateRequestUri(string subscriptionId, string locationparameter, ExecuteHibernateContent content) + internal RequestUriBuilder CreateExecuteVirtualMachineHibernateRequestUri(string subscriptionId, AzureLocation locationparameter, ExecuteHibernateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -425,7 +417,7 @@ internal RequestUriBuilder CreateExecuteVirtualMachineHibernateRequestUri(string return uri; } - internal HttpMessage CreateExecuteVirtualMachineHibernateRequest(string subscriptionId, string locationparameter, ExecuteHibernateContent content) + internal HttpMessage CreateExecuteVirtualMachineHibernateRequest(string subscriptionId, AzureLocation locationparameter, ExecuteHibernateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -453,12 +445,11 @@ internal HttpMessage CreateExecuteVirtualMachineHibernateRequest(string subscrip /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ExecuteVirtualMachineHibernateAsync(string subscriptionId, string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExecuteVirtualMachineHibernateAsync(string subscriptionId, AzureLocation locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateExecuteVirtualMachineHibernateRequest(subscriptionId, locationparameter, content); @@ -482,12 +473,11 @@ public async Task> ExecuteVirtualMach /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ExecuteVirtualMachineHibernate(string subscriptionId, string locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ExecuteVirtualMachineHibernate(string subscriptionId, AzureLocation locationparameter, ExecuteHibernateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateExecuteVirtualMachineHibernateRequest(subscriptionId, locationparameter, content); @@ -506,7 +496,7 @@ public Response ExecuteVirtualMachineHibernate } } - internal RequestUriBuilder CreateExecuteVirtualMachineStartRequestUri(string subscriptionId, string locationparameter, ExecuteStartContent content) + internal RequestUriBuilder CreateExecuteVirtualMachineStartRequestUri(string subscriptionId, AzureLocation locationparameter, ExecuteStartContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -519,7 +509,7 @@ internal RequestUriBuilder CreateExecuteVirtualMachineStartRequestUri(string sub return uri; } - internal HttpMessage CreateExecuteVirtualMachineStartRequest(string subscriptionId, string locationparameter, ExecuteStartContent content) + internal HttpMessage CreateExecuteVirtualMachineStartRequest(string subscriptionId, AzureLocation locationparameter, ExecuteStartContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -547,12 +537,11 @@ internal HttpMessage CreateExecuteVirtualMachineStartRequest(string subscription /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ExecuteVirtualMachineStartAsync(string subscriptionId, string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExecuteVirtualMachineStartAsync(string subscriptionId, AzureLocation locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateExecuteVirtualMachineStartRequest(subscriptionId, locationparameter, content); @@ -576,12 +565,11 @@ public async Task> ExecuteVirtualMachineS /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ExecuteVirtualMachineStart(string subscriptionId, string locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ExecuteVirtualMachineStart(string subscriptionId, AzureLocation locationparameter, ExecuteStartContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateExecuteVirtualMachineStartRequest(subscriptionId, locationparameter, content); @@ -600,7 +588,191 @@ public Response ExecuteVirtualMachineStart(string } } - internal RequestUriBuilder CreateGetVirtualMachineOperationStatusRequestUri(string subscriptionId, string locationparameter, GetOperationStatusContent content) + internal RequestUriBuilder CreateExecuteVirtualMachineCreateOperationRequestUri(string subscriptionId, AzureLocation locationparameter, ExecuteCreateContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/locations/", false); + uri.AppendPath(locationparameter, true); + uri.AppendPath("/virtualMachinesExecuteCreate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateExecuteVirtualMachineCreateOperationRequest(string subscriptionId, AzureLocation locationparameter, ExecuteCreateContent 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("/providers/Microsoft.ComputeSchedule/locations/", false); + uri.AppendPath(locationparameter, true); + uri.AppendPath("/virtualMachinesExecuteCreate", 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; + } + + /// VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExecuteVirtualMachineCreateOperationAsync(string subscriptionId, AzureLocation locationparameter, ExecuteCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExecuteVirtualMachineCreateOperationRequest(subscriptionId, locationparameter, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CreateResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CreateResourceOperationResult.DeserializeCreateResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ExecuteVirtualMachineCreateOperation(string subscriptionId, AzureLocation locationparameter, ExecuteCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExecuteVirtualMachineCreateOperationRequest(subscriptionId, locationparameter, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CreateResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CreateResourceOperationResult.DeserializeCreateResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateExecuteVirtualMachineDeleteOperationRequestUri(string subscriptionId, AzureLocation locationparameter, ExecuteDeleteContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/locations/", false); + uri.AppendPath(locationparameter, true); + uri.AppendPath("/virtualMachinesExecuteDelete", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateExecuteVirtualMachineDeleteOperationRequest(string subscriptionId, AzureLocation locationparameter, ExecuteDeleteContent 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("/providers/Microsoft.ComputeSchedule/locations/", false); + uri.AppendPath(locationparameter, true); + uri.AppendPath("/virtualMachinesExecuteDelete", 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; + } + + /// VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExecuteVirtualMachineDeleteOperationAsync(string subscriptionId, AzureLocation locationparameter, ExecuteDeleteContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExecuteVirtualMachineDeleteOperationRequest(subscriptionId, locationparameter, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeleteResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DeleteResourceOperationResult.DeserializeDeleteResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ExecuteVirtualMachineDeleteOperation(string subscriptionId, AzureLocation locationparameter, ExecuteDeleteContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateExecuteVirtualMachineDeleteOperationRequest(subscriptionId, locationparameter, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeleteResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DeleteResourceOperationResult.DeserializeDeleteResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetVirtualMachineOperationStatusRequestUri(string subscriptionId, AzureLocation locationparameter, GetOperationStatusContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -613,7 +785,7 @@ internal RequestUriBuilder CreateGetVirtualMachineOperationStatusRequestUri(stri return uri; } - internal HttpMessage CreateGetVirtualMachineOperationStatusRequest(string subscriptionId, string locationparameter, GetOperationStatusContent content) + internal HttpMessage CreateGetVirtualMachineOperationStatusRequest(string subscriptionId, AzureLocation locationparameter, GetOperationStatusContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -641,12 +813,11 @@ internal HttpMessage CreateGetVirtualMachineOperationStatusRequest(string subscr /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetVirtualMachineOperationStatusAsync(string subscriptionId, string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetVirtualMachineOperationStatusAsync(string subscriptionId, AzureLocation locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateGetVirtualMachineOperationStatusRequest(subscriptionId, locationparameter, content); @@ -670,12 +841,11 @@ public async Task> GetVirtualMachineOperation /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetVirtualMachineOperationStatus(string subscriptionId, string locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetVirtualMachineOperationStatus(string subscriptionId, AzureLocation locationparameter, GetOperationStatusContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateGetVirtualMachineOperationStatusRequest(subscriptionId, locationparameter, content); @@ -694,7 +864,7 @@ public Response GetVirtualMachineOperationStatus(strin } } - internal RequestUriBuilder CreateCancelVirtualMachineOperationsRequestUri(string subscriptionId, string locationparameter, CancelOperationsContent content) + internal RequestUriBuilder CreateCancelVirtualMachineOperationsRequestUri(string subscriptionId, AzureLocation locationparameter, CancelOperationsContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -707,7 +877,7 @@ internal RequestUriBuilder CreateCancelVirtualMachineOperationsRequestUri(string return uri; } - internal HttpMessage CreateCancelVirtualMachineOperationsRequest(string subscriptionId, string locationparameter, CancelOperationsContent content) + internal HttpMessage CreateCancelVirtualMachineOperationsRequest(string subscriptionId, AzureLocation locationparameter, CancelOperationsContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -735,12 +905,11 @@ internal HttpMessage CreateCancelVirtualMachineOperationsRequest(string subscrip /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> CancelVirtualMachineOperationsAsync(string subscriptionId, string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CancelVirtualMachineOperationsAsync(string subscriptionId, AzureLocation locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateCancelVirtualMachineOperationsRequest(subscriptionId, locationparameter, content); @@ -764,12 +933,11 @@ public async Task> CancelVirtualMachineOperatio /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response CancelVirtualMachineOperations(string subscriptionId, string locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CancelVirtualMachineOperations(string subscriptionId, AzureLocation locationparameter, CancelOperationsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateCancelVirtualMachineOperationsRequest(subscriptionId, locationparameter, content); @@ -788,7 +956,7 @@ public Response CancelVirtualMachineOperations(string su } } - internal RequestUriBuilder CreateGetVirtualMachineOperationErrorsRequestUri(string subscriptionId, string locationparameter, GetOperationErrorsContent content) + internal RequestUriBuilder CreateGetVirtualMachineOperationErrorsRequestUri(string subscriptionId, AzureLocation locationparameter, GetOperationErrorsContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -801,7 +969,7 @@ internal RequestUriBuilder CreateGetVirtualMachineOperationErrorsRequestUri(stri return uri; } - internal HttpMessage CreateGetVirtualMachineOperationErrorsRequest(string subscriptionId, string locationparameter, GetOperationErrorsContent content) + internal HttpMessage CreateGetVirtualMachineOperationErrorsRequest(string subscriptionId, AzureLocation locationparameter, GetOperationErrorsContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -829,12 +997,11 @@ internal HttpMessage CreateGetVirtualMachineOperationErrorsRequest(string subscr /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetVirtualMachineOperationErrorsAsync(string subscriptionId, string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetVirtualMachineOperationErrorsAsync(string subscriptionId, AzureLocation locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateGetVirtualMachineOperationErrorsRequest(subscriptionId, locationparameter, content); @@ -858,12 +1025,11 @@ public async Task> GetVirtualMachineOperation /// The location name. /// The request body. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetVirtualMachineOperationErrors(string subscriptionId, string locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetVirtualMachineOperationErrors(string subscriptionId, AzureLocation locationparameter, GetOperationErrorsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(locationparameter, nameof(locationparameter)); Argument.AssertNotNull(content, nameof(content)); using var message = CreateGetVirtualMachineOperationErrorsRequest(subscriptionId, locationparameter, content); @@ -881,5 +1047,1542 @@ public Response GetVirtualMachineOperationErrors(strin throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionData.DeserializeScheduledActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ScheduledActionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionData.DeserializeScheduledActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ScheduledActionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionData 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, 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; + } + + /// Create a ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, ScheduledActionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, scheduledActionName, 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 ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, ScheduledActionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, scheduledActionName, 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 scheduledActionName, ScheduledActionPatch 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionPatch 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, 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; + } + + /// Update a ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, ScheduledActionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, scheduledActionName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionData.DeserializeScheduledActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, ScheduledActionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, scheduledActionName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionData.DeserializeScheduledActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, scheduledActionName); + 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 ScheduledAction. + /// 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 ScheduledAction. + /// 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 scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, scheduledActionName); + _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.ComputeSchedule/scheduledActions", 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.ComputeSchedule/scheduledActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ScheduledAction 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) + { + 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: + { + ScheduledActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(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.ComputeSchedule/scheduledActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.ComputeSchedule/scheduledActions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAttachedResourcesRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAttachedResourcesRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List resources attached to Scheduled Actions. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAttachedResourcesAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateGetAttachedResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ResourceListResponse.DeserializeResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List resources attached to Scheduled Actions. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAttachedResources(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateGetAttachedResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ResourceListResponse.DeserializeResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateAttachResourcesRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceAttachContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/attachResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAttachResourcesRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceAttachContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/attachResources", 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; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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> AttachResourcesAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceAttachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateAttachResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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 AttachResources(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceAttachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateAttachResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDetachResourcesRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceDetachContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/detachResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDetachResourcesRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceDetachContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/detachResources", 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; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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> DetachResourcesAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceDetachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDetachResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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 DetachResources(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourceDetachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDetachResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePatchResourcesRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourcePatchContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/patchResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePatchResourcesRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourcePatchContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/patchResources", 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; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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> PatchResourcesAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourcePatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePatchResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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 PatchResources(string subscriptionId, string resourceGroupName, string scheduledActionName, ScheduledActionResourcePatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePatchResourcesRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDisableRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDisableRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DisableAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateDisableRequest(subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Disable(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateDisableRequest(subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateEnableRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/enable", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateEnableRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/enable", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task EnableAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateEnableRequest(subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Enable(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateEnableRequest(subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelNextOccurrenceRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName, OccurrenceCancelContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/cancelNextOccurrence", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelNextOccurrenceRequest(string subscriptionId, string resourceGroupName, string scheduledActionName, OccurrenceCancelContent 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/cancelNextOccurrence", 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; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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> CancelNextOccurrenceAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCancelNextOccurrenceRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// 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 CancelNextOccurrence(string subscriptionId, string resourceGroupName, string scheduledActionName, OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCancelNextOccurrenceRequest(subscriptionId, resourceGroupName, scheduledActionName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionResourceOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionResourceOperationResult.DeserializeScheduledActionResourceOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateTriggerManualOccurrenceRequestUri(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/triggerManualOccurrence", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateTriggerManualOccurrenceRequest(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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.ComputeSchedule/scheduledActions/", false); + uri.AppendPath(scheduledActionName, true); + uri.AppendPath("/triggerManualOccurrence", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> TriggerManualOccurrenceAsync(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateTriggerManualOccurrenceRequest(subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionOccurrenceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// A synchronous resource action. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response TriggerManualOccurrence(string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateTriggerManualOccurrenceRequest(subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ScheduledActionOccurrenceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(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); + return message; + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(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); + return message; + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ScheduledAction 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: + { + ScheduledActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ScheduledActionListResult.DeserializeScheduledActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAttachedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetAttachedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName) + { + 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 resources attached to Scheduled Actions. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAttachedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateGetAttachedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, scheduledActionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ResourceListResponse.DeserializeResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List resources attached to Scheduled Actions. + /// 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 ScheduledAction. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAttachedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var message = CreateGetAttachedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, scheduledActionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ResourceListResponse.DeserializeResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionCollection.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionCollection.cs new file mode 100644 index 000000000000..9d27c1949f2f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionCollection.cs @@ -0,0 +1,494 @@ +// 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.ComputeSchedule +{ + /// + /// 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 GetScheduledActions method from an instance of . + /// + public partial class ScheduledActionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _scheduledActionClientDiagnostics; + private readonly ScheduledActionsRestOperations _scheduledActionRestClient; + + /// Initializes a new instance of the class for mocking. + protected ScheduledActionCollection() + { + } + + /// 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 ScheduledActionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scheduledActionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ScheduledActionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ScheduledActionResource.ResourceType, out string scheduledActionApiVersion); + _scheduledActionRestClient = new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scheduledActionApiVersion); +#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 a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-15-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 name of the ScheduledAction. + /// 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 scheduledActionName, ScheduledActionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, data, cancellationToken).ConfigureAwait(false); + var operation = new ComputeScheduleArmOperation(new ScheduledActionOperationSource(Client), _scheduledActionClientDiagnostics, Pipeline, _scheduledActionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, 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 a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-04-15-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 name of the ScheduledAction. + /// 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 scheduledActionName, ScheduledActionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, data, cancellationToken); + var operation = new ComputeScheduleArmOperation(new ScheduledActionOperationSource(Client), _scheduledActionClientDiagnostics, Pipeline, _scheduledActionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.Get"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.Get"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ScheduledAction resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions + /// + /// + /// Operation Id + /// ScheduledAction_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-04-15-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) => _scheduledActionRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ScheduledActionResource(Client, ScheduledActionData.DeserializeScheduledActionData(e)), _scheduledActionClientDiagnostics, Pipeline, "ScheduledActionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ScheduledAction resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions + /// + /// + /// Operation Id + /// ScheduledAction_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-04-15-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) => _scheduledActionRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ScheduledActionResource(Client, ScheduledActionData.DeserializeScheduledActionData(e)), _scheduledActionClientDiagnostics, Pipeline, "ScheduledActionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.Exists"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, 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.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.Exists"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, 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.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionResource(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.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ScheduledAction. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string scheduledActionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(scheduledActionName, nameof(scheduledActionName)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, scheduledActionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionResource(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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionData.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionData.Serialization.cs new file mode 100644 index 000000000000..7bbfc28ff600 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionData.Serialization.cs @@ -0,0 +1,179 @@ +// 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.ComputeSchedule.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + public partial class ScheduledActionData : 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(ScheduledActionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ScheduledActionData 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(ScheduledActionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionData(document.RootElement, options); + } + + internal static ScheduledActionData DeserializeScheduledActionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionProperties 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 = ScheduledActionProperties.DeserializeScheduledActionProperties(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, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionData( + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionData)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionData 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 DeserializeScheduledActionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionData.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionData.cs new file mode 100644 index 000000000000..1b268a5c9820 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionData.cs @@ -0,0 +1,83 @@ +// 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.ComputeSchedule.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + /// + /// A class representing the ScheduledAction data model. + /// The scheduled action resource + /// + public partial class ScheduledActionData : 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 ScheduledActionData(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 ScheduledActionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ScheduledActionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledActionData() + { + } + + /// The resource-specific properties for this resource. + public ScheduledActionProperties Properties { get; set; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceCollection.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceCollection.cs new file mode 100644 index 000000000000..a19c34b33c21 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceCollection.cs @@ -0,0 +1,395 @@ +// 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.ComputeSchedule +{ + /// + /// 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 GetScheduledActionOccurrences method from an instance of . + /// + public partial class ScheduledActionOccurrenceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _scheduledActionOccurrenceOccurrencesClientDiagnostics; + private readonly OccurrencesRestOperations _scheduledActionOccurrenceOccurrencesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ScheduledActionOccurrenceCollection() + { + } + + /// 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 ScheduledActionOccurrenceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scheduledActionOccurrenceOccurrencesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ScheduledActionOccurrenceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ScheduledActionOccurrenceResource.ResourceType, out string scheduledActionOccurrenceOccurrencesApiVersion); + _scheduledActionOccurrenceOccurrencesRestClient = new OccurrencesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scheduledActionOccurrenceOccurrencesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ScheduledActionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ScheduledActionResource.ResourceType), nameof(id)); + } + + /// + /// Get a Occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceCollection.Get"); + scope.Start(); + try + { + var response = await _scheduledActionOccurrenceOccurrencesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, occurrenceId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionOccurrenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceCollection.Get"); + scope.Start(); + try + { + var response = _scheduledActionOccurrenceOccurrencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, occurrenceId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionOccurrenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Occurrence resources by ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences + /// + /// + /// Operation Id + /// Occurrence_ListByScheduledAction + /// + /// + /// Default Api Version + /// 2025-04-15-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) => _scheduledActionOccurrenceOccurrencesRestClient.CreateListByScheduledActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionOccurrenceOccurrencesRestClient.CreateListByScheduledActionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ScheduledActionOccurrenceResource(Client, ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(e)), _scheduledActionOccurrenceOccurrencesClientDiagnostics, Pipeline, "ScheduledActionOccurrenceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Occurrence resources by ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences + /// + /// + /// Operation Id + /// Occurrence_ListByScheduledAction + /// + /// + /// Default Api Version + /// 2025-04-15-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) => _scheduledActionOccurrenceOccurrencesRestClient.CreateListByScheduledActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionOccurrenceOccurrencesRestClient.CreateListByScheduledActionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ScheduledActionOccurrenceResource(Client, ScheduledActionOccurrenceData.DeserializeScheduledActionOccurrenceData(e)), _scheduledActionOccurrenceOccurrencesClientDiagnostics, Pipeline, "ScheduledActionOccurrenceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceCollection.Exists"); + scope.Start(); + try + { + var response = await _scheduledActionOccurrenceOccurrencesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, occurrenceId, 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.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceCollection.Exists"); + scope.Start(); + try + { + var response = _scheduledActionOccurrenceOccurrencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, occurrenceId, 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.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _scheduledActionOccurrenceOccurrencesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, occurrenceId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionOccurrenceResource(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.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string occurrenceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(occurrenceId, nameof(occurrenceId)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _scheduledActionOccurrenceOccurrencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, occurrenceId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionOccurrenceResource(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/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceData.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceData.Serialization.cs new file mode 100644 index 000000000000..1e2569e6454f --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceData.Serialization.cs @@ -0,0 +1,156 @@ +// 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.ComputeSchedule.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + public partial class ScheduledActionOccurrenceData : 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(ScheduledActionOccurrenceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ScheduledActionOccurrenceData 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(ScheduledActionOccurrenceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledActionOccurrenceData(document.RootElement, options); + } + + internal static ScheduledActionOccurrenceData DeserializeScheduledActionOccurrenceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScheduledActionOccurrenceProperties 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 = ScheduledActionOccurrenceProperties.DeserializeScheduledActionOccurrenceProperties(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, AzureResourceManagerComputeScheduleContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledActionOccurrenceData( + 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, AzureResourceManagerComputeScheduleContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduledActionOccurrenceData)} does not support writing '{options.Format}' format."); + } + } + + ScheduledActionOccurrenceData 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 DeserializeScheduledActionOccurrenceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledActionOccurrenceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceData.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceData.cs new file mode 100644 index 000000000000..93db560041d0 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceData.cs @@ -0,0 +1,75 @@ +// 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.ComputeSchedule.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + /// + /// A class representing the ScheduledActionOccurrence data model. + /// Concrete proxy resource types can be created by aliasing this type using a specific property type. + /// + public partial class ScheduledActionOccurrenceData : 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 . + internal ScheduledActionOccurrenceData() + { + } + + /// 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 ScheduledActionOccurrenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ScheduledActionOccurrenceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ScheduledActionOccurrenceProperties Properties { get; } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceResource.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceResource.Serialization.cs new file mode 100644 index 000000000000..39a7c9daaff6 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.ComputeSchedule +{ + public partial class ScheduledActionOccurrenceResource : IJsonModel + { + private static ScheduledActionOccurrenceData s_dataDeserializationInstance; + private static ScheduledActionOccurrenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ScheduledActionOccurrenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeScheduleContext.Default); + + ScheduledActionOccurrenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeScheduleContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceResource.cs new file mode 100644 index 000000000000..e16d4da0958e --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionOccurrenceResource.cs @@ -0,0 +1,409 @@ +// 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 Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ComputeSchedule.Models; + +namespace Azure.ResourceManager.ComputeSchedule +{ + /// + /// A Class representing a ScheduledActionOccurrence 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 GetScheduledActionOccurrenceResource method. + /// Otherwise you can get one from its parent resource using the GetScheduledActionOccurrence method. + /// + public partial class ScheduledActionOccurrenceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The scheduledActionName. + /// The occurrenceId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scheduledActionName, string occurrenceId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _scheduledActionOccurrenceOccurrencesClientDiagnostics; + private readonly OccurrencesRestOperations _scheduledActionOccurrenceOccurrencesRestClient; + private readonly ScheduledActionOccurrenceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ComputeSchedule/scheduledActions/occurrences"; + + /// Initializes a new instance of the class for mocking. + protected ScheduledActionOccurrenceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ScheduledActionOccurrenceResource(ArmClient client, ScheduledActionOccurrenceData 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 ScheduledActionOccurrenceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scheduledActionOccurrenceOccurrencesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string scheduledActionOccurrenceOccurrencesApiVersion); + _scheduledActionOccurrenceOccurrencesRestClient = new OccurrencesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scheduledActionOccurrenceOccurrencesApiVersion); +#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 ScheduledActionOccurrenceData 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 Occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceResource.Get"); + scope.Start(); + try + { + var response = await _scheduledActionOccurrenceOccurrencesRestClient.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 ScheduledActionOccurrenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceResource.Get"); + scope.Start(); + try + { + var response = _scheduledActionOccurrenceOccurrencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionOccurrenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List resources attached to Scheduled Actions for the given occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/resources + /// + /// + /// Operation Id + /// OccurrenceResource_GetAttachedResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAttachedResourcesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scheduledActionOccurrenceOccurrencesRestClient.CreateGetAttachedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionOccurrenceOccurrencesRestClient.CreateGetAttachedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OccurrenceResourceData.DeserializeOccurrenceResourceData(e), _scheduledActionOccurrenceOccurrencesClientDiagnostics, Pipeline, "ScheduledActionOccurrenceResource.GetAttachedResources", "value", "nextLink", cancellationToken); + } + + /// + /// List resources attached to Scheduled Actions for the given occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/resources + /// + /// + /// Operation Id + /// OccurrenceResource_GetAttachedResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAttachedResources(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scheduledActionOccurrenceOccurrencesRestClient.CreateGetAttachedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionOccurrenceOccurrencesRestClient.CreateGetAttachedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OccurrenceResourceData.DeserializeOccurrenceResourceData(e), _scheduledActionOccurrenceOccurrencesClientDiagnostics, Pipeline, "ScheduledActionOccurrenceResource.GetAttachedResources", "value", "nextLink", cancellationToken); + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/cancel + /// + /// + /// Operation Id + /// Occurrences_Cancel + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CancelAsync(OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceResource.Cancel"); + scope.Start(); + try + { + var response = await _scheduledActionOccurrenceOccurrencesRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/cancel + /// + /// + /// Operation Id + /// Occurrences_Cancel + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response Cancel(OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceResource.Cancel"); + scope.Start(); + try + { + var response = _scheduledActionOccurrenceOccurrencesRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A long-running resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/delay + /// + /// + /// Operation Id + /// Occurrences_Delay + /// + /// + /// Default Api Version + /// 2025-04-15-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 async Task> DelayAsync(WaitUntil waitUntil, OccurrenceDelayContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceResource.Delay"); + scope.Start(); + try + { + var response = await _scheduledActionOccurrenceOccurrencesRestClient.DelayAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ComputeScheduleArmOperation(new ScheduledActionResourceOperationResultOperationSource(), _scheduledActionOccurrenceOccurrencesClientDiagnostics, Pipeline, _scheduledActionOccurrenceOccurrencesRestClient.CreateDelayRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A long-running resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/delay + /// + /// + /// Operation Id + /// Occurrences_Delay + /// + /// + /// Default Api Version + /// 2025-04-15-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 Delay(WaitUntil waitUntil, OccurrenceDelayContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionOccurrenceOccurrencesClientDiagnostics.CreateScope("ScheduledActionOccurrenceResource.Delay"); + scope.Start(); + try + { + var response = _scheduledActionOccurrenceOccurrencesRestClient.Delay(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ComputeScheduleArmOperation(new ScheduledActionResourceOperationResultOperationSource(), _scheduledActionOccurrenceOccurrencesClientDiagnostics, Pipeline, _scheduledActionOccurrenceOccurrencesRestClient.CreateDelayRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionResource.Serialization.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionResource.Serialization.cs new file mode 100644 index 000000000000..6ac8a6bd21fb --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.ComputeSchedule +{ + public partial class ScheduledActionResource : IJsonModel + { + private static ScheduledActionData s_dataDeserializationInstance; + private static ScheduledActionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ScheduledActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeScheduleContext.Default); + + ScheduledActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeScheduleContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionResource.cs new file mode 100644 index 000000000000..e9b5b4d26f41 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/Generated/ScheduledActionResource.cs @@ -0,0 +1,1393 @@ +// 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 Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ComputeSchedule.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ComputeSchedule +{ + /// + /// A Class representing a ScheduledAction 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 GetScheduledActionResource method. + /// Otherwise you can get one from its parent resource using the GetScheduledAction method. + /// + public partial class ScheduledActionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The scheduledActionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string scheduledActionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _scheduledActionClientDiagnostics; + private readonly ScheduledActionsRestOperations _scheduledActionRestClient; + private readonly ScheduledActionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ComputeSchedule/scheduledActions"; + + /// Initializes a new instance of the class for mocking. + protected ScheduledActionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ScheduledActionResource(ArmClient client, ScheduledActionData 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 ScheduledActionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scheduledActionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ComputeSchedule", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string scheduledActionApiVersion); + _scheduledActionRestClient = new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scheduledActionApiVersion); +#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 ScheduledActionData 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 ScheduledActionOccurrenceResources in the ScheduledAction. + /// An object representing collection of ScheduledActionOccurrenceResources and their operations over a ScheduledActionOccurrenceResource. + public virtual ScheduledActionOccurrenceCollection GetScheduledActionOccurrences() + { + return GetCachedClient(client => new ScheduledActionOccurrenceCollection(client, Id)); + } + + /// + /// Get a Occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetScheduledActionOccurrenceAsync(string occurrenceId, CancellationToken cancellationToken = default) + { + return await GetScheduledActionOccurrences().GetAsync(occurrenceId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Occurrence + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId} + /// + /// + /// Operation Id + /// Occurrence_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Occurrence. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetScheduledActionOccurrence(string occurrenceId, CancellationToken cancellationToken = default) + { + return GetScheduledActionOccurrences().Get(occurrenceId, cancellationToken); + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Get"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Get"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ScheduledActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Delete + /// + /// + /// Default Api Version + /// 2025-04-15-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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Delete"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ComputeScheduleArmOperation(_scheduledActionClientDiagnostics, Pipeline, _scheduledActionRestClient.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 ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Delete + /// + /// + /// Default Api Version + /// 2025-04-15-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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Delete"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ComputeScheduleArmOperation(_scheduledActionClientDiagnostics, Pipeline, _scheduledActionRestClient.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 ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Update + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ScheduledActionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Update"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ScheduledActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ScheduledAction + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Update + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ScheduledActionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Update"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new ScheduledActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List resources attached to Scheduled Actions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/resources + /// + /// + /// Operation Id + /// ScheduledActions_GetAttachedResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAttachedResourcesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scheduledActionRestClient.CreateGetAttachedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionRestClient.CreateGetAttachedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ScheduledActionResourceData.DeserializeScheduledActionResourceData(e), _scheduledActionClientDiagnostics, Pipeline, "ScheduledActionResource.GetAttachedResources", "value", "nextLink", cancellationToken); + } + + /// + /// List resources attached to Scheduled Actions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/resources + /// + /// + /// Operation Id + /// ScheduledActions_GetAttachedResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAttachedResources(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scheduledActionRestClient.CreateGetAttachedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scheduledActionRestClient.CreateGetAttachedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ScheduledActionResourceData.DeserializeScheduledActionResourceData(e), _scheduledActionClientDiagnostics, Pipeline, "ScheduledActionResource.GetAttachedResources", "value", "nextLink", cancellationToken); + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/attachResources + /// + /// + /// Operation Id + /// ScheduledActions_AttachResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> AttachResourcesAsync(ScheduledActionResourceAttachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.AttachResources"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.AttachResourcesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/attachResources + /// + /// + /// Operation Id + /// ScheduledActions_AttachResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response AttachResources(ScheduledActionResourceAttachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.AttachResources"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.AttachResources(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/detachResources + /// + /// + /// Operation Id + /// ScheduledActions_DetachResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> DetachResourcesAsync(ScheduledActionResourceDetachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.DetachResources"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.DetachResourcesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/detachResources + /// + /// + /// Operation Id + /// ScheduledActions_DetachResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response DetachResources(ScheduledActionResourceDetachContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.DetachResources"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.DetachResources(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/patchResources + /// + /// + /// Operation Id + /// ScheduledActions_PatchResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> PatchResourcesAsync(ScheduledActionResourcePatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.PatchResources"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.PatchResourcesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/patchResources + /// + /// + /// Operation Id + /// ScheduledActions_PatchResources + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response PatchResources(ScheduledActionResourcePatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.PatchResources"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.PatchResources(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/disable + /// + /// + /// Operation Id + /// ScheduledActions_Disable + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task DisableAsync(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Disable"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.DisableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/disable + /// + /// + /// Operation Id + /// ScheduledActions_Disable + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Disable(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Disable"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Disable(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/enable + /// + /// + /// Operation Id + /// ScheduledActions_Enable + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task EnableAsync(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Enable"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.EnableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/enable + /// + /// + /// Operation Id + /// ScheduledActions_Enable + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Enable(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.Enable"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.Enable(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/cancelNextOccurrence + /// + /// + /// Operation Id + /// ScheduledActions_CancelNextOccurrence + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CancelNextOccurrenceAsync(OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.CancelNextOccurrence"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.CancelNextOccurrenceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/cancelNextOccurrence + /// + /// + /// Operation Id + /// ScheduledActions_CancelNextOccurrence + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response CancelNextOccurrence(OccurrenceCancelContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.CancelNextOccurrence"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.CancelNextOccurrence(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/triggerManualOccurrence + /// + /// + /// Operation Id + /// ScheduledActions_TriggerManualOccurrence + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> TriggerManualOccurrenceAsync(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.TriggerManualOccurrence"); + scope.Start(); + try + { + var response = await _scheduledActionRestClient.TriggerManualOccurrenceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ScheduledActionOccurrenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A synchronous resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/triggerManualOccurrence + /// + /// + /// Operation Id + /// ScheduledActions_TriggerManualOccurrence + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response TriggerManualOccurrence(CancellationToken cancellationToken = default) + { + using var scope = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.TriggerManualOccurrence"); + scope.Start(); + try + { + var response = _scheduledActionRestClient.TriggerManualOccurrence(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ScheduledActionOccurrenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// 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 = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.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 _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ScheduledActionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ScheduledActionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// 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 = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.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 = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ScheduledActionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ScheduledActionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// 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 = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.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 _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ScheduledActionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ScheduledActionPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// 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 = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.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 = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ScheduledActionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ScheduledActionPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// 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 = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.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 _scheduledActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ScheduledActionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ScheduledActionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName} + /// + /// + /// Operation Id + /// ScheduledAction_Get + /// + /// + /// Default Api Version + /// 2025-04-15-preview + /// + /// + /// 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 = _scheduledActionClientDiagnostics.CreateScope("ScheduledActionResource.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 = _scheduledActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ScheduledActionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ScheduledActionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/autorest.md.bak b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/autorest.md.bak deleted file mode 100644 index dc4afc356405..000000000000 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/src/autorest.md.bak +++ /dev/null @@ -1,86 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -azure-arm: true -csharp: true -library-name: ComputeSchedule -namespace: Azure.ResourceManager.ComputeSchedule -require: https://github.com/Azure/azure-rest-api-specs/blob/e8a00d5eb5252d05521a7ef34edcc7d99fff6b3c/specification/computeschedule/resource-manager/readme.md -#tag: package-2024-08-15-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -override-operation-name: - ScheduledActions_VirtualMachinesCancelOperations: CancelVirtualMachineOperations - ScheduledActions_VirtualMachinesExecuteDeallocate: ExecuteVirtualMachineDeallocate - ScheduledActions_VirtualMachinesExecuteHibernate: ExecuteVirtualMachineHibernate - ScheduledActions_VirtualMachinesExecuteStart: ExecuteVirtualMachineStart - ScheduledActions_VirtualMachinesGetOperationErrors: GetVirtualMachineOperationErrors - ScheduledActions_VirtualMachinesGetOperationStatus: GetVirtualMachineOperationStatus - ScheduledActions_VirtualMachinesSubmitDeallocate: SubmitVirtualMachineDeallocate - ScheduledActions_VirtualMachinesSubmitHibernate: SubmitVirtualMachineHibernate - ScheduledActions_VirtualMachinesSubmitStart: SubmitVirtualMachineStart - -rename-mapping: - CancelOperationsResponse: CancelOperationsResult - DeadlineType: ScheduledActionDeadlineType - DeallocateResourceOperationResponse: DeallocateResourceOperationResult - DeallocateResourceOperationResponse.type: ResourceType - ExecutionParameters: ScheduledActionExecutionParameterDetail - GetOperationErrorsResponse: GetOperationErrorsResult - GetOperationStatusResponse: GetOperationStatusResult - HibernateResourceOperationResponse: HibernateResourceOperationResult - HibernateResourceOperationResponse.type: ResourceType - OperationState: ScheduledActionOperationState - OptimizationPreference: ScheduledActionOptimizationPreference - ResourceOperation: ResourceOperationResult - Resources: UserRequestResources - RetryPolicy: UserRequestRetryPolicy - Schedule: UserRequestSchedule - StartResourceOperationResponse: StartResourceOperationResult - StartResourceOperationResponse.type: ResourceType - -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 - -``` - diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/ComputeScheduleManagementTestBase.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/ComputeScheduleManagementTestBase.cs index 02130dfad4aa..6eb823c6c9cb 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/ComputeScheduleManagementTestBase.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/ComputeScheduleManagementTestBase.cs @@ -188,6 +188,14 @@ protected async Task> GenerateMultipleVirtualMachin return item; } + protected async Task DeleteVirtualMachineAsync(List vms) + { + foreach (VirtualMachineResource vm in vms) + { + await vm.DeleteAsync(WaitUntil.Completed, forceDeletion: true); + } + } + protected static SubscriptionResource GenerateSubscriptionResource(ArmClient client, string subid) { ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subid); @@ -268,7 +276,7 @@ private Task ShouldRetryPolling(GetOperationStatusResult response, int tot #region SA Operations - protected static async Task TestSubmitStartAsync(string location, SubmitStartContent submitStartRequest, string subid, ArmClient client) + protected static async Task TestSubmitStartAsync(AzureLocation location, SubmitStartContent submitStartRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); SubmitStartContent content = submitStartRequest; @@ -291,7 +299,7 @@ protected static async Task TestSubmitStartAsync(s return result; } - protected static async Task TestSubmitDeallocateAsync(string location, SubmitDeallocateContent submitStartRequest, string subid, ArmClient client) + protected static async Task TestSubmitDeallocateAsync(AzureLocation location, SubmitDeallocateContent submitStartRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); SubmitDeallocateContent content = submitStartRequest; @@ -314,7 +322,7 @@ protected static async Task TestSubmitDealloc return result; } - protected static async Task TestSubmitHibernateAsync(string location, SubmitHibernateContent submitStartRequest, string subid, ArmClient client) + protected static async Task TestSubmitHibernateAsync(AzureLocation location, SubmitHibernateContent submitStartRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); SubmitHibernateContent content = submitStartRequest; @@ -337,7 +345,7 @@ protected static async Task TestSubmitHibernat return result; } - protected static async Task TestExecuteStartAsync(string location, ExecuteStartContent executeStartRequest, string subid, ArmClient client) + protected static async Task TestExecuteStartAsync(AzureLocation location, ExecuteStartContent executeStartRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); ExecuteStartContent content = executeStartRequest; @@ -360,7 +368,7 @@ protected static async Task TestExecuteStartAsync( return result; } - protected static async Task TestExecuteDeallocateAsync(string location, ExecuteDeallocateContent executeDeallocateRequest, string subid, ArmClient client) + protected static async Task TestExecuteDeallocateAsync(AzureLocation location, ExecuteDeallocateContent executeDeallocateRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); ExecuteDeallocateContent content = executeDeallocateRequest; @@ -384,7 +392,7 @@ protected static async Task TestExecuteDeallo return result; } - protected static async Task TestExecuteHibernateAsync(string location, ExecuteHibernateContent executeHibernateRequest, string subid, ArmClient client) + protected static async Task TestExecuteHibernateAsync(AzureLocation location, ExecuteHibernateContent executeHibernateRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); ExecuteHibernateContent content = executeHibernateRequest; @@ -407,7 +415,7 @@ protected static async Task TestExecuteHiberna return result; } - protected static async Task TestGetOpsStatusAsync(string location, GetOperationStatusContent getOpsStatusRequest, string subid, ArmClient client) + protected static async Task TestGetOpsStatusAsync(AzureLocation location, GetOperationStatusContent getOpsStatusRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); GetOperationStatusContent content = getOpsStatusRequest; @@ -431,7 +439,7 @@ protected static async Task TestGetOpsStatusAsync(stri return result; } - protected static async Task TestCancelOpsAsync(string location, CancelOperationsContent cancelOpsRequest, string subid, ArmClient client) + protected static async Task TestCancelOpsAsync(AzureLocation location, CancelOperationsContent cancelOpsRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); CancelOperationsContent content = cancelOpsRequest; @@ -454,7 +462,7 @@ protected static async Task TestCancelOpsAsync(string lo return result; } - protected static async Task TestGetOperationErrorsAsync(string location, GetOperationErrorsContent getOperationErrorsRequest, string subid, ArmClient client) + protected static async Task TestGetOperationErrorsAsync(AzureLocation location, GetOperationErrorsContent getOperationErrorsRequest, string subid, ArmClient client) { SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); GetOperationErrorsContent content = getOperationErrorsRequest; @@ -477,6 +485,87 @@ protected static async Task TestGetOperationErrorsAsyn return result; } + protected static async Task TestExecuteDeleteAsync(AzureLocation location, ExecuteDeleteContent executeDeleteRequest, string subid, ArmClient client) + { + SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); + ExecuteDeleteContent content = executeDeleteRequest; + DeleteResourceOperationResult result; + + try + { + result = await subscriptionResource.ExecuteVirtualMachineDeleteOperationAsync(location, content); + } + catch (RequestFailedException ex) + { + Console.WriteLine($"Request failed with ErrorCode:{ex.ErrorCode} and ErrorMessage: {ex.Message}"); + throw; + } + catch (Exception ex) + { + Console.WriteLine(ex.InnerException?.Message); + throw; + } + return result; + } + + protected static async Task TestExecuteCreateAsync(AzureLocation location, ExecuteCreateContent executeCreateRequest, string subid, ArmClient client) + { + SubscriptionResource subscriptionResource = GenerateSubscriptionResource(client, subid); + ExecuteCreateContent content = executeCreateRequest; + CreateResourceOperationResult result; + + try + { + result = await subscriptionResource.ExecuteVirtualMachineCreateOperationAsync(location, content); + } + catch (RequestFailedException ex) + { + Console.WriteLine($"Request failed with ErrorCode:{ex.ErrorCode} and ErrorMessage: {ex.Message}"); + throw; + } + catch (Exception ex) + { + Console.WriteLine(ex.InnerException?.Message); + throw; + } + return result; + } + + #endregion +/* + #region Recurring scheduledactions operations + + public static async Task> GetScheduledActions(string subid, ArmClient client, string scheduledActionName, ResourceGroupResource rgResource, bool shouldThrow = false) + { + Response saResource = null; + + try + { + saResource = await rgResource.GetScheduledActionAsync(scheduledActionName); + } + catch (RequestFailedException ex) when (ex.ErrorCode == "ResourceNotFound") + { + Console.WriteLine($" {scheduledActionName} scheduledaction deleted"); + + if (shouldThrow) + { + throw; + } + } + + return saResource; + } + + public static async Task DeleteScheduledAction(string subid, ArmClient client, string scheduledActionName, ResourceGroupResource rgResource, bool shouldThrow = false) + { + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subid, rgResource.Id.Name, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + await scheduledAction.DeleteAsync(WaitUntil.Completed); + + await GetScheduledActions(subid, client, scheduledActionName, rgResource, shouldThrow); + } #endregion +*/ } } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ArmClientExtensions.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ArmClientExtensions.cs new file mode 100644 index 000000000000..502376720579 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ArmClientExtensions.cs @@ -0,0 +1,85 @@ +// 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.ComputeSchedule.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ComputeSchedule.Samples +{ + public partial class Sample_ArmClientExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAssociatedScheduledActions_ScheduledActionExtensionListByVmsMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActionResources_GetAssociatedScheduledActions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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); + + // invoke the operation and iterate over the result + ResourceIdentifier scope = null; + await foreach (ScheduledActionResources item in client.GetAssociatedScheduledActionsAsync(scope)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAssociatedScheduledActions_ScheduledActionExtensionListByVmsMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActionResources_GetAssociatedScheduledActions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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); + + // invoke the operation and iterate over the result + ResourceIdentifier scope = null; + await foreach (ScheduledActionResources item in client.GetAssociatedScheduledActionsAsync(scope)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAssociatedOccurrences_OccurrenceExtensionListOccurrenceByVmsMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json + // this example is just showing the usage of "OccurrenceExtensionResource_GetAssociatedOccurrences" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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); + + // invoke the operation and iterate over the result + ResourceIdentifier scope = null; + await foreach (OccurrenceExtensionResourceData item in client.GetAssociatedOccurrencesAsync(scope)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionCollection.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionCollection.cs new file mode 100644 index 000000000000..98d39c62a0a5 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionCollection.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using System.Xml; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ComputeSchedule.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ComputeSchedule.Samples +{ + public partial class Sample_ScheduledActionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ScheduledActionsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ScheduledActionResource + ScheduledActionCollection collection = resourceGroupResource.GetScheduledActions(); + + // invoke the operation + string scheduledActionName = "myScheduledAction"; + ScheduledActionData data = new ScheduledActionData(new AzureLocation("vmuhgdgipeypkcv")) + { + Properties = new ScheduledActionProperties(ScheduledActionResourceType.VirtualMachine, ScheduledActionType.Start, DateTimeOffset.Parse("2025-04-17T00:23:55.281Z"), new ScheduledActionsSchedule(XmlConvert.ToTimeSpan("19:00:00"), "g", new ScheduledActionsScheduleWeekDay[] { ScheduledActionsScheduleWeekDay.Monday }, new ScheduledActionsScheduleMonth[] { ScheduledActionsScheduleMonth.January }, new int[] { 15 }) + { + ExecutionParameters = new ScheduledActionExecutionParameterDetail + { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, + RetryPolicy = new UserRequestRetryPolicy + { + RetryCount = 17, + RetryWindowInMinutes = 29, + }, + }, + DeadlineType = ScheduledActionDeadlineType.Unknown, + }, new NotificationSettings[] + { +new NotificationSettings("wbhryycyolvnypjxzlawwvb", NotificationType.Email, NotificationLanguage.EnUs) +{ +IsDisabled = true, +} + }) + { + EndOn = DateTimeOffset.Parse("2025-04-17T00:23:55.286Z"), + Disabled = true, + }, + Tags = +{ +["key2102"] = "obwsqwdydpkscnzceopxgkrhrxtdhv" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, scheduledActionName, data); + ScheduledActionResource 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 + ScheduledActionData 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_ScheduledActionsGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ScheduledActionResource + ScheduledActionCollection collection = resourceGroupResource.GetScheduledActions(); + + // invoke the operation + string scheduledActionName = "myScheduledAction"; + ScheduledActionResource result = await collection.GetAsync(scheduledActionName); + + // 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 + ScheduledActionData 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_ScheduledActionsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ScheduledActionResource + ScheduledActionCollection collection = resourceGroupResource.GetScheduledActions(); + + // invoke the operation and iterate over the result + await foreach (ScheduledActionResource 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 + ScheduledActionData 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 GetAll_ScheduledActionsListByResourceGroupMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ScheduledActionResource + ScheduledActionCollection collection = resourceGroupResource.GetScheduledActions(); + + // invoke the operation and iterate over the result + await foreach (ScheduledActionResource 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 + ScheduledActionData 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_ScheduledActionsGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ScheduledActionResource + ScheduledActionCollection collection = resourceGroupResource.GetScheduledActions(); + + // invoke the operation + string scheduledActionName = "myScheduledAction"; + bool result = await collection.ExistsAsync(scheduledActionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ScheduledActionsGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ScheduledActionResource + ScheduledActionCollection collection = resourceGroupResource.GetScheduledActions(); + + // invoke the operation + string scheduledActionName = "myScheduledAction"; + NullableResponse response = await collection.GetIfExistsAsync(scheduledActionName); + ScheduledActionResource 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 + ScheduledActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionOccurrenceCollection.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionOccurrenceCollection.cs new file mode 100644 index 000000000000..d906f15c397d --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionOccurrenceCollection.cs @@ -0,0 +1,160 @@ +// 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.ComputeSchedule.Samples +{ + public partial class Sample_ScheduledActionOccurrenceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OccurrencesGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrence_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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // get the collection of this ScheduledActionOccurrenceResource + ScheduledActionOccurrenceCollection collection = scheduledAction.GetScheduledActionOccurrences(); + + // invoke the operation + string occurrenceId = "67b5bada-4772-43fc-8dbb-402476d98a45"; + ScheduledActionOccurrenceResource result = await collection.GetAsync(occurrenceId); + + // 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 + ScheduledActionOccurrenceData 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_OccurrencesListByScheduledActionMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrence_ListByScheduledAction" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // get the collection of this ScheduledActionOccurrenceResource + ScheduledActionOccurrenceCollection collection = scheduledAction.GetScheduledActionOccurrences(); + + // invoke the operation and iterate over the result + await foreach (ScheduledActionOccurrenceResource 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 + ScheduledActionOccurrenceData 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_OccurrencesGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrence_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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // get the collection of this ScheduledActionOccurrenceResource + ScheduledActionOccurrenceCollection collection = scheduledAction.GetScheduledActionOccurrences(); + + // invoke the operation + string occurrenceId = "67b5bada-4772-43fc-8dbb-402476d98a45"; + bool result = await collection.ExistsAsync(occurrenceId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_OccurrencesGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrence_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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // get the collection of this ScheduledActionOccurrenceResource + ScheduledActionOccurrenceCollection collection = scheduledAction.GetScheduledActionOccurrences(); + + // invoke the operation + string occurrenceId = "67b5bada-4772-43fc-8dbb-402476d98a45"; + NullableResponse response = await collection.GetIfExistsAsync(occurrenceId); + ScheduledActionOccurrenceResource 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 + ScheduledActionOccurrenceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionOccurrenceResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionOccurrenceResource.cs new file mode 100644 index 000000000000..9b1db5a3f369 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionOccurrenceResource.cs @@ -0,0 +1,137 @@ +// 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.ComputeSchedule.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ComputeSchedule.Samples +{ + public partial class Sample_ScheduledActionOccurrenceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OccurrencesGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrence_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 ScheduledActionOccurrenceResource created on azure + // for more information of creating ScheduledActionOccurrenceResource, please refer to the document of ScheduledActionOccurrenceResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + string occurrenceId = "67b5bada-4772-43fc-8dbb-402476d98a45"; + ResourceIdentifier scheduledActionOccurrenceResourceId = ScheduledActionOccurrenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + ScheduledActionOccurrenceResource scheduledActionOccurrence = client.GetScheduledActionOccurrenceResource(scheduledActionOccurrenceResourceId); + + // invoke the operation + ScheduledActionOccurrenceResource result = await scheduledActionOccurrence.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 + ScheduledActionOccurrenceData 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 GetAttachedResources_OccurrencesListResourcesMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json + // this example is just showing the usage of "OccurrenceResource_GetAttachedResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionOccurrenceResource created on azure + // for more information of creating ScheduledActionOccurrenceResource, please refer to the document of ScheduledActionOccurrenceResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + string occurrenceId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier scheduledActionOccurrenceResourceId = ScheduledActionOccurrenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + ScheduledActionOccurrenceResource scheduledActionOccurrence = client.GetScheduledActionOccurrenceResource(scheduledActionOccurrenceResourceId); + + // invoke the operation and iterate over the result + await foreach (OccurrenceResourceData item in scheduledActionOccurrence.GetAttachedResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Cancel_OccurrencesCancelMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrences_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ScheduledActionOccurrenceResource created on azure + // for more information of creating ScheduledActionOccurrenceResource, please refer to the document of ScheduledActionOccurrenceResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + string occurrenceId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier scheduledActionOccurrenceResourceId = ScheduledActionOccurrenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + ScheduledActionOccurrenceResource scheduledActionOccurrence = client.GetScheduledActionOccurrenceResource(scheduledActionOccurrenceResourceId); + + // invoke the operation + OccurrenceCancelContent content = new OccurrenceCancelContent(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") }); + ScheduledActionResourceOperationResult result = await scheduledActionOccurrence.CancelAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delay_OccurrencesDelayMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json + // this example is just showing the usage of "Occurrences_Delay" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionOccurrenceResource created on azure + // for more information of creating ScheduledActionOccurrenceResource, please refer to the document of ScheduledActionOccurrenceResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + string occurrenceId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier scheduledActionOccurrenceResourceId = ScheduledActionOccurrenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName, occurrenceId); + ScheduledActionOccurrenceResource scheduledActionOccurrence = client.GetScheduledActionOccurrenceResource(scheduledActionOccurrenceResourceId); + + // invoke the operation + OccurrenceDelayContent content = new OccurrenceDelayContent(DateTimeOffset.Parse("2025-05-22T17:00:00.000-07:00"), new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") }); + ArmOperation lro = await scheduledActionOccurrence.DelayAsync(WaitUntil.Completed, content); + ScheduledActionResourceOperationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionResource.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionResource.cs new file mode 100644 index 000000000000..7dc2d501de12 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_ScheduledActionResource.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using System.Xml; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ComputeSchedule.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ComputeSchedule.Samples +{ + public partial class Sample_ScheduledActionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ScheduledActionsGetMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + ScheduledActionResource result = await scheduledAction.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 + ScheduledActionData 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_ScheduledActionsDeleteMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + await scheduledAction.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ScheduledActionsUpdateMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + ScheduledActionPatch patch = new ScheduledActionPatch + { + Tags = +{ +["key9989"] = "tryjidk" +}, + Properties = new ScheduledActionPatchProperties + { + ResourceType = ScheduledActionResourceType.VirtualMachine, + ActionType = ScheduledActionType.Start, + StartOn = DateTimeOffset.Parse("2025-04-17T00:23:58.149Z"), + EndOn = DateTimeOffset.Parse("2025-04-17T00:23:58.149Z"), + Schedule = new ScheduledActionsSchedule(XmlConvert.ToTimeSpan("19:00:00"), "bni", new ScheduledActionsScheduleWeekDay[] { ScheduledActionsScheduleWeekDay.Monday }, new ScheduledActionsScheduleMonth[] { ScheduledActionsScheduleMonth.January }, new int[] { 15 }) + { + ExecutionParameters = new ScheduledActionExecutionParameterDetail + { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, + RetryPolicy = new UserRequestRetryPolicy + { + RetryCount = 17, + RetryWindowInMinutes = 29, + }, + }, + DeadlineType = ScheduledActionDeadlineType.Unknown, + }, + NotificationSettings = {new NotificationSettings("wbhryycyolvnypjxzlawwvb", NotificationType.Email, NotificationLanguage.EnUs) +{ +IsDisabled = true, +}}, + Disabled = true, + }, + }; + ScheduledActionResource result = await scheduledAction.UpdateAsync(patch); + + // 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 + ScheduledActionData 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 GetAttachedResources_ScheduledActionsListResourcesMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_GetAttachedResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation and iterate over the result + await foreach (ScheduledActionResourceData item in scheduledAction.GetAttachedResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task AttachResources_ScheduledActionsAttachResourcesMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_AttachResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + ScheduledActionResourceAttachContent content = new ScheduledActionResourceAttachContent(new ScheduledActionResourceData[] + { +new ScheduledActionResourceData(new ResourceIdentifier("/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")) +{ +NotificationSettings = {new NotificationSettings("wbhryycyolvnypjxzlawwvb", NotificationType.Email, NotificationLanguage.EnUs) +{ +IsDisabled = true, +}}, +} + }); + ScheduledActionResourceOperationResult result = await scheduledAction.AttachResourcesAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DetachResources_ScheduledActionsDetachResourcesMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_DetachResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + ScheduledActionResourceDetachContent content = new ScheduledActionResourceDetachContent(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") }); + ScheduledActionResourceOperationResult result = await scheduledAction.DetachResourcesAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PatchResources_ScheduledActionsPatchResourcesMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_PatchResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + ScheduledActionResourcePatchContent content = new ScheduledActionResourcePatchContent(new ScheduledActionResourceData[] + { +new ScheduledActionResourceData(new ResourceIdentifier("/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")) +{ +NotificationSettings = {new NotificationSettings("wbhryycyolvnypjxzlawwvb", NotificationType.Email, NotificationLanguage.EnUs) +{ +IsDisabled = true, +}}, +} + }); + ScheduledActionResourceOperationResult result = await scheduledAction.PatchResourcesAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Disable_ScheduledActionsDisableMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_Disable" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + await scheduledAction.DisableAsync(); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Enable_ScheduledActionsEnableMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_Enable" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + await scheduledAction.EnableAsync(); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CancelNextOccurrence_ScheduledActionsCancelNextOccurrenceMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_CancelNextOccurrence" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + OccurrenceCancelContent content = new OccurrenceCancelContent(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") }); + ScheduledActionResourceOperationResult result = await scheduledAction.CancelNextOccurrenceAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task TriggerManualOccurrence_ScheduledActionsTriggerManualOccurrenceMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_TriggerManualOccurrence" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ScheduledActionResource created on azure + // for more information of creating ScheduledActionResource, please refer to the document of ScheduledActionResource + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + string resourceGroupName = "rgcomputeschedule"; + string scheduledActionName = "myScheduledAction"; + ResourceIdentifier scheduledActionResourceId = ScheduledActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, scheduledActionName); + ScheduledActionResource scheduledAction = client.GetScheduledActionResource(scheduledActionResourceId); + + // invoke the operation + ScheduledActionOccurrenceResource result = await scheduledAction.TriggerManualOccurrenceAsync(); + + // 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 + ScheduledActionOccurrenceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index fbc0fcac38ca..e3d726a40733 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; using Azure.Identity; @@ -19,9 +20,9 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task SubmitVirtualMachineDeallocate_ScheduledActionsVirtualMachinesSubmitDeallocate() + public async Task SubmitVirtualMachineDeallocate_ScheduledActionsVirtualMachinesSubmitDeallocateMaximumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesSubmitDeallocate.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_SubmitVirtualMachineDeallocate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,24 +32,25 @@ public async Task SubmitVirtualMachineDeallocate_ScheduledActionsVirtualMachines // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; - SubmitDeallocateContent content = new SubmitDeallocateContent(new UserRequestSchedule(ScheduledActionDeadlineType.InitiateAt) + AzureLocation locationparameter = new AzureLocation("ycipx"); + SubmitDeallocateContent content = new SubmitDeallocateContent(new UserRequestSchedule(ScheduledActionDeadlineType.Unknown) { - Deadline = DateTimeOffset.Parse("2024-11-01T17:52:54.215Z"), - Timezone = "UTC", + UserRequestDeadline = DateTimeOffset.Parse("2025-04-17T00:23:56.803Z"), + UserRequestTimezone = "aigbjdnldtzkteqi", }, new ScheduledActionExecutionParameterDetail { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, RetryPolicy = new UserRequestRetryPolicy { - RetryCount = 4, - RetryWindowInMinutes = 27, + RetryCount = 17, + RetryWindowInMinutes = 29, }, - }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3") }), "23480d2f-1dca-4610-afb4-dd25eec1f34r"); + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); DeallocateResourceOperationResult result = await subscriptionResource.SubmitVirtualMachineDeallocateAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -56,9 +58,39 @@ public async Task SubmitVirtualMachineDeallocate_ScheduledActionsVirtualMachines [Test] [Ignore("Only validating compilation of examples")] - public async Task SubmitVirtualMachineHibernate_ScheduledActionsVirtualMachinesSubmitHibernate() + public async Task SubmitVirtualMachineDeallocate_ScheduledActionsVirtualMachinesSubmitDeallocateMinimumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesSubmitHibernate.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_SubmitVirtualMachineDeallocate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("zrcmkxsbuxsxxulky"); + SubmitDeallocateContent content = new SubmitDeallocateContent(new UserRequestSchedule(ScheduledActionDeadlineType.Unknown) + { + UserRequestDeadline = DateTimeOffset.Parse("2025-04-17T00:23:56.803Z"), + UserRequestTimezone = "aigbjdnldtzkteqi", + }, new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); + DeallocateResourceOperationResult result = await subscriptionResource.SubmitVirtualMachineDeallocateAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task SubmitVirtualMachineHibernate_ScheduledActionsVirtualMachinesSubmitHibernateMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_SubmitVirtualMachineHibernate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,24 +100,55 @@ public async Task SubmitVirtualMachineHibernate_ScheduledActionsVirtualMachinesS // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; - SubmitHibernateContent content = new SubmitHibernateContent(new UserRequestSchedule(ScheduledActionDeadlineType.InitiateAt) + AzureLocation locationparameter = new AzureLocation("rhadyapnyvmobwg"); + SubmitHibernateContent content = new SubmitHibernateContent(new UserRequestSchedule(ScheduledActionDeadlineType.Unknown) { - Deadline = DateTimeOffset.Parse("2024-11-01T17:52:54.215Z"), - Timezone = "UTC", + UserRequestDeadline = DateTimeOffset.Parse("2025-04-17T00:23:56.803Z"), + UserRequestTimezone = "aigbjdnldtzkteqi", }, new ScheduledActionExecutionParameterDetail { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, RetryPolicy = new UserRequestRetryPolicy { - RetryCount = 2, - RetryWindowInMinutes = 27, + RetryCount = 17, + RetryWindowInMinutes = 29, }, - }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3") }), "23480d2f-1dca-4610-afb4-dd25eec1f34r"); + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); + HibernateResourceOperationResult result = await subscriptionResource.SubmitVirtualMachineHibernateAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task SubmitVirtualMachineHibernate_ScheduledActionsVirtualMachinesSubmitHibernateMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_SubmitVirtualMachineHibernate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("zuevcqpgdohzbjodhachtr"); + SubmitHibernateContent content = new SubmitHibernateContent(new UserRequestSchedule(ScheduledActionDeadlineType.Unknown) + { + UserRequestDeadline = DateTimeOffset.Parse("2025-04-17T00:23:56.803Z"), + UserRequestTimezone = "aigbjdnldtzkteqi", + }, new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); HibernateResourceOperationResult result = await subscriptionResource.SubmitVirtualMachineHibernateAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -93,9 +156,9 @@ public async Task SubmitVirtualMachineHibernate_ScheduledActionsVirtualMachinesS [Test] [Ignore("Only validating compilation of examples")] - public async Task SubmitVirtualMachineStart_ScheduledActionsVirtualMachinesSubmitStart() + public async Task SubmitVirtualMachineStart_ScheduledActionsVirtualMachinesSubmitStartMaximumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesSubmitStart.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_SubmitVirtualMachineStart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,24 +168,25 @@ public async Task SubmitVirtualMachineStart_ScheduledActionsVirtualMachinesSubmi // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; - SubmitStartContent content = new SubmitStartContent(new UserRequestSchedule(ScheduledActionDeadlineType.InitiateAt) + AzureLocation locationparameter = new AzureLocation("pxtvvk"); + SubmitStartContent content = new SubmitStartContent(new UserRequestSchedule(ScheduledActionDeadlineType.Unknown) { - Deadline = DateTimeOffset.Parse("2024-11-01T17:52:54.215Z"), - Timezone = "UTC", + UserRequestDeadline = DateTimeOffset.Parse("2025-04-17T00:23:56.803Z"), + UserRequestTimezone = "aigbjdnldtzkteqi", }, new ScheduledActionExecutionParameterDetail { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, RetryPolicy = new UserRequestRetryPolicy { - RetryCount = 5, - RetryWindowInMinutes = 27, + RetryCount = 17, + RetryWindowInMinutes = 29, }, - }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3") }), "23480d2f-1dca-4610-afb4-dd25eec1f34r"); + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); StartResourceOperationResult result = await subscriptionResource.SubmitVirtualMachineStartAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -130,9 +194,39 @@ public async Task SubmitVirtualMachineStart_ScheduledActionsVirtualMachinesSubmi [Test] [Ignore("Only validating compilation of examples")] - public async Task ExecuteVirtualMachineDeallocate_ScheduledActionsVirtualMachinesExecuteDeallocate() + public async Task SubmitVirtualMachineStart_ScheduledActionsVirtualMachinesSubmitStartMinimumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesExecuteDeallocate.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_SubmitVirtualMachineStart" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("ufrcsuw"); + SubmitStartContent content = new SubmitStartContent(new UserRequestSchedule(ScheduledActionDeadlineType.Unknown) + { + UserRequestDeadline = DateTimeOffset.Parse("2025-04-17T00:23:56.803Z"), + UserRequestTimezone = "aigbjdnldtzkteqi", + }, new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); + StartResourceOperationResult result = await subscriptionResource.SubmitVirtualMachineStartAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineDeallocate_ScheduledActionsVirtualMachinesExecuteDeallocateMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineDeallocate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,20 +236,21 @@ public async Task ExecuteVirtualMachineDeallocate_ScheduledActionsVirtualMachine // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; + AzureLocation locationparameter = new AzureLocation("ykcaptgboliddcfyaiuimj"); ExecuteDeallocateContent content = new ExecuteDeallocateContent(new ScheduledActionExecutionParameterDetail { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, RetryPolicy = new UserRequestRetryPolicy { - RetryCount = 4, - RetryWindowInMinutes = 27, + RetryCount = 17, + RetryWindowInMinutes = 29, }, - }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3") }), "23480d2f-1dca-4610-afb4-dd25eec1f34r"); + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); DeallocateResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineDeallocateAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -163,9 +258,35 @@ public async Task ExecuteVirtualMachineDeallocate_ScheduledActionsVirtualMachine [Test] [Ignore("Only validating compilation of examples")] - public async Task ExecuteVirtualMachineHibernate_ScheduledActionsVirtualMachinesExecuteHibernate() + public async Task ExecuteVirtualMachineDeallocate_ScheduledActionsVirtualMachinesExecuteDeallocateMinimumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesExecuteHibernate.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineDeallocate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("qqfrkswrovcice"); + ExecuteDeallocateContent content = new ExecuteDeallocateContent(new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); + DeallocateResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineDeallocateAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineHibernate_ScheduledActionsVirtualMachinesExecuteHibernateMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineHibernate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,20 +296,21 @@ public async Task ExecuteVirtualMachineHibernate_ScheduledActionsVirtualMachines // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; + AzureLocation locationparameter = new AzureLocation("gztd"); ExecuteHibernateContent content = new ExecuteHibernateContent(new ScheduledActionExecutionParameterDetail { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, RetryPolicy = new UserRequestRetryPolicy { - RetryCount = 5, - RetryWindowInMinutes = 27, + RetryCount = 17, + RetryWindowInMinutes = 29, }, - }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3") }), "23480d2f-1dca-4610-afb4-dd25eec1f34r"); + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); HibernateResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineHibernateAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -196,9 +318,35 @@ public async Task ExecuteVirtualMachineHibernate_ScheduledActionsVirtualMachines [Test] [Ignore("Only validating compilation of examples")] - public async Task ExecuteVirtualMachineStart_ScheduledActionsVirtualMachinesExecuteStart() + public async Task ExecuteVirtualMachineHibernate_ScheduledActionsVirtualMachinesExecuteHibernateMinimumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesExecuteStart.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineHibernate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("xtmm"); + ExecuteHibernateContent content = new ExecuteHibernateContent(new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); + HibernateResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineHibernateAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineStart_ScheduledActionsVirtualMachinesExecuteStartMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineStart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,20 +356,21 @@ public async Task ExecuteVirtualMachineStart_ScheduledActionsVirtualMachinesExec // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; + AzureLocation locationparameter = new AzureLocation("qk"); ExecuteStartContent content = new ExecuteStartContent(new ScheduledActionExecutionParameterDetail { + OptimizationPreference = ScheduledActionOptimizationPreference.Cost, RetryPolicy = new UserRequestRetryPolicy { - RetryCount = 2, - RetryWindowInMinutes = 27, + RetryCount = 17, + RetryWindowInMinutes = 29, }, - }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3") }), "23480d2f-1dca-4610-afb4-dd25eec1f34r"); + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); StartResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineStartAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -229,9 +378,417 @@ public async Task ExecuteVirtualMachineStart_ScheduledActionsVirtualMachinesExec [Test] [Ignore("Only validating compilation of examples")] - public async Task GetVirtualMachineOperationStatus_ScheduledActionsVirtualMachinesGetOperationStatus() + public async Task ExecuteVirtualMachineStart_ScheduledActionsVirtualMachinesExecuteStartMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineStart" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("fbdewllahrteoavajbomjc"); + ExecuteStartContent content = new ExecuteStartContent(new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") }), "b211f086-4b91-4686-a453-2f5c012e4d80"); + StartResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineStartAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineCreateOperation_ScheduledActionsVirtualMachinesExecuteCreateMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineCreateOperation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("oslhbouzgevzpeydssyelhw"); + ExecuteCreateContent content = new ExecuteCreateContent(new ResourceProvisionPayload(2) + { + BaseProfile = +{ +["hardwareProfile"] = BinaryData.FromObjectAsJson(new +{ +name = "F1", +}), +["provisioningState"] = BinaryData.FromObjectAsJson(0), +["storageProfile"] = BinaryData.FromObjectAsJson(new +{ +osDisk = new +{ +osType = 0, +}, +}), +["vmExtensions"] = BinaryData.FromObjectAsJson(new object[] +{ +new +{ +autoUpgradeMinorVersion = true, +protectedSettings = "SomeDecryptedSecretValue", +provisioningState = 0, +enableAutomaticUpgrade = true, +publisher = "Microsoft.Azure.Monitor", +type = "AzureMonitorLinuxAgent", +typeHandlerVersion = "1.0", +}, +new +{ +name = "myExtensionName", +} +}), +["resourcegroupName"] = BinaryData.FromObjectAsJson("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B"), +["computeApiVersion"] = BinaryData.FromObjectAsJson("2024-07-01") +}, + ResourceOverrides = {new Dictionary +{ +["name"] = BinaryData.FromObjectAsJson("myFleet_523"), +["location"] = BinaryData.FromObjectAsJson("LocalDev"), +["properties"] = BinaryData.FromObjectAsJson(new +{ +hardwareProfile = new +{ +vmSize = "Standard_F1s", +}, +provisioningState = 0, +osProfile = new +{ +computerName = "myFleet000000", +adminUsername = "adminUser", +windowsConfiguration = new +{ +additionalUnattendContent = new object[] +{ +new +{ +passName = "someValue", +content = "", +}, +new +{ +passName = "someOtherValue", +content = "SomeDecryptedSecretValue", +} +}, +}, +adminPassword = "SomeDecryptedSecretValue", +}, +priority = 0, +}), +["zones"] = BinaryData.FromObjectAsJson(new object[] +{ +"1" +}) +}, new Dictionary +{ +["name"] = BinaryData.FromObjectAsJson("myFleet_524"), +["location"] = BinaryData.FromObjectAsJson("LocalDev"), +["properties"] = BinaryData.FromObjectAsJson(new +{ +hardwareProfile = new +{ +vmSize = "Standard_G1s", +}, +provisioningState = 0, +osProfile = new +{ +computerName = "myFleet000000", +adminUsername = "adminUser", +windowsConfiguration = new +{ +additionalUnattendContent = new object[] +{ +new +{ +passName = "someValue", +content = "", +}, +new +{ +passName = "someOtherValue", +content = "SomeDecryptedSecretValue", +} +}, +}, +adminPassword = "SomeDecryptedSecretValue", +}, +priority = 0, +}), +["zones"] = BinaryData.FromObjectAsJson(new object[] +{ +"2" +}) +}}, + ResourcePrefix = "TL1", + }, new ScheduledActionExecutionParameterDetail + { + RetryPolicy = new UserRequestRetryPolicy + { + RetryCount = 5, + RetryWindowInMinutes = 40, + }, + }) + { + CorrelationId = "dfe927c5-16a6-40b7-a0f7-8524975ed642", + }; + CreateResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineCreateOperationAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineCreateOperation_ScheduledActionsVirtualMachinesExecuteCreateMinimumSetGenGeneratedByMinimumSetRule() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesGetOperationStatus.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineCreateOperation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("useast"); + ExecuteCreateContent content = new ExecuteCreateContent(new ResourceProvisionPayload(2) + { + BaseProfile = +{ +["hardwareProfile"] = BinaryData.FromObjectAsJson(new +{ +name = "F1", +}), +["provisioningState"] = BinaryData.FromObjectAsJson(0), +["storageProfile"] = BinaryData.FromObjectAsJson(new +{ +osDisk = new +{ +osType = 0, +}, +}), +["vmExtensions"] = BinaryData.FromObjectAsJson(new object[] +{ +new +{ +autoUpgradeMinorVersion = true, +protectedSettings = "SomeDecryptedSecretValue", +provisioningState = 0, +enableAutomaticUpgrade = true, +publisher = "Microsoft.Azure.Monitor", +type = "AzureMonitorLinuxAgent", +typeHandlerVersion = "1.0", +}, +new +{ +name = "myExtensionName", +} +}), +["resourcegroupName"] = BinaryData.FromObjectAsJson("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B"), +["computeApiVersion"] = BinaryData.FromObjectAsJson("2024-07-01") +}, + ResourceOverrides = {new Dictionary +{ +["name"] = BinaryData.FromObjectAsJson("myFleet_523"), +["location"] = BinaryData.FromObjectAsJson("LocalDev"), +["properties"] = BinaryData.FromObjectAsJson(new +{ +hardwareProfile = new +{ +vmSize = "Standard_F1s", +}, +provisioningState = 0, +osProfile = new +{ +computerName = "myFleet000000", +adminUsername = "adminUser", +windowsConfiguration = new +{ +additionalUnattendContent = new object[] +{ +new +{ +passName = "someValue", +content = "", +}, +new +{ +passName = "someOtherValue", +content = "SomeDecryptedSecretValue", +} +}, +}, +adminPassword = "SomeDecryptedSecretValue", +}, +priority = 0, +}), +["zones"] = BinaryData.FromObjectAsJson(new object[] +{ +"1" +}) +}, new Dictionary +{ +["name"] = BinaryData.FromObjectAsJson("myFleet_524"), +["location"] = BinaryData.FromObjectAsJson("LocalDev"), +["properties"] = BinaryData.FromObjectAsJson(new +{ +hardwareProfile = new +{ +vmSize = "Standard_G1s", +}, +provisioningState = 0, +osProfile = new +{ +computerName = "myFleet000000", +adminUsername = "adminUser", +windowsConfiguration = new +{ +additionalUnattendContent = new object[] +{ +new +{ +passName = "someValue", +content = "", +}, +new +{ +passName = "someOtherValue", +content = "SomeDecryptedSecretValue", +} +}, +}, +adminPassword = "SomeDecryptedSecretValue", +}, +priority = 0, +}), +["zones"] = BinaryData.FromObjectAsJson(new object[] +{ +"2" +}) +}}, + }, new ScheduledActionExecutionParameterDetail()); + CreateResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineCreateOperationAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineDeleteOperation_ScheduledActionsVirtualMachinesExecuteDeleteMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineDeleteOperation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("east"); + ExecuteDeleteContent content = new ExecuteDeleteContent(new ScheduledActionExecutionParameterDetail + { + RetryPolicy = new UserRequestRetryPolicy + { + RetryCount = 2, + RetryWindowInMinutes = 4, + }, + }, new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3"), new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") })) + { + CorrelationId = "dfe927c5-16a6-40b7-a0f7-8524975ed642", + IsForceDeletion = false, + }; + DeleteResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineDeleteOperationAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ExecuteVirtualMachineDeleteOperation_ScheduledActionsVirtualMachinesExecuteDeleteMinimumSetGenGeneratedByMinimumSetRule() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_ExecuteVirtualMachineDeleteOperation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("east"); + ExecuteDeleteContent content = new ExecuteDeleteContent(new ScheduledActionExecutionParameterDetail(), new UserRequestResources(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3"), new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4") })); + DeleteResourceOperationResult result = await subscriptionResource.ExecuteVirtualMachineDeleteOperationAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetVirtualMachineOperationStatus_ScheduledActionsVirtualMachinesGetOperationStatusMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_GetVirtualMachineOperationStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("ntfcikxsmthfkdhdcjpevmydzu"); + GetOperationStatusContent content = new GetOperationStatusContent(new string[] { "b211f086-4b91-4686-a453-2f5c012e4d80" }, "b211f086-4b91-4686-a453-2f5c012e4d80"); + GetOperationStatusResult result = await subscriptionResource.GetVirtualMachineOperationStatusAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetVirtualMachineOperationStatus_ScheduledActionsVirtualMachinesGetOperationStatusMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json // this example is just showing the usage of "ScheduledActions_GetVirtualMachineOperationStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,13 +798,13 @@ public async Task GetVirtualMachineOperationStatus_ScheduledActionsVirtualMachin // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; - GetOperationStatusContent content = new GetOperationStatusContent(new string[] { "23480d2f-1dca-4610-afb4-dd25eec1f34r" }, "35780d2f-1dca-4610-afb4-dd25eec1f34r"); + AzureLocation locationparameter = new AzureLocation("ykvvjfoopmkwznctgaiblzvea"); + GetOperationStatusContent content = new GetOperationStatusContent(new string[] { "duhqnwosjzexcfwfhryvy" }, "b211f086-4b91-4686-a453-2f5c012e4d80"); GetOperationStatusResult result = await subscriptionResource.GetVirtualMachineOperationStatusAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -255,9 +812,9 @@ public async Task GetVirtualMachineOperationStatus_ScheduledActionsVirtualMachin [Test] [Ignore("Only validating compilation of examples")] - public async Task CancelVirtualMachineOperations_ScheduledActionsVirtualMachinesCancelOperations() + public async Task CancelVirtualMachineOperations_ScheduledActionsVirtualMachinesCancelOperationsMaximumSet() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesCancelOperations.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json // this example is just showing the usage of "ScheduledActions_CancelVirtualMachineOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,13 +824,13 @@ public async Task CancelVirtualMachineOperations_ScheduledActionsVirtualMachines // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; - CancelOperationsContent content = new CancelOperationsContent(new string[] { "23480d2f-1dca-4610-afb4-dd25eec1f34r" }, "23480d2f-1dca-4610-afb4-gg25eec1f34r"); + AzureLocation locationparameter = new AzureLocation("nivsvluajruxhmsfgmxjnl"); + CancelOperationsContent content = new CancelOperationsContent(new string[] { "b211f086-4b91-4686-a453-2f5c012e4d80" }, "b211f086-4b91-4686-a453-2f5c012e4d80"); CancelOperationsResult result = await subscriptionResource.CancelVirtualMachineOperationsAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); @@ -281,9 +838,61 @@ public async Task CancelVirtualMachineOperations_ScheduledActionsVirtualMachines [Test] [Ignore("Only validating compilation of examples")] - public async Task GetVirtualMachineOperationErrors_ScheduledActionsVirtualMachinesGetOperationErrors() + public async Task CancelVirtualMachineOperations_ScheduledActionsVirtualMachinesCancelOperationsMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_CancelVirtualMachineOperations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("fhdunfivmjiltaiakwhhwdgemfcld"); + CancelOperationsContent content = new CancelOperationsContent(new string[] { "b211f086-4b91-4686-a453-2f5c012e4d80" }, "b211f086-4b91-4686-a453-2f5c012e4d80"); + CancelOperationsResult result = await subscriptionResource.CancelVirtualMachineOperationsAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetVirtualMachineOperationErrors_ScheduledActionsVirtualMachinesGetOperationErrorsMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledActions_GetVirtualMachineOperationErrors" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation locationparameter = new AzureLocation("ennweqswbghorrgzbet"); + GetOperationErrorsContent content = new GetOperationErrorsContent(new string[] { "ksufjznokhsbowdupyt" }); + GetOperationErrorsResult result = await subscriptionResource.GetVirtualMachineOperationErrorsAsync(locationparameter, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetVirtualMachineOperationErrors_ScheduledActionsVirtualMachinesGetOperationErrorsMinimumSetGenGeneratedByMinimumSetRule() { - // Generated from example definition: 2024-10-01/ScheduledActions_VirtualMachinesGetOperationErrors.json + // Generated from example definition: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json // this example is just showing the usage of "ScheduledActions_GetVirtualMachineOperationErrors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -293,16 +902,78 @@ public async Task GetVirtualMachineOperationErrors_ScheduledActionsVirtualMachin // 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 = "D8E30CC0-2763-4FCC-84A8-3C5659281032"; + string subscriptionId = "0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - string locationparameter = "eastus2euap"; - GetOperationErrorsContent content = new GetOperationErrorsContent(new string[] { "23480d2f-1dca-4610-afb4-dd25eec1f34r" }); + AzureLocation locationparameter = new AzureLocation("gcdqwzmxtcn"); + GetOperationErrorsContent content = new GetOperationErrorsContent(new string[] { "ksufjznokhsbowdupyt" }); GetOperationErrorsResult result = await subscriptionResource.GetVirtualMachineOperationErrorsAsync(locationparameter, content); Console.WriteLine($"Succeeded: {result}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetScheduledActions_ScheduledActionsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ScheduledActionResource item in subscriptionResource.GetScheduledActionsAsync()) + { + // 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 + ScheduledActionData 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 GetScheduledActions_ScheduledActionsListBySubscriptionMinimumSet() + { + // Generated from example definition: 2025-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json + // this example is just showing the usage of "ScheduledAction_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 = "CB26D7CB-3E27-465F-99C8-EAF7A4118245"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ScheduledActionResource item in subscriptionResource.GetScheduledActionsAsync()) + { + // 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 + ScheduledActionData 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/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/RecurringScheduledActionUtils.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/RecurringScheduledActionUtils.cs new file mode 100644 index 000000000000..359caec85db5 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/RecurringScheduledActionUtils.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ComputeSchedule.Models; +using Azure.ResourceManager.Models; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Azure.ResourceManager.ComputeSchedule.Tests.Helpers +{ + public static class RecurringScheduledActionUtils + { +/* + public static readonly JsonSerializerSettings DefaultJsonSerializerSettings = new() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = { new Newtonsoft.Json.Converters.StringEnumConverter() }, + }; + + private static readonly HashSet s_activeStates = [OccurrenceState.Created, OccurrenceState.Scheduled, OccurrenceState.Rescheduling]; + + public static ScheduledActionData GenerateScheduledActionData( + string location, + UserRequestRetryPolicy retryPolicy, + ScheduledActionDeadlineType deadlineType, + DateTimeOffset startsOn, + DateTimeOffset endsOn, + ScheduledActionType actionType, + TimeSpan scheduleTime, + string timezone, + bool isDisabled) + { + ScheduledActionData sa = new(new AzureLocation(location)) + { + Properties = new ScheduledActionProperties(Models.ResourceType.VirtualMachine, actionType, startsOn, new ScheduledActionsSchedule( + scheduleTime, + timezone, + [WeekDay.All], + [Month.All], + []) + { + ExecutionParameters = new ScheduledActionExecutionParameterDetail + { + RetryPolicy = retryPolicy, + }, + DeadlineType = deadlineType, + }, + []) + { + EndOn = endsOn, + Disabled = isDisabled, + }, + Tags ={}, + }; + + return sa; + } + + public static ScheduledActionData GenerateScheduledActionData( + string scheduledActionName, + string location, + UserRequestRetryPolicy retryPolicy, + ScheduledActionDeadlineType deadlineType, + DateTimeOffset startsOn, + DateTimeOffset endsOn, + ScheduledActionType actionType, + TimeSpan scheduleTime, + string timezone, + bool isDisabled, + string subId, + string rgName) + { + ScheduledActionProperties props = new(Models.ResourceType.VirtualMachine, actionType, startsOn, new ScheduledActionsSchedule( + scheduleTime, + timezone, + [WeekDay.All], + [Month.All], + []) + { + ExecutionParameters = new ScheduledActionExecutionParameterDetail + { + RetryPolicy = retryPolicy, + }, + DeadlineType = deadlineType, + }, + []) + { + EndOn = endsOn, + Disabled = isDisabled, + StartOn = startsOn + }; + + ScheduledActionData scheduledAction = new(id: ResourceIdentifier.Parse($"/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}"), name: $"{scheduledActionName}", resourceType: "microsoft.computeschedule/scheduledactions", systemData: new SystemData(), tags: new Dictionary(), location: new AzureLocation($"{location}"), properties: props, serializedAdditionalRawData: new Dictionary()); + + return scheduledAction; + } + + public static string FormatCollection(this IEnumerable collection) + { + return $"[{string.Join(", ", collection.FormatComplexObject())}]"; + } + + public static string FormatComplexObject(this object obj) + { + return JsonConvert.SerializeObject(obj, DefaultJsonSerializerSettings); + } + + public static ScheduledActionResourceModel[] GenerateResources(List resources) + { + var allResources = new ScheduledActionResourceModel[resources.Count]; + + if (resources.Count > 0) + { + for (int i = 0; i < resources.Count; i++) + { + allResources[i] = new ScheduledActionResourceModel(resources[i]) + { + ResourceId = resources[i], + NotificationSettings = {}, + }; + } + } + else + { + allResources = []; + } + + return allResources; + } + + public static bool IsActive(OccurrenceData occurrence) + { + return occurrence.Properties != null && occurrence.Properties.ProvisioningState != null && s_activeStates.Contains(occurrence.Properties.ProvisioningState.Value); + } + + public static void ValidateTriggeredOccurrence(OccurrenceData triggeredOccurrenceData, string scheduledActionName) + { + DateTimeOffset scheduledTime = triggeredOccurrenceData.Properties.ScheduledOn; + DateTimeOffset utcNow = DateTimeOffset.UtcNow.AddMinutes(1); + Assert.IsTrue(IsActive(triggeredOccurrenceData), $"The next occurrence of scheduledaction {scheduledActionName} should be active but has status {triggeredOccurrenceData.Properties.ProvisioningState}"); + + Assert.IsFalse(scheduledTime > utcNow, $"The triggered occurrence with id {triggeredOccurrenceData.Name} should be started right now at around {utcNow} but has schedule time {scheduledTime}"); + } +*/ + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/ResourceUtils.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/ResourceUtils.cs index c9eee99255df..32872421c4a2 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/ResourceUtils.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Helpers/ResourceUtils.cs @@ -68,7 +68,7 @@ public static VirtualMachineData GetBasicWindowsVirtualMachineData(AzureLocation Offer = "WindowsServer", Sku = "2022-datacenter-azure-edition", Version = "latest", - } + }, } }; diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/ComputescheduleOperationsTests.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/ComputescheduleOperationsTests.cs index 01218aed3f14..219f6c877a55 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/ComputescheduleOperationsTests.cs +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/ComputescheduleOperationsTests.cs @@ -17,7 +17,6 @@ public class ComputescheduleOperationsTests : ComputeScheduleManagementTestBase private static readonly int s_cancelOperationsDelayedDays = 5; public ComputescheduleOperationsTests(bool isAsync) : base(isAsync) - //, RecordedTestMode.Record) { } diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/RecurringScheduledActionsTests.cs b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/RecurringScheduledActionsTests.cs new file mode 100644 index 000000000000..ef71311fc8ce --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tests/Scenario/RecurringScheduledActionsTests.cs @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.ComputeSchedule.Models; +using Azure.ResourceManager.ComputeSchedule.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.ComputeSchedule.Tests.Scenario +{ + public class RecurringScheduledActionsTests : ComputeScheduleManagementTestBase + { + private static readonly TimeSpan s_startScheduleTime = new(19, 0, 0); + + public RecurringScheduledActionsTests(bool isAsync) + : base(isAsync, RecordedTestMode.Playback) + { + } +/* + #region Tests + [TestCase, Order(1)] + [RecordedTest] + public async Task TestRecurringScheduledAction_Create() + { + string scheduledActionName = Recording.GenerateAssetName("create"); + try + { + ScheduledActionResource sa = await CreateAndValidateScheduledAction(scheduledActionName, s_startScheduleTime); + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + // delete AA + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + + [TestCase, Order(2)] + [RecordedTest] + public async Task TestRecurringScheduledAction_AttachDetach() + { + ScheduledActionResource sa = await CreateAndValidateScheduledAction("crud-aa-", s_startScheduleTime); + var scheduledActionName = sa.Data.Name; + + List allResourceids = [.. GetTestResourceIdentifiers(DefaultSubscription.Id.Name, DefaultResourceGroupResource.Data.Name)]; + Console.WriteLine($"Generated vmIds: {allResourceids.FormatCollection()} VMs"); + + try + { + // attach + ScheduledActionResourceModel[] res = RecurringScheduledActionUtils.GenerateResources(allResourceids); + ResourceAttachContent attachContent = new(res); + RecurringActionsResourceOperationResult attachResult = await sa.AttachResourcesAsync(attachContent); + + Assert.NotNull(attachResult); + foreach (ResourceStatus attachRes in attachResult.ResourcesStatuses) + { + Assert.IsTrue(attachRes.Status.Equals(ResourceOperationStatus.Succeeded)); + } + + //detach + ResourceDetachContent detachContent = new([allResourceids[0]]); + RecurringActionsResourceOperationResult detachResult = await sa.DetachResourcesAsync(detachContent); + + Assert.NotNull(detachResult); + foreach (ResourceStatus detachRes in detachResult.ResourcesStatuses) + { + Assert.IsTrue(detachRes.Status.Equals(ResourceOperationStatus.Succeeded)); + } + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + // delete AA + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + + [TestCase, Order(3)] + [RecordedTest] + public async Task TestRecurringScheduledAction_EnableDisable() + { + ScheduledActionResource sa = await CreateAndValidateScheduledAction("en-dis-aa-", s_startScheduleTime); + var scheduledActionName = sa.Data.Name; + try + { + // enable + await sa.EnableAsync(); + + // check enabled + Response saAfterEnable = await GetScheduledActions(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource); + + if (saAfterEnable != null) + { + Assert.False(saAfterEnable.Value.Data.Properties.Disabled); + } + + // disable + await sa.DisableAsync(); + + // check disabled + Response saAfterDisable = await GetScheduledActions(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource); + + if (saAfterDisable != null) + { + Assert.True(saAfterDisable.Value.Data.Properties.Disabled); + } + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + // delete AA + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + + [TestCase, Order(4)] + [RecordedTest] + public async Task TestRecurringScheduledAction_CancelNextOccurrence() + { + var resourceIds = GetTestResourceIdentifiers(DefaultSubscription.Id.Name, DefaultResourceGroupResource.Data.Name).ToList(); + var scheduledAction = await CreateAndValidateScheduledAction("ca-nx-", s_startScheduleTime, isDisabled: false); + var scheduledActionName = scheduledAction.Data.Name; + + try + { + ScheduledActionResourceModel[] resourcesToAttach = RecurringScheduledActionUtils.GenerateResources(resourceIds); + var attachContent = new ResourceAttachContent(resourcesToAttach); + Response attachResult = await scheduledAction.AttachResourcesAsync(attachContent); + + Assert.NotNull(attachResult); + foreach (ResourceStatus status in attachResult.Value.ResourcesStatuses) + { + Assert.IsTrue(status.Status == ResourceOperationStatus.Succeeded); + } + + await Task.Delay(Recording.Random.Next(900, 1000)); + + OccurrenceCollection occurrences = scheduledAction.GetOccurrences(); + var occurrenceList = new List(); + + await foreach (OccurrenceResource occurrence in occurrences.GetAllAsync()) + { + occurrenceList.Add(occurrence); + } + + if (occurrenceList.Count > 0) + { + // Cancel the next occurrence + await scheduledAction.CancelNextOccurrenceAsync(new(resourceIds: [])); + + // Retrieve updated occurrences + OccurrenceCollection updatedOccurrences = scheduledAction.GetOccurrences(); + var updatedOccurrenceList = new List(); + + await foreach (OccurrenceResource occurrence in updatedOccurrences.GetAllAsync()) + { + updatedOccurrenceList.Add(occurrence); + } + + var sortedOccurrences = updatedOccurrenceList.OrderBy(o => o.Data.Properties.ScheduledOn).ToList(); + OccurrenceResource firstOccurrence = sortedOccurrences.FirstOrDefault(); + + Assert.IsTrue(firstOccurrence?.Data.Properties.ProvisioningState == OccurrenceState.Canceled, "Occurrence is not cancelled as expected."); + } + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + + [TestCase, Order(5)] + [RecordedTest] + public async Task TestRecurringScheduledAction_TriggerManualOccurrence() + { + var resourceIds = GetTestResourceIdentifiers(DefaultSubscription.Id.Name, DefaultResourceGroupResource.Data.Name).ToList(); + var scheduledAction = await CreateAndValidateScheduledAction("ca-tr-", s_startScheduleTime, isDisabled: false); + var scheduledActionName = scheduledAction.Data.Name; + + try + { + ScheduledActionResourceModel[] resourcesToAttach = RecurringScheduledActionUtils.GenerateResources(resourceIds); + var attachContent = new ResourceAttachContent(resourcesToAttach); + Response attachResult = await scheduledAction.AttachResourcesAsync(attachContent); + + Assert.NotNull(attachResult); + foreach (ResourceStatus status in attachResult.Value.ResourcesStatuses) + { + Assert.IsTrue(status.Status == ResourceOperationStatus.Succeeded); + } + + await Task.Delay(Recording.Random.Next(900, 1000)); + + OccurrenceCollection occurrences = scheduledAction.GetOccurrences(); + var occurrenceList = new List(); + + await foreach (OccurrenceResource occurrence in occurrences.GetAllAsync()) + { + occurrenceList.Add(occurrence); + } + + if (occurrenceList.Count > 0) + { + // Trigger a manual occurrence + Response triggeredOccurrence = await scheduledAction.TriggerManualOccurrenceAsync(); + + Assert.IsTrue(triggeredOccurrence.Value.Data.Properties.ProvisioningState != OccurrenceState.Scheduled); + + RecurringScheduledActionUtils.ValidateTriggeredOccurrence(triggeredOccurrence.Value.Data, scheduledActionName); + } + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + + [TestCase, Order(6)] + [RecordedTest] + public async Task TestRecurringScheduledAction_CancelOccurrence() + { + List allResourceids = GetTestResourceIdentifiers(DefaultSubscription.Id.Name, DefaultResourceGroupResource.Data.Name).ToList(); + ScheduledActionResource sa = await CreateAndValidateScheduledAction("cat-aa-", s_startScheduleTime, isDisabled: false); + var scheduledActionName = sa.Data.Name; + + try + { + // attach + ScheduledActionResourceModel[] res = RecurringScheduledActionUtils.GenerateResources(allResourceids); + ResourceAttachContent attachContent = new(res); + RecurringActionsResourceOperationResult attachResult = await sa.AttachResourcesAsync(attachContent); + + Assert.NotNull(attachResult); + foreach (ResourceStatus attachRes in attachResult.ResourcesStatuses) + { + Assert.IsTrue(attachRes.Status.Equals(ResourceOperationStatus.Succeeded)); + } + + await Task.Delay(Recording.Random.Next(1000, 2000)); + OccurrenceCollection occurrences = sa.GetOccurrences(); + + var occurrenceList = new List(); + + await foreach (OccurrenceResource item in occurrences.GetAllAsync()) + { + occurrenceList.Add(item); + } + + if (occurrenceList.Count > 0) + { + IOrderedEnumerable sortedOccurrences = occurrenceList.OrderBy(o => o.Data.Properties.ScheduledOn); + + await CancelOccurrenceTask(sortedOccurrences.First(), allResourceids, sa, OccurrenceState.Scheduled, "RsScheduled"); + + await CancelOccurrenceTask(sortedOccurrences.Last(), allResourceids, sa, OccurrenceState.Created, "RsCreated"); + } + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + // delete AA + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + + [TestCase, Order(7)] + [RecordedTest] + public async Task TestRecurringScheduledAction_DelayOccurrence() + { + List allResourceids = GetTestResourceIdentifiers(DefaultSubscription.Id.Name, DefaultResourceGroupResource.Data.Name).ToList(); + ScheduledActionResource sa = await CreateAndValidateScheduledAction("del-sch-", s_startScheduleTime, isDisabled: false); + var scheduledActionName = sa.Data.Name; + try + { + // attach + ScheduledActionResourceModel[] res = RecurringScheduledActionUtils.GenerateResources(allResourceids); + ResourceAttachContent attachContent = new(res); + RecurringActionsResourceOperationResult attachResult = await sa.AttachResourcesAsync(attachContent); + + Assert.NotNull(attachResult); + foreach (ResourceStatus attachRes in attachResult.ResourcesStatuses) + { + Assert.IsTrue(attachRes.Status.Equals(ResourceOperationStatus.Succeeded)); + } + + await Task.Delay(Recording.Random.Next(1000, 2000)); + OccurrenceCollection occurrences = sa.GetOccurrences(); + var occurrenceList = new List(); + await foreach (OccurrenceResource item in occurrences.GetAllAsync()) + { + occurrenceList.Add(item); + } + + if (occurrenceList.Count > 0) + { + IOrderedEnumerable sortedOccurrences = occurrenceList.OrderBy(o => o.Data.Properties.ScheduledOn); + + await DelayOccurrenceTask(sortedOccurrences.First(), allResourceids, sa, OccurrenceState.Scheduled, "RsScheduled"); + await DelayOccurrenceTask(sortedOccurrences.Last(), allResourceids, sa, OccurrenceState.Created, "RsCreated"); + } + } + catch (AssertionException ex) + { + Console.WriteLine($"Assertion failed: {ex.Message}"); + } + finally + { + // delete AA + await DeleteScheduledAction(DefaultSubscription.Id.Name, Client, scheduledActionName, DefaultResourceGroupResource, false); + } + } + #endregion + + #region Private methods + private static HashSet GetTestResourceIdentifiers(string subId, string resourceGroupName) + { + var vmNames = new[] { "crud-vm66690", "crud-vm4060" }; + IEnumerable resourceIds = vmNames.Select(vmName => + new ResourceIdentifier($"/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") + ); + return [.. resourceIds]; + } + + private async Task CancelOccurrenceTask(OccurrenceResource occ, List resources, ScheduledActionResource scheduledAction, OccurrenceState occurrenceStateConfirm, string resourceStateConfirm) + { + await occ.CancelAsync(new(resourceIds: [resources[0]])); + + // Validate cancel + OccurrenceResource cancelledOcc = await scheduledAction.GetOccurrences().GetAsync(occ.Data.Name); + Assert.NotNull(cancelledOcc); + Assert.True(cancelledOcc.Data.Properties.ProvisioningState == occurrenceStateConfirm); + + List occResources = []; + + // get the resources from the cancelled occurrence + await foreach (OccurrenceResourceModel item in cancelledOcc.GetResourcesAsync()) + { + occResources.Add(item); + } + + // get the min time of the resources in the occurrence + DateTimeOffset minTime = occResources.Select(item => item.ScheduledOn).Min(); + Assert.AreEqual(cancelledOcc.Data.Properties.ScheduledOn, minTime); + + foreach (OccurrenceResourceModel item in occResources) + { + if (item.ResourceId == resources[0]) + { + Assert.AreEqual(item.ProvisioningState.ToString(), "RsCanceled"); + } + else + { + Assert.AreEqual(item.ProvisioningState.ToString(), resourceStateConfirm); + } + } + + // cancel all resources + await occ.CancelAsync(new(resourceIds: [])); + + // Validate all cancel + OccurrenceResource allCancelled = await scheduledAction.GetOccurrences().GetAsync(occ.Data.Name); + Assert.NotNull(allCancelled); + Assert.True(allCancelled.Data.Properties.ProvisioningState == OccurrenceState.Canceled); + + List allCancelledResources = []; + + // get the resources from the allCancelled occurrence + await foreach (OccurrenceResourceModel item in allCancelled.GetResourcesAsync()) + { + allCancelledResources.Add(item); + } + + foreach (OccurrenceResourceModel item in allCancelledResources) + { + Assert.AreEqual(item.ProvisioningState.ToString(), "RsCanceled"); + } + } + + private async Task DelayOccurrenceTask(OccurrenceResource occ, List resources, ScheduledActionResource scheduledAction, OccurrenceState occurrenceStateConfirm, string resourceStateConfirm) + { + Assert.True(occ.Data.Properties.ProvisioningState == occurrenceStateConfirm); + + // delay subset of resources + DateTimeOffset delayTimeOne = occ.Data.Properties.ScheduledOn.AddHours(2); + DelayContent delayContentSubset = new(resourceIds: [resources[0]], delay: delayTimeOne); + + await occ.DelayAsync(WaitUntil.Completed, delayContentSubset); + + // Validate delay + OccurrenceResource delayedOcc = await scheduledAction.GetOccurrences().GetAsync(occ.Data.Name); + + Assert.NotNull(delayedOcc); + Assert.True(delayedOcc.Data.Properties.ProvisioningState == occurrenceStateConfirm); + List occResources = []; + + await foreach (OccurrenceResourceModel item in delayedOcc.GetResourcesAsync()) + { + occResources.Add(item); + } + + // get the min time of the resources in the occurrence + DateTimeOffset minTime = occResources.Select(item => item.ScheduledOn).Min(); + Assert.AreEqual(delayedOcc.Data.Properties.ScheduledOn, minTime); + + foreach (OccurrenceResourceModel item in occResources) + { + Assert.AreEqual(item.ProvisioningState.ToString(), resourceStateConfirm); + + if (item.ResourceId == resources[0]) + { + Assert.AreEqual(delayTimeOne, item.ScheduledOn); + } + else + { + Assert.AreNotEqual(delayTimeOne, item.ScheduledOn); + } + } + + // delay all resources + DateTimeOffset delayAllTime = delayTimeOne.AddMinutes(45); + DelayContent delayAllContent = new(resourceIds: [], delay: delayAllTime); + + await occ.DelayAsync(WaitUntil.Completed, delayAllContent); + + // Validate delay + OccurrenceResource delayedAllOcc = await scheduledAction.GetOccurrences().GetAsync(occ.Data.Name); + Assert.NotNull(delayedAllOcc); + Assert.True(delayedAllOcc.Data.Properties.ProvisioningState == occurrenceStateConfirm); + Assert.AreEqual(delayAllTime, delayedAllOcc.Data.Properties.ScheduledOn); + + await foreach (OccurrenceResourceModel item in delayedOcc.GetResourcesAsync()) + { + Assert.AreEqual(delayAllTime, item.ScheduledOn); + Assert.AreEqual(item.ProvisioningState.ToString(), resourceStateConfirm); + } + } + + private async Task CreateAndValidateScheduledAction(string saNamePrefix, TimeSpan scheduleTime, bool isDisabled = true) + { + string scheduledActionName = Recording.GenerateAssetName(saNamePrefix); + var actiontype = new ScheduledActionType("Deallocate"); + ScheduledActionDeadlineType deadlineType = ScheduledActionDeadlineType.InitiateAt; + DateTimeOffset startsOn = Recording.Now.AddMonths(-1); + DateTimeOffset endsOn = Recording.Now.AddMonths(1); + UserRequestRetryPolicy retryPolicy = new() { RetryCount = 3, RetryWindowInMinutes = 30 }; + ScheduledActionData data = RecurringScheduledActionUtils.GenerateScheduledActionData( + scheduledActionName, + "Eastus2euap", + retryPolicy, + deadlineType, + startsOn, + endsOn, + actiontype, + scheduleTime, + "UTC", + isDisabled: isDisabled, + DefaultSubscription.Id.Name, + DefaultResourceGroupResource.Id.Name + ); + + // create scheduledaction + ScheduledActionCollection collection = DefaultResourceGroupResource.GetScheduledActions(); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, scheduledActionName, data); + ScheduledActionResource result = lro.Value; + + if (isDisabled) + { + Assert.True(result.Data.Properties.Disabled); + } + else + { + Assert.False(result.Data.Properties.Disabled); + } + + Assert.NotNull(result); + Assert.True(result.Data.Name.Equals(scheduledActionName)); + Assert.True(result.Data.Properties.ActionType.Equals(actiontype)); + Assert.True(result.Data.Properties.Schedule.ScheduledTime.Equals(scheduleTime)); + Assert.True(result.Data.Properties.StartOn.Equals(startsOn)); + Assert.True(result.Data.Properties.EndOn.Equals(endsOn)); + Assert.AreEqual(result.Data.ResourceType, "microsoft.computeschedule/scheduledactions"); + + return result; + } + #endregion +*/ + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml index a1e8be2a82fb..14cdd31377de 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 -repo: Azure/azure-rest-api-specs \ No newline at end of file +commit: 9bb1d0cb26f08a96078513e68e6207d078206a58 +repo: Azure/azure-rest-api-specs diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md index 73bdff2a9d1b..b07b3849c09d 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.4 (Unreleased) +## 1.3.0-beta.5 (Unreleased) ### Features Added @@ -10,6 +10,15 @@ ### Other Changes +## 1.3.0-beta.4 (2025-09-16) + +### Bugs Fixed + +- Added missing ContainerGroup properties: ConfigMap, ContainerGroupProfile, StandbyPoolProfile, and IsCreatedFromStandbyPool. +- Corrected required flag on properties in Container and ContainerGroup models. +- Fixed the response handling for ContainerGroupProfile DELETE operation. +- Aligned requiredness of ContainerGroupProfile properties and normalized the Revision property format with the existing codebase. + ## 1.3.0-beta.3 (2025-08-11) ### Features Added diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.net8.0.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.net8.0.cs index ff3f31ad01a5..19fbd1b8eacb 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.net8.0.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.net8.0.cs @@ -30,7 +30,8 @@ public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable containers, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType osType) { } public string ConfidentialComputeCcePolicy { get { throw null; } set { } } - public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType ContainerGroupOSType { get { throw null; } set { } } + public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? ContainerGroupOSType { get { throw null; } set { } } + public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition ContainerGroupProfile { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProvisioningState? ContainerGroupProvisioningState { get { throw null; } } public System.Collections.Generic.IList Containers { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics DiagnosticsLogAnalytics { get { throw null; } set { } } @@ -43,6 +44,7 @@ public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections. public System.Collections.Generic.IList InitContainers { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView InstanceView { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress IPAddress { get { throw null; } set { } } + public bool? IsCreatedFromStandbyPool { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType OSType { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? Priority { get { throw null; } set { } } @@ -50,6 +52,7 @@ public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections. public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? RestartPolicy { get { throw null; } set { } } public System.Collections.Generic.IList SecretReferences { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? Sku { get { throw null; } set { } } + public Azure.ResourceManager.ContainerInstance.Models.StandbyPoolProfileDefinition StandbyPoolProfile { get { throw null; } set { } } public System.Collections.Generic.IList SubnetIds { get { throw null; } } public System.Collections.Generic.IList Volumes { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } @@ -92,9 +95,9 @@ public ContainerGroupProfileData(Azure.Core.AzureLocation location, System.Colle public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress IPAddress { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? OSType { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? Priority { get { throw null; } set { } } - public System.Collections.Generic.IList RegisteredRevisions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RegisteredRevisions { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? RestartPolicy { get { throw null; } set { } } - public long? Revision { get { throw null; } set { } } + public int? Revision { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition SecurityContext { get { throw null; } set { } } public System.DateTimeOffset? ShutdownGracePeriod { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? Sku { get { throw null; } set { } } @@ -376,14 +379,16 @@ public static partial class ArmContainerInstanceModelFactory public static Azure.ResourceManager.ContainerInstance.Models.ContainerCapabilities ContainerCapabilities(string resourceType = null, string osType = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string ipAddressType = null, string gpu = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSupportedCapabilities capabilities = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerEvent ContainerEvent(int? count = default(int?), System.DateTimeOffset? firstTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? lastTimestamp = default(System.DateTimeOffset?), string name = null, string message = null, string eventType = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerExecResult ContainerExecResult(System.Uri webSocketUri = null, string password = null) { throw null; } - public static Azure.ResourceManager.ContainerInstance.ContainerGroupData ContainerGroupData(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.ContainerInstance.Models.ContainerGroupProvisioningState? containerGroupProvisioningState = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProvisioningState?), System.Collections.Generic.IEnumerable secretReferences = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType containerGroupOSType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, System.Collections.Generic.IEnumerable subnetIds = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupDnsConfiguration dnsConfig = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIdentityAccessControlLevels identityAcls = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.ContainerInstance.ContainerGroupData ContainerGroupData(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.ContainerInstance.Models.ContainerGroupProvisioningState? containerGroupProvisioningState = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProvisioningState?), System.Collections.Generic.IEnumerable secretReferences = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? containerGroupOSType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType?), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, System.Collections.Generic.IEnumerable subnetIds = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupDnsConfiguration dnsConfig = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIdentityAccessControlLevels identityAcls = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition containerGroupProfile = null, Azure.ResourceManager.ContainerInstance.Models.StandbyPoolProfileDefinition standbyPoolProfile = null, bool? isCreatedFromStandbyPool = default(bool?), System.Collections.Generic.IEnumerable zones = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerInstance.ContainerGroupData ContainerGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable containers, System.Collections.Generic.IEnumerable imageRegistryCredentials, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType osType, System.Collections.Generic.IEnumerable volumes, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView instanceView, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics, System.Collections.Generic.IEnumerable subnetIds, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupDnsConfiguration dnsConfig, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? sku, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties, System.Collections.Generic.IEnumerable initContainers, System.Collections.Generic.IEnumerable extensions, string confidentialComputeCcePolicy, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView ContainerGroupInstanceView(System.Collections.Generic.IEnumerable events = null, string state = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ContainerGroupIPAddress(System.Collections.Generic.IEnumerable ports = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddressType addressType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddressType), System.Net.IPAddress ip = null, string dnsNameLabel = null, Azure.ResourceManager.ContainerInstance.Models.DnsNameLabelReusePolicy? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerInstance.Models.DnsNameLabelReusePolicy?), string fqdn = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPatch ContainerGroupPatch(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), System.Collections.Generic.IEnumerable zones = null) { throw null; } - public static Azure.ResourceManager.ContainerInstance.ContainerGroupProfileData ContainerGroupProfileData(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.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), System.DateTimeOffset? shutdownGracePeriod = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, System.DateTimeOffset? timeToLive = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? osType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType?), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null, long? revision = default(long?), System.Collections.Generic.IEnumerable registeredRevisions = null, bool? useKrypton = default(bool?), System.Collections.Generic.IEnumerable zones = null) { throw null; } - public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceContainer ContainerInstanceContainer(string name = null, string image = null, System.Collections.Generic.IEnumerable command = null, System.Collections.Generic.IEnumerable ports = null, System.Collections.Generic.IEnumerable environmentVariables = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources = null, System.Collections.Generic.IEnumerable volumeMounts = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe livenessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe readinessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null) { throw null; } + public static Azure.ResourceManager.ContainerInstance.ContainerGroupProfileData ContainerGroupProfileData(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.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), System.DateTimeOffset? shutdownGracePeriod = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, System.DateTimeOffset? timeToLive = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? osType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType?), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null, int? revision = default(int?), System.Collections.Generic.IEnumerable registeredRevisions = null, bool? useKrypton = default(bool?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceContainer ContainerInstanceContainer(string name, string image, System.Collections.Generic.IEnumerable command, System.Collections.Generic.IEnumerable ports, System.Collections.Generic.IEnumerable environmentVariables, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView instanceView, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources, System.Collections.Generic.IEnumerable volumeMounts, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe livenessProbe, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe readinessProbe, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext) { throw null; } + public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceContainer ContainerInstanceContainer(string name = null, string image = null, System.Collections.Generic.IEnumerable command = null, System.Collections.Generic.IEnumerable ports = null, System.Collections.Generic.IEnumerable environmentVariables = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources = null, System.Collections.Generic.IEnumerable volumeMounts = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe livenessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe readinessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null, System.Collections.Generic.IDictionary configMapKeyValuePairs = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceUsage ContainerInstanceUsage(string id = null, string unit = null, int? currentValue = default(int?), int? limit = default(int?), Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceUsageName name = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceUsageName ContainerInstanceUsageName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView ContainerInstanceView(int? restartCount = default(int?), Azure.ResourceManager.ContainerInstance.Models.ContainerState currentState = null, Azure.ResourceManager.ContainerInstance.Models.ContainerState previousState = null, System.Collections.Generic.IEnumerable events = null) { throw null; } @@ -857,6 +862,18 @@ 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 ContainerGroupProfileReferenceDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerGroupProfileReferenceDefinition() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public int? Revision { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition 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.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition 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 ContainerGroupProfileStub : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerGroupProfileStub() { } @@ -1026,9 +1043,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerInstanceContainer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public ContainerInstanceContainer(string name) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ContainerInstanceContainer(string name, string image, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources) { } public System.Collections.Generic.IList Command { get { throw null; } } + public System.Collections.Generic.IDictionary ConfigMapKeyValuePairs { get { throw null; } } public System.Collections.Generic.IList EnvironmentVariables { get { throw null; } } public string Image { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView InstanceView { get { throw null; } } @@ -1500,4 +1519,16 @@ 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 StandbyPoolProfileDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StandbyPoolProfileDefinition() { } + public bool? FailContainerGroupCreateOnReuseFailure { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerInstance.Models.StandbyPoolProfileDefinition 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.ContainerInstance.Models.StandbyPoolProfileDefinition 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/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.netstandard2.0.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.netstandard2.0.cs index ff3f31ad01a5..19fbd1b8eacb 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.netstandard2.0.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/api/Azure.ResourceManager.ContainerInstance.netstandard2.0.cs @@ -30,7 +30,8 @@ public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable containers, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType osType) { } public string ConfidentialComputeCcePolicy { get { throw null; } set { } } - public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType ContainerGroupOSType { get { throw null; } set { } } + public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? ContainerGroupOSType { get { throw null; } set { } } + public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition ContainerGroupProfile { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProvisioningState? ContainerGroupProvisioningState { get { throw null; } } public System.Collections.Generic.IList Containers { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics DiagnosticsLogAnalytics { get { throw null; } set { } } @@ -43,6 +44,7 @@ public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections. public System.Collections.Generic.IList InitContainers { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView InstanceView { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress IPAddress { get { throw null; } set { } } + public bool? IsCreatedFromStandbyPool { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType OSType { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? Priority { get { throw null; } set { } } @@ -50,6 +52,7 @@ public ContainerGroupData(Azure.Core.AzureLocation location, System.Collections. public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? RestartPolicy { get { throw null; } set { } } public System.Collections.Generic.IList SecretReferences { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? Sku { get { throw null; } set { } } + public Azure.ResourceManager.ContainerInstance.Models.StandbyPoolProfileDefinition StandbyPoolProfile { get { throw null; } set { } } public System.Collections.Generic.IList SubnetIds { get { throw null; } } public System.Collections.Generic.IList Volumes { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } @@ -92,9 +95,9 @@ public ContainerGroupProfileData(Azure.Core.AzureLocation location, System.Colle public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress IPAddress { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? OSType { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? Priority { get { throw null; } set { } } - public System.Collections.Generic.IList RegisteredRevisions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RegisteredRevisions { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? RestartPolicy { get { throw null; } set { } } - public long? Revision { get { throw null; } set { } } + public int? Revision { get { throw null; } } public Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition SecurityContext { get { throw null; } set { } } public System.DateTimeOffset? ShutdownGracePeriod { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? Sku { get { throw null; } set { } } @@ -376,14 +379,16 @@ public static partial class ArmContainerInstanceModelFactory public static Azure.ResourceManager.ContainerInstance.Models.ContainerCapabilities ContainerCapabilities(string resourceType = null, string osType = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string ipAddressType = null, string gpu = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSupportedCapabilities capabilities = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerEvent ContainerEvent(int? count = default(int?), System.DateTimeOffset? firstTimestamp = default(System.DateTimeOffset?), System.DateTimeOffset? lastTimestamp = default(System.DateTimeOffset?), string name = null, string message = null, string eventType = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerExecResult ContainerExecResult(System.Uri webSocketUri = null, string password = null) { throw null; } - public static Azure.ResourceManager.ContainerInstance.ContainerGroupData ContainerGroupData(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.ContainerInstance.Models.ContainerGroupProvisioningState? containerGroupProvisioningState = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProvisioningState?), System.Collections.Generic.IEnumerable secretReferences = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType containerGroupOSType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, System.Collections.Generic.IEnumerable subnetIds = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupDnsConfiguration dnsConfig = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIdentityAccessControlLevels identityAcls = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.ContainerInstance.ContainerGroupData ContainerGroupData(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.ContainerInstance.Models.ContainerGroupProvisioningState? containerGroupProvisioningState = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProvisioningState?), System.Collections.Generic.IEnumerable secretReferences = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? containerGroupOSType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType?), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, System.Collections.Generic.IEnumerable subnetIds = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupDnsConfiguration dnsConfig = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIdentityAccessControlLevels identityAcls = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition containerGroupProfile = null, Azure.ResourceManager.ContainerInstance.Models.StandbyPoolProfileDefinition standbyPoolProfile = null, bool? isCreatedFromStandbyPool = default(bool?), System.Collections.Generic.IEnumerable zones = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerInstance.ContainerGroupData ContainerGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable containers, System.Collections.Generic.IEnumerable imageRegistryCredentials, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType osType, System.Collections.Generic.IEnumerable volumes, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView instanceView, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics, System.Collections.Generic.IEnumerable subnetIds, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupDnsConfiguration dnsConfig, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku? sku, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties, System.Collections.Generic.IEnumerable initContainers, System.Collections.Generic.IEnumerable extensions, string confidentialComputeCcePolicy, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerGroupInstanceView ContainerGroupInstanceView(System.Collections.Generic.IEnumerable events = null, string state = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ContainerGroupIPAddress(System.Collections.Generic.IEnumerable ports = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddressType addressType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddressType), System.Net.IPAddress ip = null, string dnsNameLabel = null, Azure.ResourceManager.ContainerInstance.Models.DnsNameLabelReusePolicy? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerInstance.Models.DnsNameLabelReusePolicy?), string fqdn = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPatch ContainerGroupPatch(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), System.Collections.Generic.IEnumerable zones = null) { throw null; } - public static Azure.ResourceManager.ContainerInstance.ContainerGroupProfileData ContainerGroupProfileData(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.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), System.DateTimeOffset? shutdownGracePeriod = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, System.DateTimeOffset? timeToLive = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? osType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType?), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null, long? revision = default(long?), System.Collections.Generic.IEnumerable registeredRevisions = null, bool? useKrypton = default(bool?), System.Collections.Generic.IEnumerable zones = null) { throw null; } - public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceContainer ContainerInstanceContainer(string name = null, string image = null, System.Collections.Generic.IEnumerable command = null, System.Collections.Generic.IEnumerable ports = null, System.Collections.Generic.IEnumerable environmentVariables = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources = null, System.Collections.Generic.IEnumerable volumeMounts = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe livenessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe readinessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null) { throw null; } + public static Azure.ResourceManager.ContainerInstance.ContainerGroupProfileData ContainerGroupProfileData(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.ContainerInstance.Models.ContainerGroupSku? sku = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupSku?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null, System.Collections.Generic.IEnumerable extensions = null, System.Collections.Generic.IEnumerable imageRegistryCredentials = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy? restartPolicy = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupRestartPolicy?), System.DateTimeOffset? shutdownGracePeriod = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerGroupIPAddress ipAddress = null, System.DateTimeOffset? timeToLive = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType? osType = default(Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceOperatingSystemType?), System.Collections.Generic.IEnumerable volumes = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority? priority = default(Azure.ResourceManager.ContainerInstance.Models.ContainerGroupPriority?), string confidentialComputeCcePolicy = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null, int? revision = default(int?), System.Collections.Generic.IEnumerable registeredRevisions = null, bool? useKrypton = default(bool?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceContainer ContainerInstanceContainer(string name, string image, System.Collections.Generic.IEnumerable command, System.Collections.Generic.IEnumerable ports, System.Collections.Generic.IEnumerable environmentVariables, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView instanceView, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources, System.Collections.Generic.IEnumerable volumeMounts, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe livenessProbe, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe readinessProbe, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext) { throw null; } + public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceContainer ContainerInstanceContainer(string name = null, string image = null, System.Collections.Generic.IEnumerable command = null, System.Collections.Generic.IEnumerable ports = null, System.Collections.Generic.IEnumerable environmentVariables = null, Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView instanceView = null, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources = null, System.Collections.Generic.IEnumerable volumeMounts = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe livenessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerProbe readinessProbe = null, Azure.ResourceManager.ContainerInstance.Models.ContainerSecurityContextDefinition securityContext = null, System.Collections.Generic.IDictionary configMapKeyValuePairs = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceUsage ContainerInstanceUsage(string id = null, string unit = null, int? currentValue = default(int?), int? limit = default(int?), Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceUsageName name = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceUsageName ContainerInstanceUsageName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView ContainerInstanceView(int? restartCount = default(int?), Azure.ResourceManager.ContainerInstance.Models.ContainerState currentState = null, Azure.ResourceManager.ContainerInstance.Models.ContainerState previousState = null, System.Collections.Generic.IEnumerable events = null) { throw null; } @@ -857,6 +862,18 @@ 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 ContainerGroupProfileReferenceDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerGroupProfileReferenceDefinition() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public int? Revision { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition 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.ContainerInstance.Models.ContainerGroupProfileReferenceDefinition 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 ContainerGroupProfileStub : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerGroupProfileStub() { } @@ -1026,9 +1043,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerInstanceContainer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public ContainerInstanceContainer(string name) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ContainerInstanceContainer(string name, string image, Azure.ResourceManager.ContainerInstance.Models.ContainerResourceRequirements resources) { } public System.Collections.Generic.IList Command { get { throw null; } } + public System.Collections.Generic.IDictionary ConfigMapKeyValuePairs { get { throw null; } } public System.Collections.Generic.IList EnvironmentVariables { get { throw null; } } public string Image { get { throw null; } set { } } public Azure.ResourceManager.ContainerInstance.Models.ContainerInstanceView InstanceView { get { throw null; } } @@ -1500,4 +1519,16 @@ 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 StandbyPoolProfileDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StandbyPoolProfileDefinition() { } + public bool? FailContainerGroupCreateOnReuseFailure { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerInstance.Models.StandbyPoolProfileDefinition 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.ContainerInstance.Models.StandbyPoolProfileDefinition 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/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj index 99a4bcdb3987..521de8c736a8 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Azure.ResourceManager.ContainerInstance.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.4 + 1.3.0-beta.5 1.2.1 Azure.ResourceManager.ContainerInstance diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ArmContainerInstanceModelFactory.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ArmContainerInstanceModelFactory.cs index 9746b45890ba..6bd024769fab 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ArmContainerInstanceModelFactory.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ArmContainerInstanceModelFactory.cs @@ -51,7 +51,7 @@ public static partial class ArmContainerInstanceModelFactory [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerGroupData ContainerGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IEnumerable zones, ManagedServiceIdentity identity, string provisioningState, IEnumerable containers, IEnumerable imageRegistryCredentials, ContainerGroupRestartPolicy? restartPolicy, ContainerGroupIPAddress ipAddress, ContainerInstanceOperatingSystemType osType, IEnumerable volumes, ContainerGroupInstanceView instanceView, ContainerGroupLogAnalytics diagnosticsLogAnalytics, IEnumerable subnetIds, ContainerGroupDnsConfiguration dnsConfig, ContainerGroupSku? sku, ContainerGroupEncryptionProperties encryptionProperties, IEnumerable initContainers, IEnumerable extensions, string confidentialComputeCcePolicy, ContainerGroupPriority? priority) { - return new ContainerGroupData(id, name, resourceType, systemData, tags, location, identity, provisioningState, null, containers.ToList(), imageRegistryCredentials.ToList(), restartPolicy, ipAddress, default, volumes.ToList(), instanceView, null, subnetIds.ToList(), dnsConfig, sku, encryptionProperties, initContainers.ToList(), extensions.ToList(), null, priority, null, zones.ToList(), null); + return new ContainerGroupData(id, name, resourceType, systemData, tags, location, identity, provisioningState, null, containers.ToList(), imageRegistryCredentials.ToList(), restartPolicy, ipAddress, default, volumes.ToList(), instanceView, null, subnetIds.ToList(), dnsConfig, sku, encryptionProperties, initContainers.ToList(), extensions.ToList(), null, priority, null, null, null, null, zones.ToList(), null); } } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ContainerGroupProfileData.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ContainerGroupProfileData.cs index b67271952018..024ff94cb9e3 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ContainerGroupProfileData.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Customized/ContainerGroupProfileData.cs @@ -36,7 +36,7 @@ public ContainerGroupProfileData(AzureLocation location, IEnumerable(); Extensions = new ChangeTrackingList(); Zones = new ChangeTrackingList(); - RegisteredRevisions = new ChangeTrackingList(); + RegisteredRevisions = new ChangeTrackingList(); } } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ArmContainerInstanceModelFactory.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ArmContainerInstanceModelFactory.cs index e273304f74f0..fbfb03a6f4fd 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ArmContainerInstanceModelFactory.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ArmContainerInstanceModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -50,9 +51,12 @@ public static partial class ArmContainerInstanceModelFactory /// The properties for confidential container group. /// The priority of the container group. /// The access control levels of the identities. + /// The reference container group profile properties. + /// The reference standby pool profile properties. + /// The flag to determine whether the container group is created from standby pool. /// The zones for the container group. /// A new instance for mocking. - public static ContainerGroupData ContainerGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ContainerGroupProvisioningState? containerGroupProvisioningState = null, IEnumerable secretReferences = null, IEnumerable containers = null, IEnumerable imageRegistryCredentials = null, ContainerGroupRestartPolicy? restartPolicy = null, ContainerGroupIPAddress ipAddress = null, ContainerInstanceOperatingSystemType containerGroupOSType = default, IEnumerable volumes = null, ContainerGroupInstanceView instanceView = null, ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, IEnumerable subnetIds = null, ContainerGroupDnsConfiguration dnsConfig = null, ContainerGroupSku? sku = null, ContainerGroupEncryptionProperties encryptionProperties = null, IEnumerable initContainers = null, IEnumerable extensions = null, string confidentialComputeCcePolicy = null, ContainerGroupPriority? priority = null, ContainerGroupIdentityAccessControlLevels identityAcls = null, IEnumerable zones = null) + public static ContainerGroupData ContainerGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ContainerGroupProvisioningState? containerGroupProvisioningState = null, IEnumerable secretReferences = null, IEnumerable containers = null, IEnumerable imageRegistryCredentials = null, ContainerGroupRestartPolicy? restartPolicy = null, ContainerGroupIPAddress ipAddress = null, ContainerInstanceOperatingSystemType? containerGroupOSType = null, IEnumerable volumes = null, ContainerGroupInstanceView instanceView = null, ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, IEnumerable subnetIds = null, ContainerGroupDnsConfiguration dnsConfig = null, ContainerGroupSku? sku = null, ContainerGroupEncryptionProperties encryptionProperties = null, IEnumerable initContainers = null, IEnumerable extensions = null, string confidentialComputeCcePolicy = null, ContainerGroupPriority? priority = null, ContainerGroupIdentityAccessControlLevels identityAcls = null, ContainerGroupProfileReferenceDefinition containerGroupProfile = null, StandbyPoolProfileDefinition standbyPoolProfile = null, bool? isCreatedFromStandbyPool = null, IEnumerable zones = null) { tags ??= new Dictionary(); secretReferences ??= new List(); @@ -91,6 +95,9 @@ public static ContainerGroupData ContainerGroupData(ResourceIdentifier id = null confidentialComputeCcePolicy != null ? new ConfidentialComputeProperties(confidentialComputeCcePolicy, serializedAdditionalRawData: null) : null, priority, identityAcls, + containerGroupProfile, + standbyPoolProfile, + isCreatedFromStandbyPool, zones?.ToList(), serializedAdditionalRawData: null); } @@ -132,13 +139,15 @@ public static ContainerGroupPatch ContainerGroupPatch(ResourceIdentifier id = nu /// The liveness probe. /// The readiness probe. /// The container security properties. + /// The config map. /// A new instance for mocking. - public static ContainerInstanceContainer ContainerInstanceContainer(string name = null, string image = null, IEnumerable command = null, IEnumerable ports = null, IEnumerable environmentVariables = null, ContainerInstanceView instanceView = null, ContainerResourceRequirements resources = null, IEnumerable volumeMounts = null, ContainerProbe livenessProbe = null, ContainerProbe readinessProbe = null, ContainerSecurityContextDefinition securityContext = null) + public static ContainerInstanceContainer ContainerInstanceContainer(string name = null, string image = null, IEnumerable command = null, IEnumerable ports = null, IEnumerable environmentVariables = null, ContainerInstanceView instanceView = null, ContainerResourceRequirements resources = null, IEnumerable volumeMounts = null, ContainerProbe livenessProbe = null, ContainerProbe readinessProbe = null, ContainerSecurityContextDefinition securityContext = null, IDictionary configMapKeyValuePairs = null) { command ??= new List(); ports ??= new List(); environmentVariables ??= new List(); volumeMounts ??= new List(); + configMapKeyValuePairs ??= new Dictionary(); return new ContainerInstanceContainer( name, @@ -152,6 +161,7 @@ public static ContainerInstanceContainer ContainerInstanceContainer(string name livenessProbe, readinessProbe, securityContext, + configMapKeyValuePairs != null ? new ConfigMap(configMapKeyValuePairs, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } @@ -472,7 +482,7 @@ public static NGroupPatch NGroupPatch(SystemData systemData = null, ManagedServi /// Gets or sets Krypton use property. /// The zones for the container group. /// A new instance for mocking. - public static ContainerGroupProfileData ContainerGroupProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerGroupSku? sku = null, ContainerGroupEncryptionProperties encryptionProperties = null, IEnumerable containers = null, IEnumerable initContainers = null, IEnumerable extensions = null, IEnumerable imageRegistryCredentials = null, ContainerGroupRestartPolicy? restartPolicy = null, DateTimeOffset? shutdownGracePeriod = null, ContainerGroupIPAddress ipAddress = null, DateTimeOffset? timeToLive = null, ContainerInstanceOperatingSystemType? osType = null, IEnumerable volumes = null, ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, ContainerGroupPriority? priority = null, string confidentialComputeCcePolicy = null, ContainerSecurityContextDefinition securityContext = null, long? revision = null, IEnumerable registeredRevisions = null, bool? useKrypton = null, IEnumerable zones = null) + public static ContainerGroupProfileData ContainerGroupProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerGroupSku? sku = null, ContainerGroupEncryptionProperties encryptionProperties = null, IEnumerable containers = null, IEnumerable initContainers = null, IEnumerable extensions = null, IEnumerable imageRegistryCredentials = null, ContainerGroupRestartPolicy? restartPolicy = null, DateTimeOffset? shutdownGracePeriod = null, ContainerGroupIPAddress ipAddress = null, DateTimeOffset? timeToLive = null, ContainerInstanceOperatingSystemType? osType = null, IEnumerable volumes = null, ContainerGroupLogAnalytics diagnosticsLogAnalytics = null, ContainerGroupPriority? priority = null, string confidentialComputeCcePolicy = null, ContainerSecurityContextDefinition securityContext = null, int? revision = null, IEnumerable registeredRevisions = null, bool? useKrypton = null, IEnumerable zones = null) { tags ??= new Dictionary(); containers ??= new List(); @@ -480,7 +490,7 @@ public static ContainerGroupProfileData ContainerGroupProfileData(ResourceIdenti extensions ??= new List(); imageRegistryCredentials ??= new List(); volumes ??= new List(); - registeredRevisions ??= new List(); + registeredRevisions ??= new List(); zones ??= new List(); return new ContainerGroupProfileData( @@ -512,5 +522,24 @@ public static ContainerGroupProfileData ContainerGroupProfileData(ResourceIdenti zones?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The user-provided name of the container instance. + /// The name of the image used to create the container instance. + /// The commands to execute within the container instance in exec form. + /// The exposed ports on the container instance. + /// The environment variables to set in the container instance. + /// The instance view of the container instance. Only valid in response. + /// The resource requirements of the container instance. + /// The volume mounts available to the container instance. + /// The liveness probe. + /// The readiness probe. + /// The container security properties. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerInstanceContainer ContainerInstanceContainer(string name, string image, IEnumerable command, IEnumerable ports, IEnumerable environmentVariables, ContainerInstanceView instanceView, ContainerResourceRequirements resources, IEnumerable volumeMounts, ContainerProbe livenessProbe, ContainerProbe readinessProbe, ContainerSecurityContextDefinition securityContext) + { + return ContainerInstanceContainer(name: name, image: image, command: command, ports: ports, environmentVariables: environmentVariables, instanceView: instanceView, resources: resources, volumeMounts: volumeMounts, livenessProbe: livenessProbe, readinessProbe: readinessProbe, securityContext: securityContext, configMapKeyValuePairs: default); + } } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.Serialization.cs index 9f1de374469d..93ee7d900577 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.Serialization.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.Serialization.cs @@ -97,8 +97,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("ipAddress"u8); writer.WriteObjectValue(IPAddress, options); } - writer.WritePropertyName("osType"u8); - writer.WriteStringValue(ContainerGroupOSType.ToString()); + if (Optional.IsDefined(ContainerGroupOSType)) + { + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(ContainerGroupOSType.Value.ToString()); + } if (Optional.IsCollectionDefined(Volumes)) { writer.WritePropertyName("volumes"u8); @@ -179,6 +182,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("identityAcls"u8); writer.WriteObjectValue(IdentityAcls, options); } + if (Optional.IsDefined(ContainerGroupProfile)) + { + writer.WritePropertyName("containerGroupProfile"u8); + writer.WriteObjectValue(ContainerGroupProfile, options); + } + if (Optional.IsDefined(StandbyPoolProfile)) + { + writer.WritePropertyName("standbyPoolProfile"u8); + writer.WriteObjectValue(StandbyPoolProfile, options); + } + if (options.Format != "W" && Optional.IsDefined(IsCreatedFromStandbyPool)) + { + writer.WritePropertyName("isCreatedFromStandbyPool"u8); + writer.WriteBooleanValue(IsCreatedFromStandbyPool.Value); + } writer.WriteEndObject(); } @@ -216,7 +234,7 @@ internal static ContainerGroupData DeserializeContainerGroupData(JsonElement ele IList imageRegistryCredentials = default; ContainerGroupRestartPolicy? restartPolicy = default; ContainerGroupIPAddress ipAddress = default; - ContainerInstanceOperatingSystemType osType = default; + ContainerInstanceOperatingSystemType? osType = default; IList volumes = default; ContainerGroupInstanceView instanceView = default; ContainerGroupDiagnostics diagnostics = default; @@ -229,6 +247,9 @@ internal static ContainerGroupData DeserializeContainerGroupData(JsonElement ele ConfidentialComputeProperties confidentialComputeProperties = default; ContainerGroupPriority? priority = default; ContainerGroupIdentityAccessControlLevels identityAcls = default; + ContainerGroupProfileReferenceDefinition containerGroupProfile = default; + StandbyPoolProfileDefinition standbyPoolProfile = default; + bool? isCreatedFromStandbyPool = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -375,6 +396,10 @@ internal static ContainerGroupData DeserializeContainerGroupData(JsonElement ele } if (property0.NameEquals("osType"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } osType = new ContainerInstanceOperatingSystemType(property0.Value.GetString()); continue; } @@ -506,6 +531,33 @@ internal static ContainerGroupData DeserializeContainerGroupData(JsonElement ele identityAcls = ContainerGroupIdentityAccessControlLevels.DeserializeContainerGroupIdentityAccessControlLevels(property0.Value, options); continue; } + if (property0.NameEquals("containerGroupProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerGroupProfile = ContainerGroupProfileReferenceDefinition.DeserializeContainerGroupProfileReferenceDefinition(property0.Value, options); + continue; + } + if (property0.NameEquals("standbyPoolProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + standbyPoolProfile = StandbyPoolProfileDefinition.DeserializeStandbyPoolProfileDefinition(property0.Value, options); + continue; + } + if (property0.NameEquals("isCreatedFromStandbyPool"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCreatedFromStandbyPool = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -542,6 +594,9 @@ internal static ContainerGroupData DeserializeContainerGroupData(JsonElement ele confidentialComputeProperties, priority, identityAcls, + containerGroupProfile, + standbyPoolProfile, + isCreatedFromStandbyPool, zones ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.cs index 5f0588b95390..421bf6f2abf0 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupData.cs @@ -85,9 +85,12 @@ public partial class ContainerGroupData : TrackedResourceData /// The properties for confidential container group. /// The priority of the container group. /// The access control levels of the identities. + /// The reference container group profile properties. + /// The reference standby pool profile properties. + /// The flag to determine whether the container group is created from standby pool. /// The zones for the container group. /// Keeps track of any properties unknown to the library. - internal ContainerGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ContainerGroupProvisioningState? containerGroupProvisioningState, IList secretReferences, IList containers, IList imageRegistryCredentials, ContainerGroupRestartPolicy? restartPolicy, ContainerGroupIPAddress ipAddress, ContainerInstanceOperatingSystemType containerGroupOSType, IList volumes, ContainerGroupInstanceView instanceView, ContainerGroupDiagnostics diagnostics, IList subnetIds, ContainerGroupDnsConfiguration dnsConfig, ContainerGroupSku? sku, ContainerGroupEncryptionProperties encryptionProperties, IList initContainers, IList extensions, ConfidentialComputeProperties confidentialComputeProperties, ContainerGroupPriority? priority, ContainerGroupIdentityAccessControlLevels identityAcls, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ContainerGroupProvisioningState? containerGroupProvisioningState, IList secretReferences, IList containers, IList imageRegistryCredentials, ContainerGroupRestartPolicy? restartPolicy, ContainerGroupIPAddress ipAddress, ContainerInstanceOperatingSystemType? containerGroupOSType, IList volumes, ContainerGroupInstanceView instanceView, ContainerGroupDiagnostics diagnostics, IList subnetIds, ContainerGroupDnsConfiguration dnsConfig, ContainerGroupSku? sku, ContainerGroupEncryptionProperties encryptionProperties, IList initContainers, IList extensions, ConfidentialComputeProperties confidentialComputeProperties, ContainerGroupPriority? priority, ContainerGroupIdentityAccessControlLevels identityAcls, ContainerGroupProfileReferenceDefinition containerGroupProfile, StandbyPoolProfileDefinition standbyPoolProfile, bool? isCreatedFromStandbyPool, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ContainerGroupProvisioningState = containerGroupProvisioningState; @@ -109,6 +112,9 @@ internal ContainerGroupData(ResourceIdentifier id, string name, ResourceType res ConfidentialComputeProperties = confidentialComputeProperties; Priority = priority; IdentityAcls = identityAcls; + ContainerGroupProfile = containerGroupProfile; + StandbyPoolProfile = standbyPoolProfile; + IsCreatedFromStandbyPool = isCreatedFromStandbyPool; Zones = zones; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -139,7 +145,7 @@ internal ContainerGroupData() /// The IP address type of the container group. public ContainerGroupIPAddress IPAddress { get; set; } /// The operating system type required by the containers in the container group. - public ContainerInstanceOperatingSystemType ContainerGroupOSType { get; set; } + public ContainerInstanceOperatingSystemType? ContainerGroupOSType { get; set; } /// The list of volumes that can be mounted by containers in this container group. public IList Volumes { get; } /// The instance view of the container group. Only valid in response. @@ -188,6 +194,12 @@ public string ConfidentialComputeCcePolicy public ContainerGroupPriority? Priority { get; set; } /// The access control levels of the identities. public ContainerGroupIdentityAccessControlLevels IdentityAcls { get; set; } + /// The reference container group profile properties. + public ContainerGroupProfileReferenceDefinition ContainerGroupProfile { get; set; } + /// The reference standby pool profile properties. + public StandbyPoolProfileDefinition StandbyPoolProfile { get; set; } + /// The flag to determine whether the container group is created from standby pool. + public bool? IsCreatedFromStandbyPool { get; } /// The zones for the container group. public IList Zones { get; } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.Serialization.cs index 6f69d8d32971..ff8bb203a476 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.Serialization.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.Serialization.cs @@ -155,12 +155,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("securityContext"u8); writer.WriteObjectValue(SecurityContext, options); } - if (Optional.IsDefined(Revision)) + if (options.Format != "W" && Optional.IsDefined(Revision)) { writer.WritePropertyName("revision"u8); writer.WriteNumberValue(Revision.Value); } - if (Optional.IsCollectionDefined(RegisteredRevisions)) + if (options.Format != "W" && Optional.IsCollectionDefined(RegisteredRevisions)) { writer.WritePropertyName("registeredRevisions"u8); writer.WriteStartArray(); @@ -221,8 +221,8 @@ internal static ContainerGroupProfileData DeserializeContainerGroupProfileData(J ContainerGroupPriority? priority = default; ConfidentialComputeProperties confidentialComputeProperties = default; ContainerSecurityContextDefinition securityContext = default; - long? revision = default; - IList registeredRevisions = default; + int? revision = default; + IReadOnlyList registeredRevisions = default; bool? useKrypton = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -469,7 +469,7 @@ internal static ContainerGroupProfileData DeserializeContainerGroupProfileData(J { continue; } - revision = property0.Value.GetInt64(); + revision = property0.Value.GetInt32(); continue; } if (property0.NameEquals("registeredRevisions"u8)) @@ -478,10 +478,10 @@ internal static ContainerGroupProfileData DeserializeContainerGroupProfileData(J { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(item.GetInt64()); + array.Add(item.GetInt32()); } registeredRevisions = array; continue; @@ -528,7 +528,7 @@ internal static ContainerGroupProfileData DeserializeContainerGroupProfileData(J confidentialComputeProperties, securityContext, revision, - registeredRevisions ?? new ChangeTrackingList(), + registeredRevisions ?? new ChangeTrackingList(), useKrypton, zones ?? new ChangeTrackingList(), serializedAdditionalRawData); diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.cs index 399833a2ef23..0e5c7b2d633c 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.ContainerInstance { /// /// A class representing the ContainerGroupProfile data model. - /// container group profile object + /// A container group profile object /// public partial class ContainerGroupProfileData : TrackedResourceData { @@ -60,7 +60,7 @@ public ContainerGroupProfileData(AzureLocation location) : base(location) Extensions = new ChangeTrackingList(); ImageRegistryCredentials = new ChangeTrackingList(); Volumes = new ChangeTrackingList(); - RegisteredRevisions = new ChangeTrackingList(); + RegisteredRevisions = new ChangeTrackingList(); Zones = new ChangeTrackingList(); } @@ -98,7 +98,7 @@ public ContainerGroupProfileData(AzureLocation location) : base(location) /// Gets or sets Krypton use property. /// The zones for the container group. /// Keeps track of any properties unknown to the library. - internal ContainerGroupProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerGroupSku? sku, ContainerGroupEncryptionProperties encryptionProperties, IList containers, IList initContainers, IList extensions, IList imageRegistryCredentials, ContainerGroupRestartPolicy? restartPolicy, DateTimeOffset? shutdownGracePeriod, ContainerGroupIPAddress ipAddress, DateTimeOffset? timeToLive, ContainerInstanceOperatingSystemType? osType, IList volumes, ContainerGroupDiagnostics diagnostics, ContainerGroupPriority? priority, ConfidentialComputeProperties confidentialComputeProperties, ContainerSecurityContextDefinition securityContext, long? revision, IList registeredRevisions, bool? useKrypton, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerGroupProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerGroupSku? sku, ContainerGroupEncryptionProperties encryptionProperties, IList containers, IList initContainers, IList extensions, IList imageRegistryCredentials, ContainerGroupRestartPolicy? restartPolicy, DateTimeOffset? shutdownGracePeriod, ContainerGroupIPAddress ipAddress, DateTimeOffset? timeToLive, ContainerInstanceOperatingSystemType? osType, IList volumes, ContainerGroupDiagnostics diagnostics, ContainerGroupPriority? priority, ConfidentialComputeProperties confidentialComputeProperties, ContainerSecurityContextDefinition securityContext, int? revision, IReadOnlyList registeredRevisions, bool? useKrypton, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; EncryptionProperties = encryptionProperties; @@ -191,9 +191,9 @@ public string ConfidentialComputeCcePolicy /// The container security properties. public ContainerSecurityContextDefinition SecurityContext { get; set; } /// Container group profile current revision number. - public long? Revision { get; set; } + public int? Revision { get; } /// Registered revisions are calculated at request time based off the records in the table logs. - public IList RegisteredRevisions { get; } + public IReadOnlyList RegisteredRevisions { get; } /// Gets or sets Krypton use property. public bool? UseKrypton { get; set; } /// The zones for the container group. diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.cs index c9594b02a542..daa572b10294 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.cs @@ -269,7 +269,9 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _containerGroupProfileCGProfileRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerInstanceArmOperation(_containerGroupProfileCGProfileClientDiagnostics, Pipeline, _containerGroupProfileCGProfileRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerGroupProfileCGProfileRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerInstanceArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -311,7 +313,9 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _containerGroupProfileCGProfileRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ContainerInstanceArmOperation(_containerGroupProfileCGProfileClientDiagnostics, Pipeline, _containerGroupProfileCGProfileRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerGroupProfileCGProfileRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerInstanceArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/AzureResourceManagerContainerInstanceContext.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/AzureResourceManagerContainerInstanceContext.cs index 7ee2fdbe497b..553c41aa39e0 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/AzureResourceManagerContainerInstanceContext.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/AzureResourceManagerContainerInstanceContext.cs @@ -21,6 +21,7 @@ namespace Azure.ResourceManager.ContainerInstance [ModelReaderWriterBuildable(typeof(CachedImages))] [ModelReaderWriterBuildable(typeof(CachedImagesListResult))] [ModelReaderWriterBuildable(typeof(ConfidentialComputeProperties))] + [ModelReaderWriterBuildable(typeof(ConfigMap))] [ModelReaderWriterBuildable(typeof(ContainerAttachResult))] [ModelReaderWriterBuildable(typeof(ContainerCapabilities))] [ModelReaderWriterBuildable(typeof(ContainerCapabilitiesListResult))] @@ -52,6 +53,7 @@ namespace Azure.ResourceManager.ContainerInstance [ModelReaderWriterBuildable(typeof(ContainerGroupProfileData))] [ModelReaderWriterBuildable(typeof(ContainerGroupProfileListResult))] [ModelReaderWriterBuildable(typeof(ContainerGroupProfilePatch))] + [ModelReaderWriterBuildable(typeof(ContainerGroupProfileReferenceDefinition))] [ModelReaderWriterBuildable(typeof(ContainerGroupProfileResource))] [ModelReaderWriterBuildable(typeof(ContainerGroupProfileRevisionResource))] [ModelReaderWriterBuildable(typeof(ContainerGroupProfileStub))] @@ -98,6 +100,7 @@ namespace Azure.ResourceManager.ContainerInstance [ModelReaderWriterBuildable(typeof(NGroupsListResult))] [ModelReaderWriterBuildable(typeof(NGroupUpdateProfile))] [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(StandbyPoolProfileDefinition))] [ModelReaderWriterBuildable(typeof(StorageProfile))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ConfigMap.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ConfigMap.Serialization.cs new file mode 100644 index 000000000000..861cba115767 --- /dev/null +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ConfigMap.Serialization.cs @@ -0,0 +1,144 @@ +// 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.ContainerInstance.Models +{ + internal partial class ConfigMap : 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(ConfigMap)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(KeyValuePairs)) + { + writer.WritePropertyName("keyValuePairs"u8); + writer.WriteStartObject(); + foreach (var item in KeyValuePairs) + { + 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 + } + } + } + + ConfigMap 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(ConfigMap)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfigMap(document.RootElement, options); + } + + internal static ConfigMap DeserializeConfigMap(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary keyValuePairs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyValuePairs"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()); + } + keyValuePairs = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfigMap(keyValuePairs ?? 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, AzureResourceManagerContainerInstanceContext.Default); + default: + throw new FormatException($"The model {nameof(ConfigMap)} does not support writing '{options.Format}' format."); + } + } + + ConfigMap 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 DeserializeConfigMap(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfigMap)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ConfigMap.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ConfigMap.cs new file mode 100644 index 000000000000..8178c69e6b99 --- /dev/null +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ConfigMap.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerInstance.Models +{ + /// The container config map. + internal partial class ConfigMap + { + /// + /// 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 ConfigMap() + { + KeyValuePairs = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The key value pairs dictionary in the config map. + /// Keeps track of any properties unknown to the library. + internal ConfigMap(IDictionary keyValuePairs, IDictionary serializedAdditionalRawData) + { + KeyValuePairs = keyValuePairs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key value pairs dictionary in the config map. + public IDictionary KeyValuePairs { get; } + } +} diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerGroupProfileReferenceDefinition.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerGroupProfileReferenceDefinition.Serialization.cs new file mode 100644 index 000000000000..116bd039c0af --- /dev/null +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerGroupProfileReferenceDefinition.Serialization.cs @@ -0,0 +1,148 @@ +// 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.ContainerInstance.Models +{ + public partial class ContainerGroupProfileReferenceDefinition : 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(ContainerGroupProfileReferenceDefinition)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Revision)) + { + writer.WritePropertyName("revision"u8); + writer.WriteNumberValue(Revision.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 + } + } + } + + ContainerGroupProfileReferenceDefinition 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(ContainerGroupProfileReferenceDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerGroupProfileReferenceDefinition(document.RootElement, options); + } + + internal static ContainerGroupProfileReferenceDefinition DeserializeContainerGroupProfileReferenceDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + int? revision = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("revision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + revision = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerGroupProfileReferenceDefinition(id, revision, 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, AzureResourceManagerContainerInstanceContext.Default); + default: + throw new FormatException($"The model {nameof(ContainerGroupProfileReferenceDefinition)} does not support writing '{options.Format}' format."); + } + } + + ContainerGroupProfileReferenceDefinition 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 DeserializeContainerGroupProfileReferenceDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerGroupProfileReferenceDefinition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerGroupProfileReferenceDefinition.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerGroupProfileReferenceDefinition.cs new file mode 100644 index 000000000000..6d0fd114754e --- /dev/null +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerGroupProfileReferenceDefinition.cs @@ -0,0 +1,70 @@ +// 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.ContainerInstance.Models +{ + /// The container group profile reference. + public partial class ContainerGroupProfileReferenceDefinition + { + /// + /// 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 ContainerGroupProfileReferenceDefinition() + { + } + + /// Initializes a new instance of . + /// The container group profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'. + /// The container group profile reference revision. + /// Keeps track of any properties unknown to the library. + internal ContainerGroupProfileReferenceDefinition(ResourceIdentifier id, int? revision, IDictionary serializedAdditionalRawData) + { + Id = id; + Revision = revision; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The container group profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'. + public ResourceIdentifier Id { get; set; } + /// The container group profile reference revision. + public int? Revision { get; set; } + } +} diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.Serialization.cs index f8a0e744cea7..d5ff70db4c9c 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.Serialization.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.Serialization.cs @@ -38,8 +38,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - writer.WritePropertyName("image"u8); - writer.WriteStringValue(Image); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteStringValue(Image); + } if (Optional.IsCollectionDefined(Command)) { writer.WritePropertyName("command"u8); @@ -75,8 +78,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("instanceView"u8); writer.WriteObjectValue(InstanceView, options); } - writer.WritePropertyName("resources"u8); - writer.WriteObjectValue(Resources, options); + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources, options); + } if (Optional.IsCollectionDefined(VolumeMounts)) { writer.WritePropertyName("volumeMounts"u8); @@ -102,6 +108,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("securityContext"u8); writer.WriteObjectValue(SecurityContext, options); } + if (Optional.IsDefined(ConfigMap)) + { + writer.WritePropertyName("configMap"u8); + writer.WriteObjectValue(ConfigMap, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -151,6 +162,7 @@ internal static ContainerInstanceContainer DeserializeContainerInstanceContainer ContainerProbe livenessProbe = default; ContainerProbe readinessProbe = default; ContainerSecurityContextDefinition securityContext = default; + ConfigMap configMap = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -227,6 +239,10 @@ internal static ContainerInstanceContainer DeserializeContainerInstanceContainer } if (property0.NameEquals("resources"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } resources = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property0.Value, options); continue; } @@ -271,6 +287,15 @@ internal static ContainerInstanceContainer DeserializeContainerInstanceContainer securityContext = ContainerSecurityContextDefinition.DeserializeContainerSecurityContextDefinition(property0.Value, options); continue; } + if (property0.NameEquals("configMap"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configMap = ConfigMap.DeserializeConfigMap(property0.Value, options); + continue; + } } continue; } @@ -292,6 +317,7 @@ internal static ContainerInstanceContainer DeserializeContainerInstanceContainer livenessProbe, readinessProbe, securityContext, + configMap, serializedAdditionalRawData); } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.cs index a93942400869..6324cf1783bb 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/ContainerInstanceContainer.cs @@ -45,6 +45,20 @@ public partial class ContainerInstanceContainer /// private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . + /// The user-provided name of the container instance. + /// is null. + public ContainerInstanceContainer(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Command = new ChangeTrackingList(); + Ports = new ChangeTrackingList(); + EnvironmentVariables = new ChangeTrackingList(); + VolumeMounts = new ChangeTrackingList(); + } + /// Initializes a new instance of . /// The user-provided name of the container instance. /// The name of the image used to create the container instance. @@ -57,8 +71,9 @@ public partial class ContainerInstanceContainer /// The liveness probe. /// The readiness probe. /// The container security properties. + /// The config map. /// Keeps track of any properties unknown to the library. - internal ContainerInstanceContainer(string name, string image, IList command, IList ports, IList environmentVariables, ContainerInstanceView instanceView, ContainerResourceRequirements resources, IList volumeMounts, ContainerProbe livenessProbe, ContainerProbe readinessProbe, ContainerSecurityContextDefinition securityContext, IDictionary serializedAdditionalRawData) + internal ContainerInstanceContainer(string name, string image, IList command, IList ports, IList environmentVariables, ContainerInstanceView instanceView, ContainerResourceRequirements resources, IList volumeMounts, ContainerProbe livenessProbe, ContainerProbe readinessProbe, ContainerSecurityContextDefinition securityContext, ConfigMap configMap, IDictionary serializedAdditionalRawData) { Name = name; Image = image; @@ -71,6 +86,7 @@ internal ContainerInstanceContainer(string name, string image, IList com LivenessProbe = livenessProbe; ReadinessProbe = readinessProbe; SecurityContext = securityContext; + ConfigMap = configMap; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -101,5 +117,17 @@ internal ContainerInstanceContainer() public ContainerProbe ReadinessProbe { get; set; } /// The container security properties. public ContainerSecurityContextDefinition SecurityContext { get; set; } + /// The config map. + internal ConfigMap ConfigMap { get; set; } + /// The key value pairs dictionary in the config map. + public IDictionary ConfigMapKeyValuePairs + { + get + { + if (ConfigMap is null) + ConfigMap = new ConfigMap(); + return ConfigMap.KeyValuePairs; + } + } } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/StandbyPoolProfileDefinition.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/StandbyPoolProfileDefinition.Serialization.cs new file mode 100644 index 000000000000..d2d5bb23f279 --- /dev/null +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/StandbyPoolProfileDefinition.Serialization.cs @@ -0,0 +1,148 @@ +// 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.ContainerInstance.Models +{ + public partial class StandbyPoolProfileDefinition : 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(StandbyPoolProfileDefinition)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(FailContainerGroupCreateOnReuseFailure)) + { + writer.WritePropertyName("failContainerGroupCreateOnReuseFailure"u8); + writer.WriteBooleanValue(FailContainerGroupCreateOnReuseFailure.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 + } + } + } + + StandbyPoolProfileDefinition 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(StandbyPoolProfileDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStandbyPoolProfileDefinition(document.RootElement, options); + } + + internal static StandbyPoolProfileDefinition DeserializeStandbyPoolProfileDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + bool? failContainerGroupCreateOnReuseFailure = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("failContainerGroupCreateOnReuseFailure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failContainerGroupCreateOnReuseFailure = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StandbyPoolProfileDefinition(id, failContainerGroupCreateOnReuseFailure, 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, AzureResourceManagerContainerInstanceContext.Default); + default: + throw new FormatException($"The model {nameof(StandbyPoolProfileDefinition)} does not support writing '{options.Format}' format."); + } + } + + StandbyPoolProfileDefinition 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 DeserializeStandbyPoolProfileDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StandbyPoolProfileDefinition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/StandbyPoolProfileDefinition.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/StandbyPoolProfileDefinition.cs new file mode 100644 index 000000000000..6a4eead98c84 --- /dev/null +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/Models/StandbyPoolProfileDefinition.cs @@ -0,0 +1,70 @@ +// 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.ContainerInstance.Models +{ + /// The standby pool profile reference. + public partial class StandbyPoolProfileDefinition + { + /// + /// 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 StandbyPoolProfileDefinition() + { + } + + /// Initializes a new instance of . + /// The standby pool profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'. + /// The flag to determine whether ACI should fail the create request if the container group can not be obtained from standby pool. + /// Keeps track of any properties unknown to the library. + internal StandbyPoolProfileDefinition(ResourceIdentifier id, bool? failContainerGroupCreateOnReuseFailure, IDictionary serializedAdditionalRawData) + { + Id = id; + FailContainerGroupCreateOnReuseFailure = failContainerGroupCreateOnReuseFailure; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The standby pool profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'. + public ResourceIdentifier Id { get; set; } + /// The flag to determine whether ACI should fail the create request if the container group can not be obtained from standby pool. + public bool? FailContainerGroupCreateOnReuseFailure { get; set; } + } +} diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/RestOperations/CGProfileRestOperations.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/RestOperations/CGProfileRestOperations.cs index f6cceadee72d..bc57a6755559 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/RestOperations/CGProfileRestOperations.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/RestOperations/CGProfileRestOperations.cs @@ -386,7 +386,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: - case 202: case 204: return message.Response; default: @@ -412,7 +411,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c switch (message.Response.Status) { case 200: - case 202: case 204: return message.Response; default: diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md index 161d1efb3016..74d1664ffb9a 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/autorest.md @@ -6,7 +6,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: ContainerInstance namespace: Azure.ResourceManager.ContainerInstance -require: https://github.com/Azure/azure-rest-api-specs/blob/ff8bf88e72989f38431cecc8a2c2a7d6cff59d17/specification/containerinstance/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/d0de8cfc60f1ea9165bdfce2b4a502effe6e5d32/specification/containerinstance/resource-manager/readme.md #tag: package-preview-2024-11 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupCollection.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupCollection.cs index 1c5e59e5fa10..7741c9d80ab5 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupCollection.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupCollection.cs @@ -44,11 +44,13 @@ public async Task CreateOrUpdate_ConfidentialContainerGroup() string containerGroupName = "demo1"; ContainerGroupData data = new ContainerGroupData(new AzureLocation("westeurope"), new ContainerInstanceContainer[] { -new ContainerInstanceContainer("accdemo", "confiimage", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1))) +new ContainerInstanceContainer("accdemo") { +Image = "confiimage", Command = {}, Ports = {new ContainerPort(8000)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1)), SecurityContext = new ContainerSecurityContextDefinition { IsPrivileged = false, @@ -58,7 +60,7 @@ public async Task CreateOrUpdate_ConfidentialContainerGroup() }, }, } - }, ContainerInstanceOperatingSystemType.Linux) + }) { ImageRegistryCredentials = { }, IPAddress = new ContainerGroupIPAddress(new ContainerGroupPort[] @@ -68,6 +70,7 @@ public async Task CreateOrUpdate_ConfidentialContainerGroup() Protocol = ContainerGroupNetworkProtocol.Tcp, } }, ContainerGroupIPAddressType.Public), + ContainerGroupOSType = ContainerInstanceOperatingSystemType.Linux, Sku = ContainerGroupSku.Confidential, ConfidentialComputeCcePolicy = "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19", }; @@ -81,6 +84,61 @@ public async Task CreateOrUpdate_ConfidentialContainerGroup() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ContainerGroupCreateOrUpdateWithStandbyPool() + { + // Generated from example definition: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2024-11-01-preview/examples/ContainerGroupCreateOrUpdateStandbyPool.json + // this example is just showing the usage of "ContainerGroups_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "demo"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerGroupResource + ContainerGroupCollection collection = resourceGroupResource.GetContainerGroups(); + + // invoke the operation + string containerGroupName = "demo1"; + ContainerGroupData data = new ContainerGroupData(new AzureLocation("west us"), new ContainerInstanceContainer[] + { +new ContainerInstanceContainer("demo1") +{ +ConfigMapKeyValuePairs = +{ +["Newkey"] = "value" +}, +} + }) + { + ContainerGroupProfile = new ContainerGroupProfileReferenceDefinition + { + Id = new ResourceIdentifier("/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp"), + Revision = 1, + }, + StandbyPoolProfile = new StandbyPoolProfileDefinition + { + Id = new ResourceIdentifier("/subscriptions/subid/resourceGroups/demo/providers/Microsoft.StandbyPool/standbyContainerGroupPools/demopool"), + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerGroupName, data); + ContainerGroupResource 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 + ContainerGroupData 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_ContainerGroupCreateWithExtensions() @@ -107,13 +165,15 @@ public async Task CreateOrUpdate_ContainerGroupCreateWithExtensions() string containerGroupName = "demo1"; ContainerGroupData data = new ContainerGroupData(new AzureLocation("eastus2"), new ContainerInstanceContainer[] { -new ContainerInstanceContainer("demo1", "nginx", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1))) +new ContainerInstanceContainer("demo1") { +Image = "nginx", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1)), } - }, ContainerInstanceOperatingSystemType.Linux) + }) { ImageRegistryCredentials = { }, IPAddress = new ContainerGroupIPAddress(new ContainerGroupPort[] @@ -123,6 +183,7 @@ public async Task CreateOrUpdate_ContainerGroupCreateWithExtensions() Protocol = ContainerGroupNetworkProtocol.Tcp, } }, ContainerGroupIPAddressType.Private), + ContainerGroupOSType = ContainerInstanceOperatingSystemType.Linux, SubnetIds = { new ContainerGroupSubnetId(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet")) }, Extensions = {new DeploymentExtensionSpec("kube-proxy") { @@ -179,13 +240,15 @@ public async Task CreateOrUpdate_ContainerGroupWithEncryptionProperties() string containerGroupName = "demo1"; ContainerGroupData data = new ContainerGroupData(new AzureLocation("eastus2"), new ContainerInstanceContainer[] { -new ContainerInstanceContainer("demo1", "nginx", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1))) +new ContainerInstanceContainer("demo1") { +Image = "nginx", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1)), } - }, ContainerInstanceOperatingSystemType.Linux) + }) { Identity = new ManagedServiceIdentity("UserAssigned") { @@ -202,6 +265,7 @@ public async Task CreateOrUpdate_ContainerGroupWithEncryptionProperties() Protocol = ContainerGroupNetworkProtocol.Tcp, } }, ContainerGroupIPAddressType.Public), + ContainerGroupOSType = ContainerInstanceOperatingSystemType.Linux, EncryptionProperties = new ContainerGroupEncryptionProperties(new Uri("https://testkeyvault.vault.azure.net"), "test-key", "") { Identity = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", @@ -243,14 +307,16 @@ public async Task CreateOrUpdate_ContainerGroupsCreateOrUpdate() string containerGroupName = "demo1"; ContainerGroupData data = new ContainerGroupData(new AzureLocation("west us"), new ContainerInstanceContainer[] { -new ContainerInstanceContainer("demo1", "nginx", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1) -{ -Gpu = new ContainerGpuResourceInfo(1, ContainerGpuSku.K80), -})) +new ContainerInstanceContainer("demo1") { +Image = "nginx", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1) +{ +Gpu = new ContainerGpuResourceInfo(1, ContainerGpuSku.K80), +}), VolumeMounts = {new ContainerVolumeMount("volume1", "/mnt/volume1") { IsReadOnly = false, @@ -262,7 +328,7 @@ public async Task CreateOrUpdate_ContainerGroupsCreateOrUpdate() IsReadOnly = true, }}, } - }, ContainerInstanceOperatingSystemType.Linux) + }) { Identity = new ManagedServiceIdentity("SystemAssigned, UserAssigned") { @@ -283,6 +349,7 @@ public async Task CreateOrUpdate_ContainerGroupsCreateOrUpdate() DnsNameLabel = "dnsnamelabel1", AutoGeneratedDomainNameLabelScope = DnsNameLabelReusePolicy.Unsecure, }, + ContainerGroupOSType = ContainerInstanceOperatingSystemType.Linux, Volumes = {new ContainerVolume("volume1") { AzureFile = new ContainerInstanceAzureFileVolume("shareName", "accountName") @@ -352,17 +419,19 @@ public async Task CreateOrUpdate_ContainerGroupsCreateOrUpdateSecretReference() string containerGroupName = "demo1"; ContainerGroupData data = new ContainerGroupData(new AzureLocation("west us"), new ContainerInstanceContainer[] { -new ContainerInstanceContainer("demo1", "privateRegistryImage", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1) -{ -Gpu = new ContainerGpuResourceInfo(1, ContainerGpuSku.K80), -})) +new ContainerInstanceContainer("demo1") { +Image = "privateRegistryImage", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {new ContainerEnvironmentVariable("envSecret") { SecureValueReference = "envSecretRef", }}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1) +{ +Gpu = new ContainerGpuResourceInfo(1, ContainerGpuSku.K80), +}), VolumeMounts = {new ContainerVolumeMount("volume1", "/mnt/volume1") { IsReadOnly = false, @@ -374,7 +443,7 @@ public async Task CreateOrUpdate_ContainerGroupsCreateOrUpdateSecretReference() IsReadOnly = true, }}, } - }, ContainerInstanceOperatingSystemType.Linux) + }) { Identity = new ManagedServiceIdentity("UserAssigned") { @@ -400,6 +469,7 @@ public async Task CreateOrUpdate_ContainerGroupsCreateOrUpdateSecretReference() DnsNameLabel = "dnsnamelabel1", AutoGeneratedDomainNameLabelScope = DnsNameLabelReusePolicy.Unsecure, }, + ContainerGroupOSType = ContainerInstanceOperatingSystemType.Linux, Volumes = {new ContainerVolume("volume1") { AzureFile = new ContainerInstanceAzureFileVolume("shareName", "accountName") @@ -472,13 +542,16 @@ public async Task CreateOrUpdate_ContainerGroupsCreateWithPriority() string containerGroupName = "demo1"; ContainerGroupData data = new ContainerGroupData(new AzureLocation("eastus"), new ContainerInstanceContainer[] { -new ContainerInstanceContainer("test-container-001", "alpine:latest", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1, 1))) +new ContainerInstanceContainer("test-container-001") { +Image = "alpine:latest", Command = {"/bin/sh", "-c", "sleep 10"}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1, 1)), } - }, ContainerInstanceOperatingSystemType.Linux) + }) { RestartPolicy = ContainerGroupRestartPolicy.Never, + ContainerGroupOSType = ContainerInstanceOperatingSystemType.Linux, Sku = ContainerGroupSku.Standard, Priority = ContainerGroupPriority.Spot, }; diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupProfileCollection.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupProfileCollection.cs index d76d21d459b6..a0914a8c1255 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupProfileCollection.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/tests/Generated/Samples/Sample_ContainerGroupProfileCollection.cs @@ -44,11 +44,13 @@ public async Task CreateOrUpdate_ConfidentialContainerGroupProfile() ContainerGroupProfileData data = new ContainerGroupProfileData(new AzureLocation("westeurope")) { Sku = ContainerGroupSku.Confidential, - Containers = {new ContainerInstanceContainer("accdemo", "confiimage", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1))) + Containers = {new ContainerInstanceContainer("accdemo") { +Image = "confiimage", Command = {}, Ports = {new ContainerPort(8000)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1)), SecurityContext = new ContainerSecurityContextDefinition { IsPrivileged = false, @@ -106,11 +108,13 @@ public async Task CreateOrUpdate_ContainerGroupProfileCreateWithExtensions() string containerGroupProfileName = "demo1"; ContainerGroupProfileData data = new ContainerGroupProfileData(new AzureLocation("eastus2")) { - Containers = {new ContainerInstanceContainer("demo1", "nginx", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1))) + Containers = {new ContainerInstanceContainer("demo1") { +Image = "nginx", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1)), }}, Extensions = {new DeploymentExtensionSpec("kube-proxy") { @@ -181,11 +185,13 @@ public async Task CreateOrUpdate_ContainerGroupProfileWithEncryptionProperties() { Identity = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", }, - Containers = {new ContainerInstanceContainer("demo1", "nginx", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1))) + Containers = {new ContainerInstanceContainer("demo1") { +Image = "nginx", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1)), }}, ImageRegistryCredentials = { }, IPAddress = new ContainerGroupIPAddress(new ContainerGroupPort[] @@ -234,14 +240,16 @@ public async Task CreateOrUpdate_ContainerGroupProfilesCreateOrUpdate() string containerGroupProfileName = "demo1"; ContainerGroupProfileData data = new ContainerGroupProfileData(new AzureLocation("west us")) { - Containers = {new ContainerInstanceContainer("demo1", "nginx", new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1) -{ -Gpu = new ContainerGpuResourceInfo(1, ContainerGpuSku.K80), -})) + Containers = {new ContainerInstanceContainer("demo1") { +Image = "nginx", Command = {}, Ports = {new ContainerPort(80)}, EnvironmentVariables = {}, +Resources = new ContainerResourceRequirements(new ContainerResourceRequestsContent(1.5, 1) +{ +Gpu = new ContainerGpuResourceInfo(1, ContainerGpuSku.K80), +}), VolumeMounts = {new ContainerVolumeMount("volume1", "/mnt/volume1") { IsReadOnly = false, diff --git a/sdk/core/Microsoft.ClientModel.TestFramework/src/Microsoft.ClientModel.TestFramework.csproj b/sdk/core/Microsoft.ClientModel.TestFramework/src/Microsoft.ClientModel.TestFramework.csproj index c5cd27bc08d1..5a75066e383f 100644 --- a/sdk/core/Microsoft.ClientModel.TestFramework/src/Microsoft.ClientModel.TestFramework.csproj +++ b/sdk/core/Microsoft.ClientModel.TestFramework/src/Microsoft.ClientModel.TestFramework.csproj @@ -22,11 +22,4 @@ - - - - <_Parameter1>TestProxyPath - <_Parameter2>$(NuGetPackageRoot)\azure.sdk.tools.testproxy\$(TestProxyVersion)\tools\net8.0\any\Azure.Sdk.Tools.TestProxy.dll - - diff --git a/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/ProxyTransport.cs b/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/ProxyTransport.cs index 811bfdb52e3e..7ba7fa1eddd0 100644 --- a/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/ProxyTransport.cs +++ b/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/ProxyTransport.cs @@ -46,7 +46,8 @@ public ProxyTransport( var handler = new HttpClientHandler { ServerCertificateCustomValidationCallback = (_, certificate, _, _) => certificate?.Issuer == certIssuer, - AllowAutoRedirect = false + AllowAutoRedirect = false, + UseCookies = false }; _innerTransport = new HttpClientPipelineTransport(new HttpClient(handler)); } diff --git a/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/TestProxyProcess.cs b/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/TestProxyProcess.cs index 82d219433c8a..0995456b0933 100644 --- a/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/TestProxyProcess.cs +++ b/sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/TestProxyProcess.cs @@ -22,6 +22,17 @@ namespace Microsoft.ClientModel.TestFramework; public class TestProxyProcess { private static readonly string s_dotNetExe; + private readonly int? _proxyPortHttp; + private readonly int? _proxyPortHttps; + private readonly Process? _testProxyProcess; + private readonly StringBuilder _errorBuffer = new(); + private static readonly object _lock = new(); + private static TestProxyProcess? _shared; + private readonly StringBuilder _output = new(); + private static readonly bool s_enableDebugProxyLogging; + + internal virtual TestProxyAdminClient AdminClient { get; } + internal virtual TestProxyClient ProxyClient { get; } /// /// The IP address used for the test proxy. Uses 127.0.0.1 instead of localhost to avoid SSL callback slowness. @@ -39,26 +50,6 @@ public class TestProxyProcess /// public int? ProxyPortHttps => _proxyPortHttps; - private readonly int? _proxyPortHttp; - private readonly int? _proxyPortHttps; - private readonly Process? _testProxyProcess; - - /// - /// Gets the test framework client for interacting with the test proxy. - /// - internal virtual TestProxyAdminClient AdminClient { get; } - - /// - /// Gets the test proxy client for proxy-specific operations. - /// - internal virtual TestProxyClient ProxyClient { get; } - - private readonly StringBuilder _errorBuffer = new(); - private static readonly object _lock = new(); - private static TestProxyProcess? _shared; - private readonly StringBuilder _output = new(); - private static readonly bool s_enableDebugProxyLogging; - /// /// Initializes static members of the class. /// Locates the .NET executable and configures debug logging settings. @@ -102,24 +93,35 @@ private TestProxyProcess(string? proxyPath, bool debugMode = false) debugMode |= environmentDebugMode; - ProcessStartInfo testProxyProcessInfo = new ProcessStartInfo( - s_dotNetExe, - $"\"{proxyPath}\" start -u --storage-location=\"{TestEnvironment.RepositoryRoot}\"") + ProcessStartInfo testProxyProcessInfo; + + if (proxyPath is not null) { - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - EnvironmentVariables = - { - ["ASPNETCORE_URLS"] = $"http://{IpAddress}:0;https://{IpAddress}:0", - ["Logging__LogLevel__Azure.Sdk.Tools.TestProxy"] = s_enableDebugProxyLogging ? "Debug" : "Error", - ["Logging__LogLevel__Default"] = "Error", - ["Logging__LogLevel__Microsoft.AspNetCore"] = s_enableDebugProxyLogging ? "Information" : "Error", - ["Logging__LogLevel__Microsoft.Hosting.Lifetime"] = "Information", - ["ASPNETCORE_Kestrel__Certificates__Default__Path"] = TestEnvironment.DevCertPath, - ["ASPNETCORE_Kestrel__Certificates__Default__Password"] = TestEnvironment.DevCertPassword - } - }; + testProxyProcessInfo = new ProcessStartInfo( + s_dotNetExe, + $"\"{proxyPath}\" start -u --storage-location=\"{TestEnvironment.RepositoryRoot}\""); + } + else + { + TryRestoreLocalTools(); + + testProxyProcessInfo = new ProcessStartInfo( + s_dotNetExe, + $"tool run test-proxy start -u --storage-location=\"{TestEnvironment.RepositoryRoot}\""); + } + + testProxyProcessInfo.UseShellExecute = false; + testProxyProcessInfo.RedirectStandardOutput = true; + testProxyProcessInfo.RedirectStandardError = true; + + // Set environment variables + testProxyProcessInfo.EnvironmentVariables["ASPNETCORE_URLS"] = $"http://{IpAddress}:0;https://{IpAddress}:0"; + testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Azure.Sdk.Tools.TestProxy"] = s_enableDebugProxyLogging ? "Debug" : "Error"; + testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Default"] = "Error"; + testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Microsoft.AspNetCore"] = s_enableDebugProxyLogging ? "Information" : "Error"; + testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Microsoft.Hosting.Lifetime"] = "Information"; + testProxyProcessInfo.EnvironmentVariables["ASPNETCORE_Kestrel__Certificates__Default__Path"] = TestEnvironment.DevCertPath; + testProxyProcessInfo.EnvironmentVariables["ASPNETCORE_Kestrel__Certificates__Default__Password"] = TestEnvironment.DevCertPassword; _testProxyProcess = Process.Start(testProxyProcessInfo); @@ -168,7 +170,13 @@ private TestProxyProcess(string? proxyPath, bool debugMode = false) if (_proxyPortHttp == null || _proxyPortHttps == null) { - CheckForErrors(); + if (_errorBuffer.Length > 0) + { + var error = _errorBuffer.ToString(); + _errorBuffer.Clear(); + throw new InvalidOperationException($"An error occurred in the test proxy: {error}"); + } + // if no errors, fallback to this exception throw new InvalidOperationException("Failed to start the test proxy. One or both of the ports was not populated." + Environment.NewLine + $"http: {_proxyPortHttp}" + Environment.NewLine + @@ -192,6 +200,69 @@ private TestProxyProcess(string? proxyPath, bool debugMode = false) }); } + private static bool TryParsePort(string? output, string scheme, out int? port) + { + if (output == null) + { + TestContext.Progress.WriteLine("output was null"); + port = null; + return false; + } + string nowListeningOn = "Now listening on: "; + int nowListeningOnLength = nowListeningOn.Length; + var index = output.IndexOf($"{nowListeningOn}{scheme}:", StringComparison.CurrentCultureIgnoreCase); + if (index > -1) + { + var start = index + nowListeningOnLength; + var uri = output.Substring(start, output.Length - start).Trim(); + port = new Uri(uri).Port; + return true; + } + + port = null; + return false; + } + + private static void TryRestoreLocalTools() + { + try + { + var currentDir = Directory.GetCurrentDirectory(); + while (currentDir != null) + { + var toolsJsonPath = Path.Combine(currentDir, ".config", "dotnet-tools.json"); + if (File.Exists(toolsJsonPath)) + { + // Found a tools manifest, try to restore + var processInfo = new ProcessStartInfo + { + FileName = s_dotNetExe, + Arguments = "tool restore", + WorkingDirectory = currentDir, + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + CreateNoWindow = true + }; + + using var process = Process.Start(processInfo); + if (process != null) + { + process.WaitForExit(30000); + } + break; + } + + var parentDir = Directory.GetParent(currentDir); + currentDir = parentDir?.FullName; + } + } + catch + { + // If restore fails, silently continue - the dotnet test-proxy command will handle it + } + } + /// /// Starts the test proxy /// @@ -209,12 +280,8 @@ public static TestProxyProcess Start(bool debugMode = false) var shared = _shared; if (shared == null) { - shared = new TestProxyProcess(typeof(TestProxyProcess) - .Assembly - .GetCustomAttributes() - .Single(a => a.Key == "TestProxyPath") - .Value, - debugMode); + var proxyPath = GetTestProxyPath(); + shared = new TestProxyProcess(proxyPath, debugMode); AppDomain.CurrentDomain.DomainUnload += (_, _) => { @@ -228,34 +295,16 @@ public static TestProxyProcess Start(bool debugMode = false) } } - /// - /// Attempts to parse a port number from test proxy output for the specified scheme. - /// - /// The output line from the test proxy. - /// The URI scheme (http or https) to parse. - /// When this method returns, contains the parsed port number if successful; otherwise, null. - /// true if the port was successfully parsed; otherwise, false. - private static bool TryParsePort(string? output, string scheme, out int? port) + private static string? GetTestProxyPath() { - if (output == null) - { - TestContext.Progress.WriteLine("output was null"); - port = null; - return false; - } - string nowListeningOn = "Now listening on: "; - int nowListeningOnLength = nowListeningOn.Length; - var index = output.IndexOf($"{nowListeningOn}{scheme}:", StringComparison.CurrentCultureIgnoreCase); - if (index > -1) + // Look for environment variable override + var envPath = Environment.GetEnvironmentVariable("TEST_PROXY_EXE_PATH"); + if (!string.IsNullOrEmpty(envPath)) { - var start = index + nowListeningOnLength; - var uri = output.Substring(start, output.Length - start).Trim(); - port = new Uri(uri).Port; - return true; + return envPath; } - port = null; - return false; + return null; } /// @@ -278,15 +327,6 @@ public virtual async Task CheckProxyOutputAsync() } } - CheckForErrors(); - } - - /// - /// Checks for any errors in the error buffer and throws an exception if errors are found. - /// - /// Thrown when errors are found in the test proxy. - private void CheckForErrors() - { if (_errorBuffer.Length > 0) { var error = _errorBuffer.ToString(); diff --git a/sdk/core/Microsoft.ClientModel.TestFramework/src/SyncAsync/Interceptors/UseSyncMethodsInterceptor.cs b/sdk/core/Microsoft.ClientModel.TestFramework/src/SyncAsync/Interceptors/UseSyncMethodsInterceptor.cs index 3df08cbfd939..46cfb3d1e660 100644 --- a/sdk/core/Microsoft.ClientModel.TestFramework/src/SyncAsync/Interceptors/UseSyncMethodsInterceptor.cs +++ b/sdk/core/Microsoft.ClientModel.TestFramework/src/SyncAsync/Interceptors/UseSyncMethodsInterceptor.cs @@ -3,6 +3,7 @@ using System; using System.ClientModel; +using System.ClientModel.Primitives; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -69,7 +70,8 @@ public void Intercept(IInvocation invocation) } Type returnType = methodInfo.ReturnType; - bool returnsSyncCollection = returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(CollectionResult<>); + bool returnsSyncCollection = (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(CollectionResult<>)) || + returnType == typeof(CollectionResult); try { @@ -93,10 +95,25 @@ public void Intercept(IInvocation invocation) // Map IEnumerable to IAsyncEnumerable if (returnsSyncCollection) { - Type[] modelType = returnType.GenericTypeArguments; - Type wrapperType = typeof(SyncPageableWrapper<>).MakeGenericType(modelType); - - invocation.ReturnValue = Activator.CreateInstance(wrapperType, new[] { result }); + if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(CollectionResult<>)) + { + // Handle generic CollectionResult + Type[] modelType = returnType.GenericTypeArguments; + Type wrapperType = typeof(SyncPageableWrapper<>).MakeGenericType(modelType); + invocation.ReturnValue = Activator.CreateInstance(wrapperType, new[] { result }); + } + else if (returnType == typeof(CollectionResult)) + { + var collectionResult = result as CollectionResult; + + if (collectionResult == null) + { + throw new InvalidOperationException("Expected CollectionResult from sync protocol method"); + } + + // Handle non-generic CollectionResult + invocation.ReturnValue = new SyncPageableWrapper(collectionResult); + } } else { @@ -134,6 +151,19 @@ private void SetAsyncResult(IInvocation invocation, Type returnType, object? res } } + // Handle non-generic AsyncCollectionResult case + if (methodReturnType == typeof(Task) && result is AsyncCollectionResult) + { + invocation.ReturnValue = _taskFromResultMethod?.MakeGenericMethod(typeof(AsyncCollectionResult)).Invoke(null, new[] { result }); + return; + } + + if (methodReturnType == typeof(ValueTask) && result is AsyncCollectionResult) + { + invocation.ReturnValue = new ValueTask((AsyncCollectionResult)result); + return; + } + throw new NotSupportedException(); } @@ -156,7 +186,6 @@ private void SetAsyncException(IInvocation invocation, Type returnType, Exceptio return; } } - throw new NotSupportedException(); } @@ -307,4 +336,50 @@ public override async IAsyncEnumerable GetRawPagesAsync() return _enumerable.GetContinuationToken(page); } } + + /// + /// Wraps a synchronous CollectionResult to provide an asynchronous + /// AsyncCollectionResult interface for testing scenarios where + /// sync methods need to be called from async method signatures. + /// + public class SyncPageableWrapper : AsyncCollectionResult + { + private readonly CollectionResult _enumerable; + + /// + /// Initializes a new instance of for mocking scenarios. + /// + protected SyncPageableWrapper() + { + _enumerable = default!; + } + + /// + /// Initializes a new instance of that wraps + /// the specified synchronous collection result. + /// + /// The synchronous collection result to wrap. + public SyncPageableWrapper(CollectionResult enumerable) + { + _enumerable = enumerable ?? throw new ArgumentNullException(nameof(enumerable)); + } + + /// +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + public override async IAsyncEnumerable GetRawPagesAsync() +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + { + foreach (ClientResult page in _enumerable.GetRawPages()) + { + yield return page; + } + } + + /// + public override ContinuationToken? GetContinuationToken(ClientResult page) + { + // Delegate directly to the wrapped sync collection + return _enumerable.GetContinuationToken(page); + } + } } diff --git a/sdk/core/Microsoft.ClientModel.TestFramework/tests/RecordedTests/RecordedTestBaseTests.cs b/sdk/core/Microsoft.ClientModel.TestFramework/tests/RecordedTests/RecordedTestBaseTests.cs index 901b5930451d..80e7b9881c76 100644 --- a/sdk/core/Microsoft.ClientModel.TestFramework/tests/RecordedTests/RecordedTestBaseTests.cs +++ b/sdk/core/Microsoft.ClientModel.TestFramework/tests/RecordedTests/RecordedTestBaseTests.cs @@ -620,89 +620,6 @@ public async Task StopTestRecordingAsyncHandlesSaveFailuresGracefully() #endregion - #region Delay Methods - - [TestCase(RecordedTestMode.Live)] - [TestCase(RecordedTestMode.Record)] - public async Task DelayUsesFullDelayInLiveAndRecordModes(RecordedTestMode mode) - { - var testBase = new TestableRecordedTestBase(isAsync: true, mode); - var delayMs = 100; - var expectedMinDelay = TimeSpan.FromMilliseconds(delayMs * 0.9); // Allow 10% tolerance - - var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - await testBase.Delay(delayMs); - stopwatch.Stop(); - - Assert.That(stopwatch.Elapsed, Is.GreaterThanOrEqualTo(expectedMinDelay), - $"Delay should take at least {delayMs}ms in {mode} mode, but took {stopwatch.ElapsedMilliseconds}ms"); - } - - [Test] - public async Task DelayUsesReducedDelayInPlaybackMode() - { - var testBase = new TestableRecordedTestBase(isAsync: true, RecordedTestMode.Playback); - var delayMs = 1000; // 1 second - should be reduced significantly in playback - var maxExpectedDelay = TimeSpan.FromMilliseconds(100); // Should be much faster in playback - - var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - await testBase.Delay(delayMs); - stopwatch.Stop(); - - Assert.That(stopwatch.Elapsed, Is.LessThan(maxExpectedDelay), - $"Delay should be reduced in Playback mode, but took {stopwatch.ElapsedMilliseconds}ms (expected < {maxExpectedDelay.TotalMilliseconds}ms)"); - } - - [Test] - public async Task DelayWithCustomPlaybackDelayUsesSpecifiedValue() - { - var testBase = new TestableRecordedTestBase(isAsync: true, RecordedTestMode.Playback); - var originalDelayMs = 1000; - var customPlaybackDelayMs = 200; - var expectedMinDelay = TimeSpan.FromMilliseconds(customPlaybackDelayMs * 0.8); // Allow 20% tolerance - var expectedMaxDelay = TimeSpan.FromMilliseconds(customPlaybackDelayMs * 2); // Allow generous upper bound - - var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - await testBase.Delay(originalDelayMs, customPlaybackDelayMs); - stopwatch.Stop(); - - Assert.That(stopwatch.Elapsed, Is.GreaterThanOrEqualTo(expectedMinDelay), - $"Custom playback delay should be at least {customPlaybackDelayMs}ms, but was {stopwatch.ElapsedMilliseconds}ms"); - Assert.That(stopwatch.Elapsed, Is.LessThan(expectedMaxDelay), - $"Custom playback delay should be less than {expectedMaxDelay.TotalMilliseconds}ms, but was {stopwatch.ElapsedMilliseconds}ms"); - } - - [TestCase(RecordedTestMode.Live)] - [TestCase(RecordedTestMode.Record)] - [TestCase(RecordedTestMode.Playback)] - public async Task StaticDelayMethodWorksCorrectlyForEachMode(RecordedTestMode mode) - { - var delayMs = 50; - - // Set the global test mode for the static method to use - using var testEnv = new TestEnvVar("CLIENTMODEL_TEST_MODE", mode.ToString()); - - var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - await RecordedTestBase.Delay(mode, delayMs); - stopwatch.Stop(); - - if (mode == RecordedTestMode.Playback) - { - // In playback mode, delay should be very short - Assert.That(stopwatch.Elapsed, Is.LessThan(TimeSpan.FromMilliseconds(30)), - $"Static Delay should be reduced in Playback mode, but took {stopwatch.ElapsedMilliseconds}ms"); - } - else - { - // In Live/Record modes, delay should be close to requested - var expectedMinDelay = TimeSpan.FromMilliseconds(delayMs * 0.8); // Allow 20% tolerance - Assert.That(stopwatch.Elapsed, Is.GreaterThanOrEqualTo(expectedMinDelay), - $"Static Delay should take at least {delayMs}ms in {mode} mode, but took {stopwatch.ElapsedMilliseconds}ms"); - } - } - - #endregion - #region Sanitizer Configuration [Test] diff --git a/sdk/core/Microsoft.ClientModel.TestFramework/tests/TestUtilities/TestUtilitiesIntegrationTests.cs b/sdk/core/Microsoft.ClientModel.TestFramework/tests/TestUtilities/TestUtilitiesIntegrationTests.cs index c1ac03fb7e6a..6d1b5789aa58 100644 --- a/sdk/core/Microsoft.ClientModel.TestFramework/tests/TestUtilities/TestUtilitiesIntegrationTests.cs +++ b/sdk/core/Microsoft.ClientModel.TestFramework/tests/TestUtilities/TestUtilitiesIntegrationTests.cs @@ -122,51 +122,6 @@ public async Task CompleteRequestResponseCycleWithAllMockComponentsWorksEndToEnd } } - [Test] - public async Task MockTransportWithAsyncProcessingHandlesAsyncOperationsCorrectly() - { - var processedItems = new List(); - var transport = new MockPipelineTransport(msg => - { - processedItems.Add($"Processed: {msg.Request.Method} {msg.Request.Uri}"); - return new MockPipelineResponse(200, "OK").WithContent("async response"); - }); - transport.ExpectSyncPipeline = false; // Enable async processing - - var messages = new[] - { - CreateMessageWithUrl(transport, "GET", "https://api.example.com/item/1"), - CreateMessageWithUrl(transport, "GET", "https://api.example.com/item/2"), - CreateMessageWithUrl(transport, "GET", "https://api.example.com/item/3") - }; - - var tasks = messages.Select(async msg => - { - await Task.Delay(10); // Simulate some async work - await transport.ProcessAsync(msg); - return msg; - }); - - var results = await Task.WhenAll(tasks); - - using (Assert.EnterMultipleScope()) - { - Assert.That(results.Length, Is.EqualTo(3)); - Assert.That(processedItems.Count, Is.EqualTo(3)); - Assert.That(transport.Requests.Count, Is.EqualTo(3)); - } - - foreach (var result in results) - { - Assert.That(result.Response, Is.Not.Null); - using (Assert.EnterMultipleScope()) - { - Assert.That(result.Response.Status, Is.EqualTo(200)); - Assert.That(result.Response.Content.ToString(), Is.EqualTo("async response")); - } - } - } - [Test] public void MockTransportWithSyncAsyncMismatchThrowsAppropriateExceptions() { diff --git a/sdk/databox/Azure.ResourceManager.DataBox/tsp-location.yaml b/sdk/databox/Azure.ResourceManager.DataBox/tsp-location.yaml index 823aa5a04b68..ae34152df7f6 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/tsp-location.yaml +++ b/sdk/databox/Azure.ResourceManager.DataBox/tsp-location.yaml @@ -1,3 +1,3 @@ -directory: specification/databox/DataBox.Management -commit: 229dfd2b11c491c4c48a738d8f16a2629957225a +directory: specification/databox/resource-manager/Microsoft.DataBox/DataBox +commit: c07353d57c4fbbf71dbca35ca187dd9951a99631 repo: Azure/azure-rest-api-specs diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/Azure.ResourceManager.DisconnectedOperations.sln b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/Azure.ResourceManager.DisconnectedOperations.sln new file mode 100644 index 000000000000..02420bcdefe6 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/Azure.ResourceManager.DisconnectedOperations.sln @@ -0,0 +1,30 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36408.4 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DisconnectedOperations", "src\Azure.ResourceManager.DisconnectedOperations.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DisconnectedOperations.Tests", "tests\Azure.ResourceManager.DisconnectedOperations.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/CHANGELOG.md b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/CHANGELOG.md new file mode 100644 index 000000000000..442982051736 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/CHANGELOG.md @@ -0,0 +1,6 @@ +# Release History + +## 1.0.0-beta.1 (2025-09-24) + +### Features Added +The Disconnected operations resource provider offers APIs for managing the lifecycle of a disconnected operations device and getting the required software for deploying and updating the disconnected operations control plane. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Directory.Build.props b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/Directory.Build.props similarity index 100% rename from sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Directory.Build.props rename to sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/Directory.Build.props diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/README.md b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/README.md new file mode 100644 index 000000000000..8c1ffb87179e --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure DisconnectedOperations management client library for .NET + +**The Disconnected operations resource provider offers APIs for managing the lifecycle of a disconnected operations device and getting the required software for deploying and updating the disconnected operations control plane.** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure DisconnectedOperations management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.DisconnectedOperations --prerelease +``` + +### Prerequisites + +* You must have a [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/api/Azure.ResourceManager.DisconnectedOperations.net8.0.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/api/Azure.ResourceManager.DisconnectedOperations.net8.0.cs new file mode 100644 index 000000000000..e1a228632c1d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/api/Azure.ResourceManager.DisconnectedOperations.net8.0.cs @@ -0,0 +1,441 @@ +namespace Azure.ResourceManager.DisconnectedOperations +{ + public partial class AzureResourceManagerDisconnectedOperationsContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerDisconnectedOperationsContext() { } + public static Azure.ResourceManager.DisconnectedOperations.AzureResourceManagerDisconnectedOperationsContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class DisconnectedOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DisconnectedOperationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, 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 name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, 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 DisconnectedOperationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData 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.DisconnectedOperations.DisconnectedOperationData 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 DisconnectedOperationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DisconnectedOperationResource() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) { 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.Response GetDeploymentManifest(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentManifestAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDisconnectedOperationsImage(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDisconnectedOperationsImageAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageCollection GetDisconnectedOperationsImages() { 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.DisconnectedOperations.DisconnectedOperationData 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.DisconnectedOperations.DisconnectedOperationData 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.Response Update(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DisconnectedOperationsArtifactCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DisconnectedOperationsArtifactCollection() { } + public virtual Azure.Response Exists(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string artifactName, 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 artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string artifactName, 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 DisconnectedOperationsArtifactData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsArtifactData() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData 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.DisconnectedOperations.DisconnectedOperationsArtifactData 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 DisconnectedOperationsArtifactResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DisconnectedOperationsArtifactResource() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) { 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 GetDownloadUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDownloadUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData 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.DisconnectedOperations.DisconnectedOperationsArtifactData 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 static partial class DisconnectedOperationsExtensions + { + public static Azure.Response GetDisconnectedOperation(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDisconnectedOperationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationResource GetDisconnectedOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationCollection GetDisconnectedOperations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDisconnectedOperations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactResource GetDisconnectedOperationsArtifactResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.AsyncPageable GetDisconnectedOperationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageResource GetDisconnectedOperationsImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class DisconnectedOperationsImageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DisconnectedOperationsImageCollection() { } + public virtual Azure.Response Exists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageName, 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 DisconnectedOperationsImageData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsImageData() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData 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.DisconnectedOperations.DisconnectedOperationsImageData 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 DisconnectedOperationsImageResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DisconnectedOperationsImageResource() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string imageName) { 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 GetDisconnectedOperationsArtifact(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDisconnectedOperationsArtifactAsync(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactCollection GetDisconnectedOperationsArtifacts() { throw null; } + public virtual Azure.Response GetDownloadUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDownloadUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData 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.DisconnectedOperations.DisconnectedOperationsImageData 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.DisconnectedOperations.Mocking +{ + public partial class MockableDisconnectedOperationsArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDisconnectedOperationsArmClient() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationResource GetDisconnectedOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactResource GetDisconnectedOperationsArtifactResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageResource GetDisconnectedOperationsImageResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDisconnectedOperationsResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDisconnectedOperationsResourceGroupResource() { } + public virtual Azure.Response GetDisconnectedOperation(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDisconnectedOperationAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationCollection GetDisconnectedOperations() { throw null; } + } + public partial class MockableDisconnectedOperationsSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDisconnectedOperationsSubscriptionResource() { } + public virtual Azure.Pageable GetDisconnectedOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDisconnectedOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + public static partial class ArmDisconnectedOperationsModelFactory + { + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData DisconnectedOperationData(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.DisconnectedOperations.Models.DisconnectedOperationProperties properties = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationDeploymentManifest DisconnectedOperationDeploymentManifest(Azure.Core.ResourceIdentifier resourceId = null, string resourceName = null, string stampId = null, string location = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel billingModel = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent connectionIntent = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent), string cloud = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationProperties DisconnectedOperationProperties(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), string stampId = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel billingModel = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent connectionIntent = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus? connectionStatus = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus?), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus? registrationStatus = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus?), string deviceVersion = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData DisconnectedOperationsArtifactData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties properties = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactDownloadResult DisconnectedOperationsArtifactDownloadResult(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), int artifactOrder = 0, string title = null, string description = null, long? size = default(long?), System.Uri downloadLink = null, System.DateTimeOffset linkExpiry = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties DisconnectedOperationsArtifactProperties(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), int artifactOrder = 0, string title = null, string description = null, long? size = default(long?)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData DisconnectedOperationsImageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties properties = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageDownloadResult DisconnectedOperationsImageDownloadResult(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), string releaseVersion = null, string releaseDisplayName = null, string releaseNotes = null, System.DateTimeOffset releaseOn = default(System.DateTimeOffset), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType releaseType = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType), System.Collections.Generic.IEnumerable compatibleVersions = null, string transactionId = null, System.Uri downloadLink = null, System.DateTimeOffset linkExpiry = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties DisconnectedOperationsImageProperties(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), string releaseVersion = null, string releaseDisplayName = null, string releaseNotes = null, System.DateTimeOffset releaseOn = default(System.DateTimeOffset), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType releaseType = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType), System.Collections.Generic.IEnumerable compatibleVersions = null) { throw null; } + } + public partial class DisconnectedOperationDeploymentManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationDeploymentManifest() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel BillingModel { get { throw null; } } + public string Cloud { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent ConnectionIntent { get { throw null; } } + public string Location { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public string ResourceName { get { throw null; } } + public string StampId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationDeploymentManifest 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.DisconnectedOperations.Models.DisconnectedOperationDeploymentManifest 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 DisconnectedOperationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationPatch() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationUpdateProperties Properties { 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) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationPatch 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.DisconnectedOperations.Models.DisconnectedOperationPatch 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 DisconnectedOperationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationProperties(string stampId, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel billingModel, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent connectionIntent) { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel BillingModel { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent ConnectionIntent { get { throw null; } set { } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus? ConnectionStatus { get { throw null; } } + public string DeviceVersion { get { throw null; } set { } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus? RegistrationStatus { get { throw null; } set { } } + public string StampId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationProperties 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.DisconnectedOperations.Models.DisconnectedOperationProperties 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 DisconnectedOperationsArtifactDownloadResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsArtifactDownloadResult() { } + public int ArtifactOrder { get { throw null; } } + public string Description { get { throw null; } } + public System.Uri DownloadLink { get { throw null; } } + public System.DateTimeOffset LinkExpiry { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public long? Size { get { throw null; } } + public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactDownloadResult 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.DisconnectedOperations.Models.DisconnectedOperationsArtifactDownloadResult 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 DisconnectedOperationsArtifactProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsArtifactProperties() { } + public int ArtifactOrder { get { throw null; } } + public string Description { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public long? Size { get { throw null; } } + public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties 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.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties 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 DisconnectedOperationsBillingModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsBillingModel(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel Capacity { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel 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.DisconnectedOperations.Models.DisconnectedOperationsBillingModel left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsConnectionIntent : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsConnectionIntent(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent Connected { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent 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.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsConnectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsConnectionStatus(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus Connected { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus 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.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DisconnectedOperationsImageDownloadResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsImageDownloadResult() { } + public System.Collections.Generic.IReadOnlyList CompatibleVersions { get { throw null; } } + public System.Uri DownloadLink { get { throw null; } } + public System.DateTimeOffset LinkExpiry { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public string ReleaseDisplayName { get { throw null; } } + public string ReleaseNotes { get { throw null; } } + public System.DateTimeOffset ReleaseOn { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType ReleaseType { get { throw null; } } + public string ReleaseVersion { get { throw null; } } + public string TransactionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageDownloadResult 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.DisconnectedOperations.Models.DisconnectedOperationsImageDownloadResult 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 DisconnectedOperationsImageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsImageProperties() { } + public System.Collections.Generic.IReadOnlyList CompatibleVersions { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public string ReleaseDisplayName { get { throw null; } } + public string ReleaseNotes { get { throw null; } } + public System.DateTimeOffset ReleaseOn { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType ReleaseType { get { throw null; } } + public string ReleaseVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties 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.DisconnectedOperations.Models.DisconnectedOperationsImageProperties 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 DisconnectedOperationsRegistrationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsRegistrationStatus(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus Registered { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus Unregistered { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus 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.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsReleaseType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsReleaseType(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType Install { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType Update { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType 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.DisconnectedOperations.Models.DisconnectedOperationsReleaseType left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState 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.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DisconnectedOperationUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationUpdateProperties() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent? ConnectionIntent { get { throw null; } set { } } + public string DeviceVersion { get { throw null; } set { } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus? RegistrationStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationUpdateProperties 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.DisconnectedOperations.Models.DisconnectedOperationUpdateProperties 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/api/Azure.ResourceManager.DisconnectedOperations.netstandard2.0.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/api/Azure.ResourceManager.DisconnectedOperations.netstandard2.0.cs new file mode 100644 index 000000000000..e1a228632c1d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/api/Azure.ResourceManager.DisconnectedOperations.netstandard2.0.cs @@ -0,0 +1,441 @@ +namespace Azure.ResourceManager.DisconnectedOperations +{ + public partial class AzureResourceManagerDisconnectedOperationsContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerDisconnectedOperationsContext() { } + public static Azure.ResourceManager.DisconnectedOperations.AzureResourceManagerDisconnectedOperationsContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class DisconnectedOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DisconnectedOperationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, 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 name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, 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 DisconnectedOperationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData 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.DisconnectedOperations.DisconnectedOperationData 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 DisconnectedOperationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DisconnectedOperationResource() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) { 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.Response GetDeploymentManifest(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentManifestAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDisconnectedOperationsImage(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDisconnectedOperationsImageAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageCollection GetDisconnectedOperationsImages() { 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.DisconnectedOperations.DisconnectedOperationData 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.DisconnectedOperations.DisconnectedOperationData 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.Response Update(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DisconnectedOperationsArtifactCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DisconnectedOperationsArtifactCollection() { } + public virtual Azure.Response Exists(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string artifactName, 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 artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string artifactName, 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 DisconnectedOperationsArtifactData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsArtifactData() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData 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.DisconnectedOperations.DisconnectedOperationsArtifactData 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 DisconnectedOperationsArtifactResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DisconnectedOperationsArtifactResource() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) { 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 GetDownloadUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDownloadUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData 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.DisconnectedOperations.DisconnectedOperationsArtifactData 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 static partial class DisconnectedOperationsExtensions + { + public static Azure.Response GetDisconnectedOperation(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDisconnectedOperationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationResource GetDisconnectedOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationCollection GetDisconnectedOperations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDisconnectedOperations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactResource GetDisconnectedOperationsArtifactResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.AsyncPageable GetDisconnectedOperationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageResource GetDisconnectedOperationsImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class DisconnectedOperationsImageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DisconnectedOperationsImageCollection() { } + public virtual Azure.Response Exists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string imageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string imageName, 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 DisconnectedOperationsImageData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsImageData() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData 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.DisconnectedOperations.DisconnectedOperationsImageData 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 DisconnectedOperationsImageResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DisconnectedOperationsImageResource() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string imageName) { 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 GetDisconnectedOperationsArtifact(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDisconnectedOperationsArtifactAsync(string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactCollection GetDisconnectedOperationsArtifacts() { throw null; } + public virtual Azure.Response GetDownloadUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDownloadUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData 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.DisconnectedOperations.DisconnectedOperationsImageData 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.DisconnectedOperations.Mocking +{ + public partial class MockableDisconnectedOperationsArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDisconnectedOperationsArmClient() { } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationResource GetDisconnectedOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactResource GetDisconnectedOperationsArtifactResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageResource GetDisconnectedOperationsImageResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDisconnectedOperationsResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDisconnectedOperationsResourceGroupResource() { } + public virtual Azure.Response GetDisconnectedOperation(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDisconnectedOperationAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationCollection GetDisconnectedOperations() { throw null; } + } + public partial class MockableDisconnectedOperationsSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDisconnectedOperationsSubscriptionResource() { } + public virtual Azure.Pageable GetDisconnectedOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDisconnectedOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + public static partial class ArmDisconnectedOperationsModelFactory + { + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationData DisconnectedOperationData(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.DisconnectedOperations.Models.DisconnectedOperationProperties properties = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationDeploymentManifest DisconnectedOperationDeploymentManifest(Azure.Core.ResourceIdentifier resourceId = null, string resourceName = null, string stampId = null, string location = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel billingModel = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent connectionIntent = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent), string cloud = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationProperties DisconnectedOperationProperties(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), string stampId = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel billingModel = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent connectionIntent = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus? connectionStatus = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus?), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus? registrationStatus = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus?), string deviceVersion = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsArtifactData DisconnectedOperationsArtifactData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties properties = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactDownloadResult DisconnectedOperationsArtifactDownloadResult(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), int artifactOrder = 0, string title = null, string description = null, long? size = default(long?), System.Uri downloadLink = null, System.DateTimeOffset linkExpiry = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties DisconnectedOperationsArtifactProperties(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), int artifactOrder = 0, string title = null, string description = null, long? size = default(long?)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.DisconnectedOperationsImageData DisconnectedOperationsImageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties properties = null) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageDownloadResult DisconnectedOperationsImageDownloadResult(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), string releaseVersion = null, string releaseDisplayName = null, string releaseNotes = null, System.DateTimeOffset releaseOn = default(System.DateTimeOffset), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType releaseType = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType), System.Collections.Generic.IEnumerable compatibleVersions = null, string transactionId = null, System.Uri downloadLink = null, System.DateTimeOffset linkExpiry = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties DisconnectedOperationsImageProperties(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState?), string releaseVersion = null, string releaseDisplayName = null, string releaseNotes = null, System.DateTimeOffset releaseOn = default(System.DateTimeOffset), Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType releaseType = default(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType), System.Collections.Generic.IEnumerable compatibleVersions = null) { throw null; } + } + public partial class DisconnectedOperationDeploymentManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationDeploymentManifest() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel BillingModel { get { throw null; } } + public string Cloud { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent ConnectionIntent { get { throw null; } } + public string Location { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public string ResourceName { get { throw null; } } + public string StampId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationDeploymentManifest 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.DisconnectedOperations.Models.DisconnectedOperationDeploymentManifest 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 DisconnectedOperationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationPatch() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationUpdateProperties Properties { 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) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationPatch 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.DisconnectedOperations.Models.DisconnectedOperationPatch 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 DisconnectedOperationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationProperties(string stampId, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel billingModel, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent connectionIntent) { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel BillingModel { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent ConnectionIntent { get { throw null; } set { } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus? ConnectionStatus { get { throw null; } } + public string DeviceVersion { get { throw null; } set { } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus? RegistrationStatus { get { throw null; } set { } } + public string StampId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationProperties 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.DisconnectedOperations.Models.DisconnectedOperationProperties 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 DisconnectedOperationsArtifactDownloadResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsArtifactDownloadResult() { } + public int ArtifactOrder { get { throw null; } } + public string Description { get { throw null; } } + public System.Uri DownloadLink { get { throw null; } } + public System.DateTimeOffset LinkExpiry { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public long? Size { get { throw null; } } + public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactDownloadResult 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.DisconnectedOperations.Models.DisconnectedOperationsArtifactDownloadResult 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 DisconnectedOperationsArtifactProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsArtifactProperties() { } + public int ArtifactOrder { get { throw null; } } + public string Description { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public long? Size { get { throw null; } } + public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties 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.DisconnectedOperations.Models.DisconnectedOperationsArtifactProperties 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 DisconnectedOperationsBillingModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsBillingModel(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel Capacity { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel 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.DisconnectedOperations.Models.DisconnectedOperationsBillingModel left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsBillingModel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsConnectionIntent : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsConnectionIntent(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent Connected { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent 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.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsConnectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsConnectionStatus(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus Connected { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus 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.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DisconnectedOperationsImageDownloadResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsImageDownloadResult() { } + public System.Collections.Generic.IReadOnlyList CompatibleVersions { get { throw null; } } + public System.Uri DownloadLink { get { throw null; } } + public System.DateTimeOffset LinkExpiry { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public string ReleaseDisplayName { get { throw null; } } + public string ReleaseNotes { get { throw null; } } + public System.DateTimeOffset ReleaseOn { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType ReleaseType { get { throw null; } } + public string ReleaseVersion { get { throw null; } } + public string TransactionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageDownloadResult 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.DisconnectedOperations.Models.DisconnectedOperationsImageDownloadResult 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 DisconnectedOperationsImageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DisconnectedOperationsImageProperties() { } + public System.Collections.Generic.IReadOnlyList CompatibleVersions { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState? ProvisioningState { get { throw null; } } + public string ReleaseDisplayName { get { throw null; } } + public string ReleaseNotes { get { throw null; } } + public System.DateTimeOffset ReleaseOn { get { throw null; } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType ReleaseType { get { throw null; } } + public string ReleaseVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsImageProperties 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.DisconnectedOperations.Models.DisconnectedOperationsImageProperties 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 DisconnectedOperationsRegistrationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsRegistrationStatus(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus Registered { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus Unregistered { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus 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.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsReleaseType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsReleaseType(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType Install { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType Update { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType 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.DisconnectedOperations.Models.DisconnectedOperationsReleaseType left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsReleaseType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisconnectedOperationsResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisconnectedOperationsResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState 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.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState left, Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DisconnectedOperationUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DisconnectedOperationUpdateProperties() { } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsConnectionIntent? ConnectionIntent { get { throw null; } set { } } + public string DeviceVersion { get { throw null; } set { } } + public Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationsRegistrationStatus? RegistrationStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DisconnectedOperations.Models.DisconnectedOperationUpdateProperties 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.DisconnectedOperations.Models.DisconnectedOperationUpdateProperties 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/assets.json b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/assets.json new file mode 100644 index 000000000000..81ff79652eb2 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations", + "Tag": "" +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Azure.ResourceManager.DisconnectedOperations.csproj b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Azure.ResourceManager.DisconnectedOperations.csproj new file mode 100644 index 000000000000..2f0e4e0db1b6 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Azure.ResourceManager.DisconnectedOperations.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider DisconnectedOperations. + 1.0.0-beta.1 + azure;management;arm;resource manager;disconnectedoperations + Azure.ResourceManager.DisconnectedOperations + + diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/ArmDisconnectedOperationsModelFactory.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/ArmDisconnectedOperationsModelFactory.cs new file mode 100644 index 000000000000..e1146a7d8db0 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/ArmDisconnectedOperationsModelFactory.cs @@ -0,0 +1,217 @@ +// 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.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// Model factory for models. + public static partial class ArmDisconnectedOperationsModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DisconnectedOperationData DisconnectedOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DisconnectedOperationProperties properties = null) + { + tags ??= new Dictionary(); + + return new DisconnectedOperationData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The unique GUID of the stamp. + /// The billing model. + /// The connection intent. + /// The connection status. + /// The registration intent. + /// The device version. + /// A new instance for mocking. + public static DisconnectedOperationProperties DisconnectedOperationProperties(DisconnectedOperationsResourceProvisioningState? provisioningState = null, string stampId = null, DisconnectedOperationsBillingModel billingModel = default, DisconnectedOperationsConnectionIntent connectionIntent = default, DisconnectedOperationsConnectionStatus? connectionStatus = null, DisconnectedOperationsRegistrationStatus? registrationStatus = null, string deviceVersion = null) + { + return new DisconnectedOperationProperties( + provisioningState, + stampId, + billingModel, + connectionIntent, + connectionStatus, + registrationStatus, + deviceVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource identifier of the disconnected operations resource. + /// The resource name. + /// The unique GUID of the stamp. + /// The resource location. + /// The billing model. + /// The connection intent. + /// The cloud in which the resource is registered. + /// A new instance for mocking. + public static DisconnectedOperationDeploymentManifest DisconnectedOperationDeploymentManifest(ResourceIdentifier resourceId = null, string resourceName = null, string stampId = null, string location = null, DisconnectedOperationsBillingModel billingModel = default, DisconnectedOperationsConnectionIntent connectionIntent = default, string cloud = null) + { + return new DisconnectedOperationDeploymentManifest( + resourceId, + resourceName, + stampId, + location, + billingModel, + connectionIntent, + cloud, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DisconnectedOperationsImageData DisconnectedOperationsImageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DisconnectedOperationsImageProperties properties = null) + { + return new DisconnectedOperationsImageData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The version of the package in the format 1.1.1. + /// The release name. + /// The release notes. + /// The release date. + /// The release type. + /// The versions that are compatible for this update package. + /// A new instance for mocking. + public static DisconnectedOperationsImageProperties DisconnectedOperationsImageProperties(DisconnectedOperationsResourceProvisioningState? provisioningState = null, string releaseVersion = null, string releaseDisplayName = null, string releaseNotes = null, DateTimeOffset releaseOn = default, DisconnectedOperationsReleaseType releaseType = default, IEnumerable compatibleVersions = null) + { + compatibleVersions ??= new List(); + + return new DisconnectedOperationsImageProperties( + provisioningState, + releaseVersion, + releaseDisplayName, + releaseNotes, + releaseOn, + releaseType, + compatibleVersions?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The version of the package in the format 1.1.1. + /// The release name. + /// The release notes. + /// The release date. + /// The release type. + /// The versions that are compatible for this update package. + /// The unique identifier of the download. + /// The download URI. + /// The download link expiry time. + /// A new instance for mocking. + public static DisconnectedOperationsImageDownloadResult DisconnectedOperationsImageDownloadResult(DisconnectedOperationsResourceProvisioningState? provisioningState = null, string releaseVersion = null, string releaseDisplayName = null, string releaseNotes = null, DateTimeOffset releaseOn = default, DisconnectedOperationsReleaseType releaseType = default, IEnumerable compatibleVersions = null, string transactionId = null, Uri downloadLink = null, DateTimeOffset linkExpiry = default) + { + compatibleVersions ??= new List(); + + return new DisconnectedOperationsImageDownloadResult( + provisioningState, + releaseVersion, + releaseDisplayName, + releaseNotes, + releaseOn, + releaseType, + compatibleVersions?.ToList(), + transactionId, + downloadLink, + linkExpiry, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DisconnectedOperationsArtifactData DisconnectedOperationsArtifactData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DisconnectedOperationsArtifactProperties properties = null) + { + return new DisconnectedOperationsArtifactData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The artifact display order. + /// The artifact title. + /// The artifact description. + /// The artifact size in MB. + /// A new instance for mocking. + public static DisconnectedOperationsArtifactProperties DisconnectedOperationsArtifactProperties(DisconnectedOperationsResourceProvisioningState? provisioningState = null, int artifactOrder = default, string title = null, string description = null, long? size = null) + { + return new DisconnectedOperationsArtifactProperties( + provisioningState, + artifactOrder, + title, + description, + size, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The artifact display order. + /// The artifact title. + /// The artifact description. + /// The artifact size in MB. + /// The download URI. + /// The download link expiry time. + /// A new instance for mocking. + public static DisconnectedOperationsArtifactDownloadResult DisconnectedOperationsArtifactDownloadResult(DisconnectedOperationsResourceProvisioningState? provisioningState = null, int artifactOrder = default, string title = null, string description = null, long? size = null, Uri downloadLink = null, DateTimeOffset linkExpiry = default) + { + return new DisconnectedOperationsArtifactDownloadResult( + provisioningState, + artifactOrder, + title, + description, + size, + downloadLink, + linkExpiry, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationCollection.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationCollection.cs new file mode 100644 index 000000000000..1024351c100e --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationCollection.cs @@ -0,0 +1,494 @@ +// 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.DisconnectedOperations +{ + /// + /// 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 GetDisconnectedOperations method from an instance of . + /// + public partial class DisconnectedOperationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _disconnectedOperationClientDiagnostics; + private readonly DisconnectedRestOperations _disconnectedOperationRestClient; + + /// Initializes a new instance of the class for mocking. + protected DisconnectedOperationCollection() + { + } + + /// 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 DisconnectedOperationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _disconnectedOperationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", DisconnectedOperationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DisconnectedOperationResource.ResourceType, out string disconnectedOperationApiVersion); + _disconnectedOperationRestClient = new DisconnectedRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, disconnectedOperationApiVersion); +#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 a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-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. + /// Name of the resource. + /// 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 name, DisconnectedOperationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, name, data, cancellationToken).ConfigureAwait(false); + var operation = new DisconnectedOperationsArmOperation(new DisconnectedOperationOperationSource(Client), _disconnectedOperationClientDiagnostics, Pipeline, _disconnectedOperationRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, 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 a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-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. + /// Name of the resource. + /// 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 name, DisconnectedOperationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, name, data, cancellationToken); + var operation = new DisconnectedOperationsArmOperation(new DisconnectedOperationOperationSource(Client), _disconnectedOperationClientDiagnostics, Pipeline, _disconnectedOperationRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.Get"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.Get"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DisconnectedOperation resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations + /// + /// + /// Operation Id + /// DisconnectedOperation_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _disconnectedOperationRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _disconnectedOperationRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationResource(Client, DisconnectedOperationData.DeserializeDisconnectedOperationData(e)), _disconnectedOperationClientDiagnostics, Pipeline, "DisconnectedOperationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DisconnectedOperation resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations + /// + /// + /// Operation Id + /// DisconnectedOperation_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _disconnectedOperationRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _disconnectedOperationRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationResource(Client, DisconnectedOperationData.DeserializeDisconnectedOperationData(e)), _disconnectedOperationClientDiagnostics, Pipeline, "DisconnectedOperationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.Exists"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, name, 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.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.Exists"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, name, 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.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationResource(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.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationResource(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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationData.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationData.Serialization.cs new file mode 100644 index 000000000000..7f99e5bc4ec7 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationData.Serialization.cs @@ -0,0 +1,179 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + public partial class DisconnectedOperationData : 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(DisconnectedOperationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DisconnectedOperationData 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(DisconnectedOperationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationData(document.RootElement, options); + } + + internal static DisconnectedOperationData DeserializeDisconnectedOperationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationProperties 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 = DisconnectedOperationProperties.DeserializeDisconnectedOperationProperties(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, AzureResourceManagerDisconnectedOperationsContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationData( + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationData)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationData 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 DeserializeDisconnectedOperationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationData.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationData.cs new file mode 100644 index 000000000000..2f23f60b2851 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationData.cs @@ -0,0 +1,83 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// A class representing the DisconnectedOperation data model. + /// Disconnected operation resource. + /// + public partial class DisconnectedOperationData : 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 DisconnectedOperationData(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 DisconnectedOperationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DisconnectedOperationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationData() + { + } + + /// The resource-specific properties for this resource. + public DisconnectedOperationProperties Properties { get; set; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationResource.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationResource.Serialization.cs new file mode 100644 index 000000000000..fd575211c918 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.DisconnectedOperations +{ + public partial class DisconnectedOperationResource : IJsonModel + { + private static DisconnectedOperationData s_dataDeserializationInstance; + private static DisconnectedOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DisconnectedOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDisconnectedOperationsContext.Default); + + DisconnectedOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDisconnectedOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationResource.cs new file mode 100644 index 000000000000..b743492bd078 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationResource.cs @@ -0,0 +1,844 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// A Class representing a DisconnectedOperation 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 GetDisconnectedOperationResource method. + /// Otherwise you can get one from its parent resource using the GetDisconnectedOperation method. + /// + public partial class DisconnectedOperationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _disconnectedOperationClientDiagnostics; + private readonly DisconnectedRestOperations _disconnectedOperationRestClient; + private readonly DisconnectedOperationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/disconnectedOperations"; + + /// Initializes a new instance of the class for mocking. + protected DisconnectedOperationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DisconnectedOperationResource(ArmClient client, DisconnectedOperationData 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 DisconnectedOperationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _disconnectedOperationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string disconnectedOperationApiVersion); + _disconnectedOperationRestClient = new DisconnectedRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, disconnectedOperationApiVersion); +#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 DisconnectedOperationData 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 DisconnectedOperationsImageResources in the DisconnectedOperation. + /// An object representing collection of DisconnectedOperationsImageResources and their operations over a DisconnectedOperationsImageResource. + public virtual DisconnectedOperationsImageCollection GetDisconnectedOperationsImages() + { + return GetCachedClient(client => new DisconnectedOperationsImageCollection(client, Id)); + } + + /// + /// Get the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDisconnectedOperationsImageAsync(string imageName, CancellationToken cancellationToken = default) + { + return await GetDisconnectedOperationsImages().GetAsync(imageName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDisconnectedOperationsImage(string imageName, CancellationToken cancellationToken = default) + { + return GetDisconnectedOperationsImages().Get(imageName, cancellationToken); + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.Get"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.Get"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Delete + /// + /// + /// Default Api Version + /// 2025-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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.Delete"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DisconnectedOperationsArmOperation(_disconnectedOperationClientDiagnostics, Pipeline, _disconnectedOperationRestClient.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 DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Delete + /// + /// + /// Default Api Version + /// 2025-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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.Delete"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DisconnectedOperationsArmOperation(_disconnectedOperationClientDiagnostics, Pipeline, _disconnectedOperationRestClient.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 DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Update + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(DisconnectedOperationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.Update"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DisconnectedOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Update + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(DisconnectedOperationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.Update"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new DisconnectedOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// get deployment manifest. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/listDeploymentManifest + /// + /// + /// Operation Id + /// DisconnectedOperations_ListDeploymentManifest + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetDeploymentManifestAsync(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.GetDeploymentManifest"); + scope.Start(); + try + { + var response = await _disconnectedOperationRestClient.ListDeploymentManifestAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// get deployment manifest. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/listDeploymentManifest + /// + /// + /// Operation Id + /// DisconnectedOperations_ListDeploymentManifest + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetDeploymentManifest(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.GetDeploymentManifest"); + scope.Start(); + try + { + var response = _disconnectedOperationRestClient.ListDeploymentManifest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// 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 = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.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 _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DisconnectedOperationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DisconnectedOperationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// 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 = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.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 = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DisconnectedOperationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DisconnectedOperationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// 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 = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.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 _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DisconnectedOperationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DisconnectedOperationPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// 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 = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.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 = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DisconnectedOperationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DisconnectedOperationPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// 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 = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.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 _disconnectedOperationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DisconnectedOperationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DisconnectedOperationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// 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 = _disconnectedOperationClientDiagnostics.CreateScope("DisconnectedOperationResource.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 = _disconnectedOperationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DisconnectedOperationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DisconnectedOperationPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactCollection.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactCollection.cs new file mode 100644 index 000000000000..17d1c238aca4 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactCollection.cs @@ -0,0 +1,395 @@ +// 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.DisconnectedOperations +{ + /// + /// 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 GetDisconnectedOperationsArtifacts method from an instance of . + /// + public partial class DisconnectedOperationsArtifactCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _disconnectedOperationsArtifactArtifactsClientDiagnostics; + private readonly ArtifactsRestOperations _disconnectedOperationsArtifactArtifactsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DisconnectedOperationsArtifactCollection() + { + } + + /// 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 DisconnectedOperationsArtifactCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _disconnectedOperationsArtifactArtifactsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", DisconnectedOperationsArtifactResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DisconnectedOperationsArtifactResource.ResourceType, out string disconnectedOperationsArtifactArtifactsApiVersion); + _disconnectedOperationsArtifactArtifactsRestClient = new ArtifactsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, disconnectedOperationsArtifactArtifactsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DisconnectedOperationsImageResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DisconnectedOperationsImageResource.ResourceType), nameof(id)); + } + + /// + /// Get the resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactCollection.Get"); + scope.Start(); + try + { + var response = await _disconnectedOperationsArtifactArtifactsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, artifactName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsArtifactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactCollection.Get"); + scope.Start(); + try + { + var response = _disconnectedOperationsArtifactArtifactsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, artifactName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsArtifactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by parent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts + /// + /// + /// Operation Id + /// Artifact_ListByParent + /// + /// + /// Default Api Version + /// 2025-06-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) => _disconnectedOperationsArtifactArtifactsRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _disconnectedOperationsArtifactArtifactsRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationsArtifactResource(Client, DisconnectedOperationsArtifactData.DeserializeDisconnectedOperationsArtifactData(e)), _disconnectedOperationsArtifactArtifactsClientDiagnostics, Pipeline, "DisconnectedOperationsArtifactCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by parent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts + /// + /// + /// Operation Id + /// Artifact_ListByParent + /// + /// + /// Default Api Version + /// 2025-06-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) => _disconnectedOperationsArtifactArtifactsRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _disconnectedOperationsArtifactArtifactsRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationsArtifactResource(Client, DisconnectedOperationsArtifactData.DeserializeDisconnectedOperationsArtifactData(e)), _disconnectedOperationsArtifactArtifactsClientDiagnostics, Pipeline, "DisconnectedOperationsArtifactCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactCollection.Exists"); + scope.Start(); + try + { + var response = await _disconnectedOperationsArtifactArtifactsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, artifactName, 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.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactCollection.Exists"); + scope.Start(); + try + { + var response = _disconnectedOperationsArtifactArtifactsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, artifactName, 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.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _disconnectedOperationsArtifactArtifactsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, artifactName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsArtifactResource(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.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactCollection.GetIfExists"); + scope.Start(); + try + { + var response = _disconnectedOperationsArtifactArtifactsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, artifactName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsArtifactResource(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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactData.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactData.Serialization.cs new file mode 100644 index 000000000000..01b5221cf16b --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactData.Serialization.cs @@ -0,0 +1,156 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + public partial class DisconnectedOperationsArtifactData : 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(DisconnectedOperationsArtifactData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DisconnectedOperationsArtifactData 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(DisconnectedOperationsArtifactData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationsArtifactData(document.RootElement, options); + } + + internal static DisconnectedOperationsArtifactData DeserializeDisconnectedOperationsArtifactData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsArtifactProperties 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 = DisconnectedOperationsArtifactProperties.DeserializeDisconnectedOperationsArtifactProperties(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, AzureResourceManagerDisconnectedOperationsContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationsArtifactData( + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsArtifactData)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationsArtifactData 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 DeserializeDisconnectedOperationsArtifactData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsArtifactData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactData.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactData.cs new file mode 100644 index 000000000000..aa5659c5f49e --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactData.cs @@ -0,0 +1,75 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// A class representing the DisconnectedOperationsArtifact data model. + /// Disconnected operations artifact resource. + /// + public partial class DisconnectedOperationsArtifactData : 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 . + internal DisconnectedOperationsArtifactData() + { + } + + /// 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 DisconnectedOperationsArtifactData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DisconnectedOperationsArtifactProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DisconnectedOperationsArtifactProperties Properties { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactResource.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactResource.Serialization.cs new file mode 100644 index 000000000000..55ba4eef8c6e --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.DisconnectedOperations +{ + public partial class DisconnectedOperationsArtifactResource : IJsonModel + { + private static DisconnectedOperationsArtifactData s_dataDeserializationInstance; + private static DisconnectedOperationsArtifactData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DisconnectedOperationsArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDisconnectedOperationsContext.Default); + + DisconnectedOperationsArtifactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDisconnectedOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactResource.cs new file mode 100644 index 000000000000..80235ef106dc --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsArtifactResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.ResourceManager.DisconnectedOperations.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// A Class representing a DisconnectedOperationsArtifact 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 GetDisconnectedOperationsArtifactResource method. + /// Otherwise you can get one from its parent resource using the GetDisconnectedOperationsArtifact method. + /// + public partial class DisconnectedOperationsArtifactResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The imageName. + /// The artifactName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _disconnectedOperationsArtifactArtifactsClientDiagnostics; + private readonly ArtifactsRestOperations _disconnectedOperationsArtifactArtifactsRestClient; + private readonly DisconnectedOperationsArtifactData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/disconnectedOperations/images/artifacts"; + + /// Initializes a new instance of the class for mocking. + protected DisconnectedOperationsArtifactResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DisconnectedOperationsArtifactResource(ArmClient client, DisconnectedOperationsArtifactData 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 DisconnectedOperationsArtifactResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _disconnectedOperationsArtifactArtifactsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string disconnectedOperationsArtifactArtifactsApiVersion); + _disconnectedOperationsArtifactArtifactsRestClient = new ArtifactsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, disconnectedOperationsArtifactArtifactsApiVersion); +#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 DisconnectedOperationsArtifactData 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 the resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactResource.Get"); + scope.Start(); + try + { + var response = await _disconnectedOperationsArtifactArtifactsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsArtifactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactResource.Get"); + scope.Start(); + try + { + var response = _disconnectedOperationsArtifactArtifactsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsArtifactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get artifact download link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName}/listDownloadUri + /// + /// + /// Operation Id + /// Artifacts_ListDownloadUri + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetDownloadUriAsync(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactResource.GetDownloadUri"); + scope.Start(); + try + { + var response = await _disconnectedOperationsArtifactArtifactsRestClient.ListDownloadUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get artifact download link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName}/listDownloadUri + /// + /// + /// Operation Id + /// Artifacts_ListDownloadUri + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetDownloadUri(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsArtifactArtifactsClientDiagnostics.CreateScope("DisconnectedOperationsArtifactResource.GetDownloadUri"); + scope.Start(); + try + { + var response = _disconnectedOperationsArtifactArtifactsRestClient.ListDownloadUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageCollection.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageCollection.cs new file mode 100644 index 000000000000..bf18dc15165c --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageCollection.cs @@ -0,0 +1,401 @@ +// 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.DisconnectedOperations +{ + /// + /// 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 GetDisconnectedOperationsImages method from an instance of . + /// + public partial class DisconnectedOperationsImageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _disconnectedOperationsImageImagesClientDiagnostics; + private readonly ImagesRestOperations _disconnectedOperationsImageImagesRestClient; + + /// Initializes a new instance of the class for mocking. + protected DisconnectedOperationsImageCollection() + { + } + + /// 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 DisconnectedOperationsImageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _disconnectedOperationsImageImagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", DisconnectedOperationsImageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DisconnectedOperationsImageResource.ResourceType, out string disconnectedOperationsImageImagesApiVersion); + _disconnectedOperationsImageImagesRestClient = new ImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, disconnectedOperationsImageImagesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DisconnectedOperationResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DisconnectedOperationResource.ResourceType), nameof(id)); + } + + /// + /// Get the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageCollection.Get"); + scope.Start(); + try + { + var response = await _disconnectedOperationsImageImagesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageCollection.Get"); + scope.Start(); + try + { + var response = _disconnectedOperationsImageImagesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by disconnected operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images + /// + /// + /// Operation Id + /// Image_ListByDisconnectedOperation + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Filter the result list using the given expression. + /// The number of result items to return. + /// The number of result items to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _disconnectedOperationsImageImagesRestClient.CreateListByDisconnectedOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _disconnectedOperationsImageImagesRestClient.CreateListByDisconnectedOperationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationsImageResource(Client, DisconnectedOperationsImageData.DeserializeDisconnectedOperationsImageData(e)), _disconnectedOperationsImageImagesClientDiagnostics, Pipeline, "DisconnectedOperationsImageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by disconnected operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images + /// + /// + /// Operation Id + /// Image_ListByDisconnectedOperation + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Filter the result list using the given expression. + /// The number of result items to return. + /// The number of result items to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _disconnectedOperationsImageImagesRestClient.CreateListByDisconnectedOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _disconnectedOperationsImageImagesRestClient.CreateListByDisconnectedOperationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationsImageResource(Client, DisconnectedOperationsImageData.DeserializeDisconnectedOperationsImageData(e)), _disconnectedOperationsImageImagesClientDiagnostics, Pipeline, "DisconnectedOperationsImageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageCollection.Exists"); + scope.Start(); + try + { + var response = await _disconnectedOperationsImageImagesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, 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.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageCollection.Exists"); + scope.Start(); + try + { + var response = _disconnectedOperationsImageImagesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, 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.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _disconnectedOperationsImageImagesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsImageResource(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.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageCollection.GetIfExists"); + scope.Start(); + try + { + var response = _disconnectedOperationsImageImagesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, imageName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsImageResource(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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageData.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageData.Serialization.cs new file mode 100644 index 000000000000..446beb595771 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageData.Serialization.cs @@ -0,0 +1,156 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + public partial class DisconnectedOperationsImageData : 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(DisconnectedOperationsImageData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DisconnectedOperationsImageData 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(DisconnectedOperationsImageData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationsImageData(document.RootElement, options); + } + + internal static DisconnectedOperationsImageData DeserializeDisconnectedOperationsImageData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsImageProperties 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 = DisconnectedOperationsImageProperties.DeserializeDisconnectedOperationsImageProperties(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, AzureResourceManagerDisconnectedOperationsContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationsImageData( + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsImageData)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationsImageData 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 DeserializeDisconnectedOperationsImageData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsImageData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageData.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageData.cs new file mode 100644 index 000000000000..4925c2cbac58 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageData.cs @@ -0,0 +1,75 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// A class representing the DisconnectedOperationsImage data model. + /// Holds the release information of a disconnected operations image. + /// + public partial class DisconnectedOperationsImageData : 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 . + internal DisconnectedOperationsImageData() + { + } + + /// 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 DisconnectedOperationsImageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DisconnectedOperationsImageProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DisconnectedOperationsImageProperties Properties { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageResource.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageResource.Serialization.cs new file mode 100644 index 000000000000..382deeb14201 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.DisconnectedOperations +{ + public partial class DisconnectedOperationsImageResource : IJsonModel + { + private static DisconnectedOperationsImageData s_dataDeserializationInstance; + private static DisconnectedOperationsImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DisconnectedOperationsImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDisconnectedOperationsContext.Default); + + DisconnectedOperationsImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDisconnectedOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageResource.cs new file mode 100644 index 000000000000..dfbf1823bbf9 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/DisconnectedOperationsImageResource.cs @@ -0,0 +1,317 @@ +// 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; +using Azure.ResourceManager.DisconnectedOperations.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// A Class representing a DisconnectedOperationsImage 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 GetDisconnectedOperationsImageResource method. + /// Otherwise you can get one from its parent resource using the GetDisconnectedOperationsImage method. + /// + public partial class DisconnectedOperationsImageResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The imageName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string imageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _disconnectedOperationsImageImagesClientDiagnostics; + private readonly ImagesRestOperations _disconnectedOperationsImageImagesRestClient; + private readonly DisconnectedOperationsImageData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/disconnectedOperations/images"; + + /// Initializes a new instance of the class for mocking. + protected DisconnectedOperationsImageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DisconnectedOperationsImageResource(ArmClient client, DisconnectedOperationsImageData 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 DisconnectedOperationsImageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _disconnectedOperationsImageImagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string disconnectedOperationsImageImagesApiVersion); + _disconnectedOperationsImageImagesRestClient = new ImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, disconnectedOperationsImageImagesApiVersion); +#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 DisconnectedOperationsImageData 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 DisconnectedOperationsArtifactResources in the DisconnectedOperationsImage. + /// An object representing collection of DisconnectedOperationsArtifactResources and their operations over a DisconnectedOperationsArtifactResource. + public virtual DisconnectedOperationsArtifactCollection GetDisconnectedOperationsArtifacts() + { + return GetCachedClient(client => new DisconnectedOperationsArtifactCollection(client, Id)); + } + + /// + /// Get the resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDisconnectedOperationsArtifactAsync(string artifactName, CancellationToken cancellationToken = default) + { + return await GetDisconnectedOperationsArtifacts().GetAsync(artifactName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/artifacts/{artifactName} + /// + /// + /// Operation Id + /// Artifact_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Artifact. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDisconnectedOperationsArtifact(string artifactName, CancellationToken cancellationToken = default) + { + return GetDisconnectedOperationsArtifacts().Get(artifactName, cancellationToken); + } + + /// + /// Get the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageResource.Get"); + scope.Start(); + try + { + var response = await _disconnectedOperationsImageImagesRestClient.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 DisconnectedOperationsImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName} + /// + /// + /// Operation Id + /// Image_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageResource.Get"); + scope.Start(); + try + { + var response = _disconnectedOperationsImageImagesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DisconnectedOperationsImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the URI to download the image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/listDownloadUri + /// + /// + /// Operation Id + /// Images_ListDownloadUri + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetDownloadUriAsync(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageResource.GetDownloadUri"); + scope.Start(); + try + { + var response = await _disconnectedOperationsImageImagesRestClient.ListDownloadUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the URI to download the image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name}/images/{imageName}/listDownloadUri + /// + /// + /// Operation Id + /// Images_ListDownloadUri + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetDownloadUri(CancellationToken cancellationToken = default) + { + using var scope = _disconnectedOperationsImageImagesClientDiagnostics.CreateScope("DisconnectedOperationsImageResource.GetDownloadUri"); + scope.Start(); + try + { + var response = _disconnectedOperationsImageImagesRestClient.ListDownloadUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/DisconnectedOperationsExtensions.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/DisconnectedOperationsExtensions.cs new file mode 100644 index 000000000000..2e878bdf31f9 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/DisconnectedOperationsExtensions.cs @@ -0,0 +1,257 @@ +// 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.Core; +using Azure.ResourceManager.DisconnectedOperations.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// A class to add extension methods to Azure.ResourceManager.DisconnectedOperations. + public static partial class DisconnectedOperationsExtensions + { + private static MockableDisconnectedOperationsArmClient GetMockableDisconnectedOperationsArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableDisconnectedOperationsArmClient(client0)); + } + + private static MockableDisconnectedOperationsResourceGroupResource GetMockableDisconnectedOperationsResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDisconnectedOperationsResourceGroupResource(client, resource.Id)); + } + + private static MockableDisconnectedOperationsSubscriptionResource GetMockableDisconnectedOperationsSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDisconnectedOperationsSubscriptionResource(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 DisconnectedOperationResource GetDisconnectedOperationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDisconnectedOperationsArmClient(client).GetDisconnectedOperationResource(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 DisconnectedOperationsImageResource GetDisconnectedOperationsImageResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDisconnectedOperationsArmClient(client).GetDisconnectedOperationsImageResource(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 DisconnectedOperationsArtifactResource GetDisconnectedOperationsArtifactResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDisconnectedOperationsArmClient(client).GetDisconnectedOperationsArtifactResource(id); + } + + /// + /// Gets a collection of DisconnectedOperationResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DisconnectedOperationResources and their operations over a DisconnectedOperationResource. + public static DisconnectedOperationCollection GetDisconnectedOperations(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDisconnectedOperationsResourceGroupResource(resourceGroupResource).GetDisconnectedOperations(); + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDisconnectedOperationAsync(this ResourceGroupResource resourceGroupResource, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDisconnectedOperationsResourceGroupResource(resourceGroupResource).GetDisconnectedOperationAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDisconnectedOperation(this ResourceGroupResource resourceGroupResource, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDisconnectedOperationsResourceGroupResource(resourceGroupResource).GetDisconnectedOperation(name, cancellationToken); + } + + /// + /// List DisconnectedOperation resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/disconnectedOperations + /// + /// + /// Operation Id + /// DisconnectedOperation_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetDisconnectedOperationsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDisconnectedOperationsSubscriptionResource(subscriptionResource).GetDisconnectedOperationsAsync(cancellationToken); + } + + /// + /// List DisconnectedOperation resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/disconnectedOperations + /// + /// + /// Operation Id + /// DisconnectedOperation_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetDisconnectedOperations(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDisconnectedOperationsSubscriptionResource(subscriptionResource).GetDisconnectedOperations(cancellationToken); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsArmClient.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsArmClient.cs new file mode 100644 index 000000000000..f27954e0178a --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsArmClient.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DisconnectedOperations.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableDisconnectedOperationsArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDisconnectedOperationsArmClient() + { + } + + /// 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 MockableDisconnectedOperationsArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableDisconnectedOperationsArmClient(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. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DisconnectedOperationResource GetDisconnectedOperationResource(ResourceIdentifier id) + { + DisconnectedOperationResource.ValidateResourceId(id); + return new DisconnectedOperationResource(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 DisconnectedOperationsImageResource GetDisconnectedOperationsImageResource(ResourceIdentifier id) + { + DisconnectedOperationsImageResource.ValidateResourceId(id); + return new DisconnectedOperationsImageResource(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 DisconnectedOperationsArtifactResource GetDisconnectedOperationsArtifactResource(ResourceIdentifier id) + { + DisconnectedOperationsArtifactResource.ValidateResourceId(id); + return new DisconnectedOperationsArtifactResource(Client, id); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsResourceGroupResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsResourceGroupResource.cs new file mode 100644 index 000000000000..c8c4cdd29fd9 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.DisconnectedOperations.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableDisconnectedOperationsResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDisconnectedOperationsResourceGroupResource() + { + } + + /// 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 MockableDisconnectedOperationsResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of DisconnectedOperationResources in the ResourceGroupResource. + /// An object representing collection of DisconnectedOperationResources and their operations over a DisconnectedOperationResource. + public virtual DisconnectedOperationCollection GetDisconnectedOperations() + { + return GetCachedClient(client => new DisconnectedOperationCollection(client, Id)); + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDisconnectedOperationAsync(string name, CancellationToken cancellationToken = default) + { + return await GetDisconnectedOperations().GetAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DisconnectedOperation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/disconnectedOperations/{name} + /// + /// + /// Operation Id + /// DisconnectedOperation_Get + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDisconnectedOperation(string name, CancellationToken cancellationToken = default) + { + return GetDisconnectedOperations().Get(name, cancellationToken); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsSubscriptionResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsSubscriptionResource.cs new file mode 100644 index 000000000000..5d5bd4a80c7c --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Extensions/MockableDisconnectedOperationsSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DisconnectedOperations.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableDisconnectedOperationsSubscriptionResource : ArmResource + { + private ClientDiagnostics _disconnectedOperationClientDiagnostics; + private DisconnectedRestOperations _disconnectedOperationRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableDisconnectedOperationsSubscriptionResource() + { + } + + /// 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 MockableDisconnectedOperationsSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics DisconnectedOperationClientDiagnostics => _disconnectedOperationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DisconnectedOperations", DisconnectedOperationResource.ResourceType.Namespace, Diagnostics); + private DisconnectedRestOperations DisconnectedOperationRestClient => _disconnectedOperationRestClient ??= new DisconnectedRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DisconnectedOperationResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List DisconnectedOperation resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/disconnectedOperations + /// + /// + /// Operation Id + /// DisconnectedOperation_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDisconnectedOperationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DisconnectedOperationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DisconnectedOperationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationResource(Client, DisconnectedOperationData.DeserializeDisconnectedOperationData(e)), DisconnectedOperationClientDiagnostics, Pipeline, "MockableDisconnectedOperationsSubscriptionResource.GetDisconnectedOperations", "value", "nextLink", cancellationToken); + } + + /// + /// List DisconnectedOperation resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/disconnectedOperations + /// + /// + /// Operation Id + /// DisconnectedOperation_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDisconnectedOperations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DisconnectedOperationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DisconnectedOperationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DisconnectedOperationResource(Client, DisconnectedOperationData.DeserializeDisconnectedOperationData(e)), DisconnectedOperationClientDiagnostics, Pipeline, "MockableDisconnectedOperationsSubscriptionResource.GetDisconnectedOperations", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Argument.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..748c9dc254ec --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..52caea8f499d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ChangeTrackingList.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..685135143e36 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..bfe130bc09d6 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,409 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal static 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()); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var 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(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + 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"); + } + + public static string GetRequiredString(this JsonElement element) + { + var 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}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Optional.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..cc1e54a3fc18 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..5345b960cbf5 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + 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; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationOperationSource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationOperationSource.cs new file mode 100644 index 000000000000..73bba9743fac --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationOperationSource.cs @@ -0,0 +1,36 @@ +// 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.DisconnectedOperations +{ + internal class DisconnectedOperationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DisconnectedOperationOperationSource(ArmClient client) + { + _client = client; + } + + DisconnectedOperationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDisconnectedOperationsContext.Default); + return new DisconnectedOperationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDisconnectedOperationsContext.Default); + return await Task.FromResult(new DisconnectedOperationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationsArmOperation.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationsArmOperation.cs new file mode 100644 index 000000000000..1c082c415806 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationsArmOperation.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DisconnectedOperations +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DisconnectedOperationsArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DisconnectedOperationsArmOperation for mocking. + protected DisconnectedOperationsArmOperation() + { + } + + internal DisconnectedOperationsArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DisconnectedOperationsArmOperation(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) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DisconnectedOperationsArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerDisconnectedOperationsContext.Default); + using var document = JsonDocument.Parse(data); + var lroDetails = document.RootElement; + return lroDetails.GetProperty("id").GetString(); + } + /// + 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationsArmOperationOfT.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationsArmOperationOfT.cs new file mode 100644 index 000000000000..994be1529d39 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/LongRunningOperation/DisconnectedOperationsArmOperationOfT.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DisconnectedOperations +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DisconnectedOperationsArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DisconnectedOperationsArmOperation for mocking. + protected DisconnectedOperationsArmOperation() + { + } + + internal DisconnectedOperationsArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DisconnectedOperationsArmOperation(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) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DisconnectedOperationsArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerDisconnectedOperationsContext.Default); + using var document = JsonDocument.Parse(data); + var lroDetails = document.RootElement; + return lroDetails.GetProperty("id").GetString(); + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + 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 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ArtifactListResult.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ArtifactListResult.Serialization.cs new file mode 100644 index 000000000000..d9e4819511bc --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ArtifactListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.DisconnectedOperations.Models +{ + internal partial class ArtifactListResult : 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(ArtifactListResult)} 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 + } + } + } + + ArtifactListResult 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(ArtifactListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeArtifactListResult(document.RootElement, options); + } + + internal static ArtifactListResult DeserializeArtifactListResult(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(DisconnectedOperationsArtifactData.DeserializeDisconnectedOperationsArtifactData(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 ArtifactListResult(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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(ArtifactListResult)} does not support writing '{options.Format}' format."); + } + } + + ArtifactListResult 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 DeserializeArtifactListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ArtifactListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ArtifactListResult.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ArtifactListResult.cs new file mode 100644 index 000000000000..88ddf12b8b30 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ArtifactListResult.cs @@ -0,0 +1,80 @@ +// 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.DisconnectedOperations.Models +{ + /// The response of a Artifact list operation. + internal partial class ArtifactListResult + { + /// + /// 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 Artifact items on this page. + /// is null. + internal ArtifactListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Artifact items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ArtifactListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ArtifactListResult() + { + } + + /// The Artifact items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/AzureResourceManagerDisconnectedOperationsContext.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/AzureResourceManagerDisconnectedOperationsContext.cs new file mode 100644 index 000000000000..7a0541adbbbc --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/AzureResourceManagerDisconnectedOperationsContext.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using Azure.ResourceManager.DisconnectedOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + /// + /// 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' + /// + [ModelReaderWriterBuildable(typeof(ArtifactListResult))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationData))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationDeploymentManifest))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationListResult))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationPatch))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationProperties))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationResource))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsArtifactData))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsArtifactDownloadResult))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsArtifactProperties))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsArtifactResource))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsImageData))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsImageDownloadResult))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsImageProperties))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationsImageResource))] + [ModelReaderWriterBuildable(typeof(DisconnectedOperationUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ImageListResult))] + [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(SystemData))] + public partial class AzureResourceManagerDisconnectedOperationsContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationDeploymentManifest.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationDeploymentManifest.Serialization.cs new file mode 100644 index 000000000000..c7ae96e1accb --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationDeploymentManifest.Serialization.cs @@ -0,0 +1,203 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationDeploymentManifest : 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(DisconnectedOperationDeploymentManifest)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W") + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } + if (options.Format != "W") + { + writer.WritePropertyName("stampId"u8); + writer.WriteStringValue(StampId); + } + if (options.Format != "W") + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (options.Format != "W") + { + writer.WritePropertyName("billingModel"u8); + writer.WriteStringValue(BillingModel.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("connectionIntent"u8); + writer.WriteStringValue(ConnectionIntent.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Cloud)) + { + writer.WritePropertyName("cloud"u8); + writer.WriteStringValue(Cloud); + } + 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 + } + } + } + + DisconnectedOperationDeploymentManifest 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(DisconnectedOperationDeploymentManifest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationDeploymentManifest(document.RootElement, options); + } + + internal static DisconnectedOperationDeploymentManifest DeserializeDisconnectedOperationDeploymentManifest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + string resourceName = default; + string stampId = default; + string location = default; + DisconnectedOperationsBillingModel billingModel = default; + DisconnectedOperationsConnectionIntent connectionIntent = default; + string cloud = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("stampId"u8)) + { + stampId = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("billingModel"u8)) + { + billingModel = new DisconnectedOperationsBillingModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectionIntent"u8)) + { + connectionIntent = new DisconnectedOperationsConnectionIntent(property.Value.GetString()); + continue; + } + if (property.NameEquals("cloud"u8)) + { + cloud = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationDeploymentManifest( + resourceId, + resourceName, + stampId, + location, + billingModel, + connectionIntent, + cloud, + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationDeploymentManifest)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationDeploymentManifest 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 DeserializeDisconnectedOperationDeploymentManifest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationDeploymentManifest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationDeploymentManifest.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationDeploymentManifest.cs new file mode 100644 index 000000000000..4daa6c441cb7 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationDeploymentManifest.cs @@ -0,0 +1,107 @@ +// 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.DisconnectedOperations.Models +{ + /// The disconnected operation manifest. + public partial class DisconnectedOperationDeploymentManifest + { + /// + /// 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 resource identifier of the disconnected operations resource. + /// The resource name. + /// The unique GUID of the stamp. + /// The resource location. + /// The billing model. + /// The connection intent. + internal DisconnectedOperationDeploymentManifest(ResourceIdentifier resourceId, string resourceName, string stampId, string location, DisconnectedOperationsBillingModel billingModel, DisconnectedOperationsConnectionIntent connectionIntent) + { + ResourceId = resourceId; + ResourceName = resourceName; + StampId = stampId; + Location = location; + BillingModel = billingModel; + ConnectionIntent = connectionIntent; + } + + /// Initializes a new instance of . + /// The resource identifier of the disconnected operations resource. + /// The resource name. + /// The unique GUID of the stamp. + /// The resource location. + /// The billing model. + /// The connection intent. + /// The cloud in which the resource is registered. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationDeploymentManifest(ResourceIdentifier resourceId, string resourceName, string stampId, string location, DisconnectedOperationsBillingModel billingModel, DisconnectedOperationsConnectionIntent connectionIntent, string cloud, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + ResourceName = resourceName; + StampId = stampId; + Location = location; + BillingModel = billingModel; + ConnectionIntent = connectionIntent; + Cloud = cloud; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationDeploymentManifest() + { + } + + /// The resource identifier of the disconnected operations resource. + public ResourceIdentifier ResourceId { get; } + /// The resource name. + public string ResourceName { get; } + /// The unique GUID of the stamp. + public string StampId { get; } + /// The resource location. + public string Location { get; } + /// The billing model. + public DisconnectedOperationsBillingModel BillingModel { get; } + /// The connection intent. + public DisconnectedOperationsConnectionIntent ConnectionIntent { get; } + /// The cloud in which the resource is registered. + public string Cloud { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationListResult.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationListResult.Serialization.cs new file mode 100644 index 000000000000..931cdbe563ca --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.DisconnectedOperations.Models +{ + internal partial class DisconnectedOperationListResult : 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(DisconnectedOperationListResult)} 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 + } + } + } + + DisconnectedOperationListResult 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(DisconnectedOperationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationListResult(document.RootElement, options); + } + + internal static DisconnectedOperationListResult DeserializeDisconnectedOperationListResult(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(DisconnectedOperationData.DeserializeDisconnectedOperationData(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 DisconnectedOperationListResult(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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationListResult)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationListResult 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 DeserializeDisconnectedOperationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationListResult.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationListResult.cs new file mode 100644 index 000000000000..207d63704ef3 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationListResult.cs @@ -0,0 +1,80 @@ +// 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.DisconnectedOperations.Models +{ + /// The response of a DisconnectedOperation list operation. + internal partial class DisconnectedOperationListResult + { + /// + /// 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 DisconnectedOperation items on this page. + /// is null. + internal DisconnectedOperationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DisconnectedOperation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationListResult() + { + } + + /// The DisconnectedOperation items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationPatch.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationPatch.Serialization.cs new file mode 100644 index 000000000000..7f69f1e43faa --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationPatch : 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(DisconnectedOperationPatch)} does not support writing '{format}' format."); + } + + 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 (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + DisconnectedOperationPatch 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(DisconnectedOperationPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationPatch(document.RootElement, options); + } + + internal static DisconnectedOperationPatch DeserializeDisconnectedOperationPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + DisconnectedOperationUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DisconnectedOperationUpdateProperties.DeserializeDisconnectedOperationUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationPatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationPatch)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationPatch 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 DeserializeDisconnectedOperationPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationPatch.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationPatch.cs new file mode 100644 index 000000000000..ffbeb4a8dcbf --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The type used for update operations of the DisconnectedOperation. + public partial class DisconnectedOperationPatch + { + /// + /// 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 DisconnectedOperationPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationPatch(IDictionary tags, DisconnectedOperationUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public DisconnectedOperationUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationProperties.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationProperties.Serialization.cs new file mode 100644 index 000000000000..9226eeb47870 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationProperties.Serialization.cs @@ -0,0 +1,212 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationProperties : 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(DisconnectedOperationProperties)} 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") + { + writer.WritePropertyName("stampId"u8); + writer.WriteStringValue(StampId); + } + if (options.Format != "W") + { + writer.WritePropertyName("billingModel"u8); + writer.WriteStringValue(BillingModel.ToString()); + } + writer.WritePropertyName("connectionIntent"u8); + writer.WriteStringValue(ConnectionIntent.ToString()); + if (options.Format != "W" && Optional.IsDefined(ConnectionStatus)) + { + writer.WritePropertyName("connectionStatus"u8); + writer.WriteStringValue(ConnectionStatus.Value.ToString()); + } + if (Optional.IsDefined(RegistrationStatus)) + { + writer.WritePropertyName("registrationStatus"u8); + writer.WriteStringValue(RegistrationStatus.Value.ToString()); + } + if (Optional.IsDefined(DeviceVersion)) + { + writer.WritePropertyName("deviceVersion"u8); + writer.WriteStringValue(DeviceVersion); + } + 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 + } + } + } + + DisconnectedOperationProperties 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(DisconnectedOperationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationProperties(document.RootElement, options); + } + + internal static DisconnectedOperationProperties DeserializeDisconnectedOperationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsResourceProvisioningState? provisioningState = default; + string stampId = default; + DisconnectedOperationsBillingModel billingModel = default; + DisconnectedOperationsConnectionIntent connectionIntent = default; + DisconnectedOperationsConnectionStatus? connectionStatus = default; + DisconnectedOperationsRegistrationStatus? registrationStatus = default; + string deviceVersion = 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 DisconnectedOperationsResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stampId"u8)) + { + stampId = property.Value.GetString(); + continue; + } + if (property.NameEquals("billingModel"u8)) + { + billingModel = new DisconnectedOperationsBillingModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectionIntent"u8)) + { + connectionIntent = new DisconnectedOperationsConnectionIntent(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStatus = new DisconnectedOperationsConnectionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("registrationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + registrationStatus = new DisconnectedOperationsRegistrationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("deviceVersion"u8)) + { + deviceVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationProperties( + provisioningState, + stampId, + billingModel, + connectionIntent, + connectionStatus, + registrationStatus, + deviceVersion, + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationProperties)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationProperties 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 DeserializeDisconnectedOperationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationProperties.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationProperties.cs new file mode 100644 index 000000000000..9cc3ae558eaa --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationProperties.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The disconnected operation properties. + public partial class DisconnectedOperationProperties + { + /// + /// 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 unique GUID of the stamp. + /// The billing model. + /// The connection intent. + public DisconnectedOperationProperties(string stampId, DisconnectedOperationsBillingModel billingModel, DisconnectedOperationsConnectionIntent connectionIntent) + { + StampId = stampId; + BillingModel = billingModel; + ConnectionIntent = connectionIntent; + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The unique GUID of the stamp. + /// The billing model. + /// The connection intent. + /// The connection status. + /// The registration intent. + /// The device version. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationProperties(DisconnectedOperationsResourceProvisioningState? provisioningState, string stampId, DisconnectedOperationsBillingModel billingModel, DisconnectedOperationsConnectionIntent connectionIntent, DisconnectedOperationsConnectionStatus? connectionStatus, DisconnectedOperationsRegistrationStatus? registrationStatus, string deviceVersion, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + StampId = stampId; + BillingModel = billingModel; + ConnectionIntent = connectionIntent; + ConnectionStatus = connectionStatus; + RegistrationStatus = registrationStatus; + DeviceVersion = deviceVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationProperties() + { + } + + /// The resource provisioning state. + public DisconnectedOperationsResourceProvisioningState? ProvisioningState { get; } + /// The unique GUID of the stamp. + public string StampId { get; } + /// The billing model. + public DisconnectedOperationsBillingModel BillingModel { get; } + /// The connection intent. + public DisconnectedOperationsConnectionIntent ConnectionIntent { get; set; } + /// The connection status. + public DisconnectedOperationsConnectionStatus? ConnectionStatus { get; } + /// The registration intent. + public DisconnectedOperationsRegistrationStatus? RegistrationStatus { get; set; } + /// The device version. + public string DeviceVersion { get; set; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationUpdateProperties.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..4e93d4918822 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationUpdateProperties.Serialization.cs @@ -0,0 +1,159 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationUpdateProperties : 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(DisconnectedOperationUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConnectionIntent)) + { + writer.WritePropertyName("connectionIntent"u8); + writer.WriteStringValue(ConnectionIntent.Value.ToString()); + } + if (Optional.IsDefined(RegistrationStatus)) + { + writer.WritePropertyName("registrationStatus"u8); + writer.WriteStringValue(RegistrationStatus.Value.ToString()); + } + if (Optional.IsDefined(DeviceVersion)) + { + writer.WritePropertyName("deviceVersion"u8); + writer.WriteStringValue(DeviceVersion); + } + 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 + } + } + } + + DisconnectedOperationUpdateProperties 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(DisconnectedOperationUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationUpdateProperties(document.RootElement, options); + } + + internal static DisconnectedOperationUpdateProperties DeserializeDisconnectedOperationUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsConnectionIntent? connectionIntent = default; + DisconnectedOperationsRegistrationStatus? registrationStatus = default; + string deviceVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectionIntent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionIntent = new DisconnectedOperationsConnectionIntent(property.Value.GetString()); + continue; + } + if (property.NameEquals("registrationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + registrationStatus = new DisconnectedOperationsRegistrationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("deviceVersion"u8)) + { + deviceVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationUpdateProperties(connectionIntent, registrationStatus, deviceVersion, 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationUpdateProperties 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 DeserializeDisconnectedOperationUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationUpdateProperties.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationUpdateProperties.cs new file mode 100644 index 000000000000..ec4413dd61d2 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationUpdateProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The updatable properties of the DisconnectedOperation. + public partial class DisconnectedOperationUpdateProperties + { + /// + /// 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 DisconnectedOperationUpdateProperties() + { + } + + /// Initializes a new instance of . + /// The connection intent. + /// The registration intent. + /// The device version. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationUpdateProperties(DisconnectedOperationsConnectionIntent? connectionIntent, DisconnectedOperationsRegistrationStatus? registrationStatus, string deviceVersion, IDictionary serializedAdditionalRawData) + { + ConnectionIntent = connectionIntent; + RegistrationStatus = registrationStatus; + DeviceVersion = deviceVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The connection intent. + public DisconnectedOperationsConnectionIntent? ConnectionIntent { get; set; } + /// The registration intent. + public DisconnectedOperationsRegistrationStatus? RegistrationStatus { get; set; } + /// The device version. + public string DeviceVersion { get; set; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactDownloadResult.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactDownloadResult.Serialization.cs new file mode 100644 index 000000000000..c663751b7fe1 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactDownloadResult.Serialization.cs @@ -0,0 +1,211 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationsArtifactDownloadResult : 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(DisconnectedOperationsArtifactDownloadResult)} 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") + { + writer.WritePropertyName("artifactOrder"u8); + writer.WriteNumberValue(ArtifactOrder); + } + if (options.Format != "W") + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (options.Format != "W") + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.Value); + } + if (options.Format != "W") + { + writer.WritePropertyName("downloadLink"u8); + writer.WriteStringValue(DownloadLink.AbsoluteUri); + } + if (options.Format != "W") + { + writer.WritePropertyName("linkExpiry"u8); + writer.WriteStringValue(LinkExpiry, "O"); + } + 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 + } + } + } + + DisconnectedOperationsArtifactDownloadResult 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(DisconnectedOperationsArtifactDownloadResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationsArtifactDownloadResult(document.RootElement, options); + } + + internal static DisconnectedOperationsArtifactDownloadResult DeserializeDisconnectedOperationsArtifactDownloadResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsResourceProvisioningState? provisioningState = default; + int artifactOrder = default; + string title = default; + string description = default; + long? size = default; + Uri downloadLink = default; + DateTimeOffset linkExpiry = 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 DisconnectedOperationsResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("artifactOrder"u8)) + { + artifactOrder = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("downloadLink"u8)) + { + downloadLink = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("linkExpiry"u8)) + { + linkExpiry = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationsArtifactDownloadResult( + provisioningState, + artifactOrder, + title, + description, + size, + downloadLink, + linkExpiry, + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsArtifactDownloadResult)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationsArtifactDownloadResult 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 DeserializeDisconnectedOperationsArtifactDownloadResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsArtifactDownloadResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactDownloadResult.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactDownloadResult.cs new file mode 100644 index 000000000000..275cd32cc5fa --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactDownloadResult.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The artifact download properties. + public partial class DisconnectedOperationsArtifactDownloadResult + { + /// + /// 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 artifact display order. + /// The artifact title. + /// The artifact description. + /// The download URI. + /// The download link expiry time. + internal DisconnectedOperationsArtifactDownloadResult(int artifactOrder, string title, string description, Uri downloadLink, DateTimeOffset linkExpiry) + { + ArtifactOrder = artifactOrder; + Title = title; + Description = description; + DownloadLink = downloadLink; + LinkExpiry = linkExpiry; + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The artifact display order. + /// The artifact title. + /// The artifact description. + /// The artifact size in MB. + /// The download URI. + /// The download link expiry time. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationsArtifactDownloadResult(DisconnectedOperationsResourceProvisioningState? provisioningState, int artifactOrder, string title, string description, long? size, Uri downloadLink, DateTimeOffset linkExpiry, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ArtifactOrder = artifactOrder; + Title = title; + Description = description; + Size = size; + DownloadLink = downloadLink; + LinkExpiry = linkExpiry; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationsArtifactDownloadResult() + { + } + + /// The resource provisioning state. + public DisconnectedOperationsResourceProvisioningState? ProvisioningState { get; } + /// The artifact display order. + public int ArtifactOrder { get; } + /// The artifact title. + public string Title { get; } + /// The artifact description. + public string Description { get; } + /// The artifact size in MB. + public long? Size { get; } + /// The download URI. + public Uri DownloadLink { get; } + /// The download link expiry time. + public DateTimeOffset LinkExpiry { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactProperties.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactProperties.Serialization.cs new file mode 100644 index 000000000000..d717e337a530 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactProperties.Serialization.cs @@ -0,0 +1,187 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationsArtifactProperties : 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(DisconnectedOperationsArtifactProperties)} 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") + { + writer.WritePropertyName("artifactOrder"u8); + writer.WriteNumberValue(ArtifactOrder); + } + if (options.Format != "W") + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (options.Format != "W") + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.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 + } + } + } + + DisconnectedOperationsArtifactProperties 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(DisconnectedOperationsArtifactProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationsArtifactProperties(document.RootElement, options); + } + + internal static DisconnectedOperationsArtifactProperties DeserializeDisconnectedOperationsArtifactProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsResourceProvisioningState? provisioningState = default; + int artifactOrder = default; + string title = default; + string description = default; + long? size = 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 DisconnectedOperationsResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("artifactOrder"u8)) + { + artifactOrder = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationsArtifactProperties( + provisioningState, + artifactOrder, + title, + description, + size, + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsArtifactProperties)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationsArtifactProperties 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 DeserializeDisconnectedOperationsArtifactProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsArtifactProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactProperties.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactProperties.cs new file mode 100644 index 000000000000..1af0f60def26 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsArtifactProperties.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The artifact properties. + public partial class DisconnectedOperationsArtifactProperties + { + /// + /// 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 artifact display order. + /// The artifact title. + /// The artifact description. + internal DisconnectedOperationsArtifactProperties(int artifactOrder, string title, string description) + { + ArtifactOrder = artifactOrder; + Title = title; + Description = description; + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The artifact display order. + /// The artifact title. + /// The artifact description. + /// The artifact size in MB. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationsArtifactProperties(DisconnectedOperationsResourceProvisioningState? provisioningState, int artifactOrder, string title, string description, long? size, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ArtifactOrder = artifactOrder; + Title = title; + Description = description; + Size = size; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationsArtifactProperties() + { + } + + /// The resource provisioning state. + public DisconnectedOperationsResourceProvisioningState? ProvisioningState { get; } + /// The artifact display order. + public int ArtifactOrder { get; } + /// The artifact title. + public string Title { get; } + /// The artifact description. + public string Description { get; } + /// The artifact size in MB. + public long? Size { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsBillingModel.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsBillingModel.cs new file mode 100644 index 000000000000..b2ece9d05944 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsBillingModel.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// Billing model. + public readonly partial struct DisconnectedOperationsBillingModel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisconnectedOperationsBillingModel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CapacityValue = "Capacity"; + + /// Billed on capacity. + public static DisconnectedOperationsBillingModel Capacity { get; } = new DisconnectedOperationsBillingModel(CapacityValue); + /// Determines if two values are the same. + public static bool operator ==(DisconnectedOperationsBillingModel left, DisconnectedOperationsBillingModel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisconnectedOperationsBillingModel left, DisconnectedOperationsBillingModel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisconnectedOperationsBillingModel(string value) => new DisconnectedOperationsBillingModel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisconnectedOperationsBillingModel other && Equals(other); + /// + public bool Equals(DisconnectedOperationsBillingModel 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsConnectionIntent.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsConnectionIntent.cs new file mode 100644 index 000000000000..465100890acd --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsConnectionIntent.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.DisconnectedOperations.Models +{ + /// Connection Intent. + public readonly partial struct DisconnectedOperationsConnectionIntent : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisconnectedOperationsConnectionIntent(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConnectedValue = "Connected"; + private const string DisconnectedValue = "Disconnected"; + + /// Device is connected to cloud. + public static DisconnectedOperationsConnectionIntent Connected { get; } = new DisconnectedOperationsConnectionIntent(ConnectedValue); + /// Device is disconnected from cloud. + public static DisconnectedOperationsConnectionIntent Disconnected { get; } = new DisconnectedOperationsConnectionIntent(DisconnectedValue); + /// Determines if two values are the same. + public static bool operator ==(DisconnectedOperationsConnectionIntent left, DisconnectedOperationsConnectionIntent right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisconnectedOperationsConnectionIntent left, DisconnectedOperationsConnectionIntent right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisconnectedOperationsConnectionIntent(string value) => new DisconnectedOperationsConnectionIntent(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisconnectedOperationsConnectionIntent other && Equals(other); + /// + public bool Equals(DisconnectedOperationsConnectionIntent 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsConnectionStatus.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsConnectionStatus.cs new file mode 100644 index 000000000000..9fa2258d193d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsConnectionStatus.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.DisconnectedOperations.Models +{ + /// Connection status. + public readonly partial struct DisconnectedOperationsConnectionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisconnectedOperationsConnectionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConnectedValue = "Connected"; + private const string DisconnectedValue = "Disconnected"; + + /// Device is connected to cloud. + public static DisconnectedOperationsConnectionStatus Connected { get; } = new DisconnectedOperationsConnectionStatus(ConnectedValue); + /// Device is disconnected from cloud. + public static DisconnectedOperationsConnectionStatus Disconnected { get; } = new DisconnectedOperationsConnectionStatus(DisconnectedValue); + /// Determines if two values are the same. + public static bool operator ==(DisconnectedOperationsConnectionStatus left, DisconnectedOperationsConnectionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisconnectedOperationsConnectionStatus left, DisconnectedOperationsConnectionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisconnectedOperationsConnectionStatus(string value) => new DisconnectedOperationsConnectionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisconnectedOperationsConnectionStatus other && Equals(other); + /// + public bool Equals(DisconnectedOperationsConnectionStatus 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageDownloadResult.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageDownloadResult.Serialization.cs new file mode 100644 index 000000000000..789e4afea141 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageDownloadResult.Serialization.cs @@ -0,0 +1,257 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationsImageDownloadResult : 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(DisconnectedOperationsImageDownloadResult)} 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") + { + writer.WritePropertyName("releaseVersion"u8); + writer.WriteStringValue(ReleaseVersion); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseDisplayName"u8); + writer.WriteStringValue(ReleaseDisplayName); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseNotes"u8); + writer.WriteStringValue(ReleaseNotes); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseDate"u8); + writer.WriteStringValue(ReleaseOn, "D"); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseType"u8); + writer.WriteStringValue(ReleaseType.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(CompatibleVersions)) + { + writer.WritePropertyName("compatibleVersions"u8); + writer.WriteStartArray(); + foreach (var item in CompatibleVersions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W") + { + writer.WritePropertyName("transactionId"u8); + writer.WriteStringValue(TransactionId); + } + if (options.Format != "W") + { + writer.WritePropertyName("downloadLink"u8); + writer.WriteStringValue(DownloadLink.AbsoluteUri); + } + if (options.Format != "W") + { + writer.WritePropertyName("linkExpiry"u8); + writer.WriteStringValue(LinkExpiry, "O"); + } + 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 + } + } + } + + DisconnectedOperationsImageDownloadResult 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(DisconnectedOperationsImageDownloadResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationsImageDownloadResult(document.RootElement, options); + } + + internal static DisconnectedOperationsImageDownloadResult DeserializeDisconnectedOperationsImageDownloadResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsResourceProvisioningState? provisioningState = default; + string releaseVersion = default; + string releaseDisplayName = default; + string releaseNotes = default; + DateTimeOffset releaseDate = default; + DisconnectedOperationsReleaseType releaseType = default; + IReadOnlyList compatibleVersions = default; + string transactionId = default; + Uri downloadLink = default; + DateTimeOffset linkExpiry = 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 DisconnectedOperationsResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("releaseVersion"u8)) + { + releaseVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("releaseDisplayName"u8)) + { + releaseDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("releaseNotes"u8)) + { + releaseNotes = property.Value.GetString(); + continue; + } + if (property.NameEquals("releaseDate"u8)) + { + releaseDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("releaseType"u8)) + { + releaseType = new DisconnectedOperationsReleaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("compatibleVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + compatibleVersions = array; + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("downloadLink"u8)) + { + downloadLink = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("linkExpiry"u8)) + { + linkExpiry = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationsImageDownloadResult( + provisioningState, + releaseVersion, + releaseDisplayName, + releaseNotes, + releaseDate, + releaseType, + compatibleVersions ?? new ChangeTrackingList(), + transactionId, + downloadLink, + linkExpiry, + 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsImageDownloadResult)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationsImageDownloadResult 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 DeserializeDisconnectedOperationsImageDownloadResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsImageDownloadResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageDownloadResult.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageDownloadResult.cs new file mode 100644 index 000000000000..f12c782dbcb1 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageDownloadResult.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The image download properties. + public partial class DisconnectedOperationsImageDownloadResult + { + /// + /// 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 version of the package in the format 1.1.1. + /// The release name. + /// The release notes. + /// The release date. + /// The release type. + /// The unique identifier of the download. + /// The download URI. + /// The download link expiry time. + internal DisconnectedOperationsImageDownloadResult(string releaseVersion, string releaseDisplayName, string releaseNotes, DateTimeOffset releaseOn, DisconnectedOperationsReleaseType releaseType, string transactionId, Uri downloadLink, DateTimeOffset linkExpiry) + { + ReleaseVersion = releaseVersion; + ReleaseDisplayName = releaseDisplayName; + ReleaseNotes = releaseNotes; + ReleaseOn = releaseOn; + ReleaseType = releaseType; + CompatibleVersions = new ChangeTrackingList(); + TransactionId = transactionId; + DownloadLink = downloadLink; + LinkExpiry = linkExpiry; + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The version of the package in the format 1.1.1. + /// The release name. + /// The release notes. + /// The release date. + /// The release type. + /// The versions that are compatible for this update package. + /// The unique identifier of the download. + /// The download URI. + /// The download link expiry time. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationsImageDownloadResult(DisconnectedOperationsResourceProvisioningState? provisioningState, string releaseVersion, string releaseDisplayName, string releaseNotes, DateTimeOffset releaseOn, DisconnectedOperationsReleaseType releaseType, IReadOnlyList compatibleVersions, string transactionId, Uri downloadLink, DateTimeOffset linkExpiry, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ReleaseVersion = releaseVersion; + ReleaseDisplayName = releaseDisplayName; + ReleaseNotes = releaseNotes; + ReleaseOn = releaseOn; + ReleaseType = releaseType; + CompatibleVersions = compatibleVersions; + TransactionId = transactionId; + DownloadLink = downloadLink; + LinkExpiry = linkExpiry; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationsImageDownloadResult() + { + } + + /// The resource provisioning state. + public DisconnectedOperationsResourceProvisioningState? ProvisioningState { get; } + /// The version of the package in the format 1.1.1. + public string ReleaseVersion { get; } + /// The release name. + public string ReleaseDisplayName { get; } + /// The release notes. + public string ReleaseNotes { get; } + /// The release date. + public DateTimeOffset ReleaseOn { get; } + /// The release type. + public DisconnectedOperationsReleaseType ReleaseType { get; } + /// The versions that are compatible for this update package. + public IReadOnlyList CompatibleVersions { get; } + /// The unique identifier of the download. + public string TransactionId { get; } + /// The download URI. + public Uri DownloadLink { get; } + /// The download link expiry time. + public DateTimeOffset LinkExpiry { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageProperties.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageProperties.Serialization.cs new file mode 100644 index 000000000000..32bac2a98e12 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageProperties.Serialization.cs @@ -0,0 +1,221 @@ +// 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.DisconnectedOperations.Models +{ + public partial class DisconnectedOperationsImageProperties : 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(DisconnectedOperationsImageProperties)} 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") + { + writer.WritePropertyName("releaseVersion"u8); + writer.WriteStringValue(ReleaseVersion); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseDisplayName"u8); + writer.WriteStringValue(ReleaseDisplayName); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseNotes"u8); + writer.WriteStringValue(ReleaseNotes); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseDate"u8); + writer.WriteStringValue(ReleaseOn, "D"); + } + if (options.Format != "W") + { + writer.WritePropertyName("releaseType"u8); + writer.WriteStringValue(ReleaseType.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(CompatibleVersions)) + { + writer.WritePropertyName("compatibleVersions"u8); + writer.WriteStartArray(); + foreach (var item in CompatibleVersions) + { + writer.WriteStringValue(item); + } + 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 + } + } + } + + DisconnectedOperationsImageProperties 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(DisconnectedOperationsImageProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisconnectedOperationsImageProperties(document.RootElement, options); + } + + internal static DisconnectedOperationsImageProperties DeserializeDisconnectedOperationsImageProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisconnectedOperationsResourceProvisioningState? provisioningState = default; + string releaseVersion = default; + string releaseDisplayName = default; + string releaseNotes = default; + DateTimeOffset releaseDate = default; + DisconnectedOperationsReleaseType releaseType = default; + IReadOnlyList compatibleVersions = 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 DisconnectedOperationsResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("releaseVersion"u8)) + { + releaseVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("releaseDisplayName"u8)) + { + releaseDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("releaseNotes"u8)) + { + releaseNotes = property.Value.GetString(); + continue; + } + if (property.NameEquals("releaseDate"u8)) + { + releaseDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("releaseType"u8)) + { + releaseType = new DisconnectedOperationsReleaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("compatibleVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + compatibleVersions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisconnectedOperationsImageProperties( + provisioningState, + releaseVersion, + releaseDisplayName, + releaseNotes, + releaseDate, + releaseType, + compatibleVersions ?? 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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsImageProperties)} does not support writing '{options.Format}' format."); + } + } + + DisconnectedOperationsImageProperties 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 DeserializeDisconnectedOperationsImageProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisconnectedOperationsImageProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageProperties.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageProperties.cs new file mode 100644 index 000000000000..9129dbf3f245 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsImageProperties.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The image properties. + public partial class DisconnectedOperationsImageProperties + { + /// + /// 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 version of the package in the format 1.1.1. + /// The release name. + /// The release notes. + /// The release date. + /// The release type. + internal DisconnectedOperationsImageProperties(string releaseVersion, string releaseDisplayName, string releaseNotes, DateTimeOffset releaseOn, DisconnectedOperationsReleaseType releaseType) + { + ReleaseVersion = releaseVersion; + ReleaseDisplayName = releaseDisplayName; + ReleaseNotes = releaseNotes; + ReleaseOn = releaseOn; + ReleaseType = releaseType; + CompatibleVersions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The resource provisioning state. + /// The version of the package in the format 1.1.1. + /// The release name. + /// The release notes. + /// The release date. + /// The release type. + /// The versions that are compatible for this update package. + /// Keeps track of any properties unknown to the library. + internal DisconnectedOperationsImageProperties(DisconnectedOperationsResourceProvisioningState? provisioningState, string releaseVersion, string releaseDisplayName, string releaseNotes, DateTimeOffset releaseOn, DisconnectedOperationsReleaseType releaseType, IReadOnlyList compatibleVersions, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ReleaseVersion = releaseVersion; + ReleaseDisplayName = releaseDisplayName; + ReleaseNotes = releaseNotes; + ReleaseOn = releaseOn; + ReleaseType = releaseType; + CompatibleVersions = compatibleVersions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DisconnectedOperationsImageProperties() + { + } + + /// The resource provisioning state. + public DisconnectedOperationsResourceProvisioningState? ProvisioningState { get; } + /// The version of the package in the format 1.1.1. + public string ReleaseVersion { get; } + /// The release name. + public string ReleaseDisplayName { get; } + /// The release notes. + public string ReleaseNotes { get; } + /// The release date. + public DateTimeOffset ReleaseOn { get; } + /// The release type. + public DisconnectedOperationsReleaseType ReleaseType { get; } + /// The versions that are compatible for this update package. + public IReadOnlyList CompatibleVersions { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsRegistrationStatus.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsRegistrationStatus.cs new file mode 100644 index 000000000000..9e27c8e9c95c --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsRegistrationStatus.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.DisconnectedOperations.Models +{ + /// Registration status. + public readonly partial struct DisconnectedOperationsRegistrationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisconnectedOperationsRegistrationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegisteredValue = "Registered"; + private const string UnregisteredValue = "Unregistered"; + + /// Device is registered to cloud. + public static DisconnectedOperationsRegistrationStatus Registered { get; } = new DisconnectedOperationsRegistrationStatus(RegisteredValue); + /// Device is not registered to cloud. + public static DisconnectedOperationsRegistrationStatus Unregistered { get; } = new DisconnectedOperationsRegistrationStatus(UnregisteredValue); + /// Determines if two values are the same. + public static bool operator ==(DisconnectedOperationsRegistrationStatus left, DisconnectedOperationsRegistrationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisconnectedOperationsRegistrationStatus left, DisconnectedOperationsRegistrationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisconnectedOperationsRegistrationStatus(string value) => new DisconnectedOperationsRegistrationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisconnectedOperationsRegistrationStatus other && Equals(other); + /// + public bool Equals(DisconnectedOperationsRegistrationStatus 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsReleaseType.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsReleaseType.cs new file mode 100644 index 000000000000..35ed404f5820 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsReleaseType.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.DisconnectedOperations.Models +{ + /// Release Type. + public readonly partial struct DisconnectedOperationsReleaseType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisconnectedOperationsReleaseType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InstallValue = "Install"; + private const string UpdateValue = "Update"; + + /// Release is a new install. + public static DisconnectedOperationsReleaseType Install { get; } = new DisconnectedOperationsReleaseType(InstallValue); + /// Release is update. + public static DisconnectedOperationsReleaseType Update { get; } = new DisconnectedOperationsReleaseType(UpdateValue); + /// Determines if two values are the same. + public static bool operator ==(DisconnectedOperationsReleaseType left, DisconnectedOperationsReleaseType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisconnectedOperationsReleaseType left, DisconnectedOperationsReleaseType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisconnectedOperationsReleaseType(string value) => new DisconnectedOperationsReleaseType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisconnectedOperationsReleaseType other && Equals(other); + /// + public bool Equals(DisconnectedOperationsReleaseType 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsResourceProvisioningState.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsResourceProvisioningState.cs new file mode 100644 index 000000000000..0dc29a3de03d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/DisconnectedOperationsResourceProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DisconnectedOperations.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct DisconnectedOperationsResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisconnectedOperationsResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static DisconnectedOperationsResourceProvisioningState Succeeded { get; } = new DisconnectedOperationsResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static DisconnectedOperationsResourceProvisioningState Failed { get; } = new DisconnectedOperationsResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static DisconnectedOperationsResourceProvisioningState Canceled { get; } = new DisconnectedOperationsResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(DisconnectedOperationsResourceProvisioningState left, DisconnectedOperationsResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisconnectedOperationsResourceProvisioningState left, DisconnectedOperationsResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisconnectedOperationsResourceProvisioningState(string value) => new DisconnectedOperationsResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisconnectedOperationsResourceProvisioningState other && Equals(other); + /// + public bool Equals(DisconnectedOperationsResourceProvisioningState 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/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ImageListResult.Serialization.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ImageListResult.Serialization.cs new file mode 100644 index 000000000000..c9fd538b4447 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ImageListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.DisconnectedOperations.Models +{ + internal partial class ImageListResult : 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(ImageListResult)} 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 + } + } + } + + ImageListResult 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(ImageListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageListResult(document.RootElement, options); + } + + internal static ImageListResult DeserializeImageListResult(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(DisconnectedOperationsImageData.DeserializeDisconnectedOperationsImageData(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 ImageListResult(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, AzureResourceManagerDisconnectedOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(ImageListResult)} does not support writing '{options.Format}' format."); + } + } + + ImageListResult 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 DeserializeImageListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ImageListResult.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ImageListResult.cs new file mode 100644 index 000000000000..948cfca8edf4 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/Models/ImageListResult.cs @@ -0,0 +1,80 @@ +// 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.DisconnectedOperations.Models +{ + /// The response of a Image list operation. + internal partial class ImageListResult + { + /// + /// 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 Image items on this page. + /// is null. + internal ImageListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Image items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ImageListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImageListResult() + { + } + + /// The Image items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/ProviderConstants.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..7e52e479bc84 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/ArtifactsRestOperations.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/ArtifactsRestOperations.cs new file mode 100644 index 000000000000..b9b3f8a1fe4c --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/ArtifactsRestOperations.cs @@ -0,0 +1,451 @@ +// 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.DisconnectedOperations.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal partial class ArtifactsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ArtifactsRestOperations. + /// 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 ArtifactsRestOperations(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-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/artifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/artifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by parent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, name, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ArtifactListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ArtifactListResult.DeserializeArtifactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by parent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, name, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ArtifactListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ArtifactListResult.DeserializeArtifactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/artifacts/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/artifacts/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The name of the Artifact. + /// 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 name, string imageName, string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, imageName, artifactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsArtifactData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationsArtifactData.DeserializeDisconnectedOperationsArtifactData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DisconnectedOperationsArtifactData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The name of the Artifact. + /// 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 name, string imageName, string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, imageName, artifactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsArtifactData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationsArtifactData.DeserializeDisconnectedOperationsArtifactData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DisconnectedOperationsArtifactData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListDownloadUriRequestUri(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/artifacts/", false); + uri.AppendPath(artifactName, true); + uri.AppendPath("/listDownloadUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListDownloadUriRequest(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/artifacts/", false); + uri.AppendPath(artifactName, true); + uri.AppendPath("/listDownloadUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get artifact download link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The name of the Artifact. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListDownloadUriAsync(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var message = CreateListDownloadUriRequest(subscriptionId, resourceGroupName, name, imageName, artifactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsArtifactDownloadResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationsArtifactDownloadResult.DeserializeDisconnectedOperationsArtifactDownloadResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get artifact download link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The name of the Artifact. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListDownloadUri(string subscriptionId, string resourceGroupName, string name, string imageName, string artifactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + Argument.AssertNotNullOrEmpty(artifactName, nameof(artifactName)); + + using var message = CreateListDownloadUriRequest(subscriptionId, resourceGroupName, name, imageName, artifactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsArtifactDownloadResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationsArtifactDownloadResult.DeserializeDisconnectedOperationsArtifactDownloadResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string imageName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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 by parent. + /// 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. + /// Name of the resource. + /// The name of the Image. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ArtifactListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ArtifactListResult.DeserializeArtifactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by parent. + /// 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. + /// Name of the resource. + /// The name of the Image. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ArtifactListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ArtifactListResult.DeserializeArtifactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/DisconnectedRestOperations.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/DisconnectedRestOperations.cs new file mode 100644 index 000000000000..6df7233c3c25 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/DisconnectedRestOperations.cs @@ -0,0 +1,824 @@ +// 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.DisconnectedOperations.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal partial class DisconnectedRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DisconnectedRestOperations. + /// 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 DisconnectedRestOperations(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-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationData.DeserializeDisconnectedOperationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DisconnectedOperationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationData.DeserializeDisconnectedOperationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DisconnectedOperationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string name, DisconnectedOperationData 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string name, DisconnectedOperationData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, 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; + } + + /// Create a DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, DisconnectedOperationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, name, 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 DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, DisconnectedOperationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, name, 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 name, DisconnectedOperationPatch 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string name, DisconnectedOperationPatch 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, 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; + } + + /// Update a DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, DisconnectedOperationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, name, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationData.DeserializeDisconnectedOperationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, DisconnectedOperationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, name, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationData.DeserializeDisconnectedOperationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string name) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, name); + 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 DisconnectedOperation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the 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 name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, name); + _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.Edge/disconnectedOperations", 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.Edge/disconnectedOperations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DisconnectedOperation 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) + { + 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: + { + DisconnectedOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(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.Edge/disconnectedOperations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/disconnectedOperations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListDeploymentManifestRequestUri(string subscriptionId, string resourceGroupName, string name) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listDeploymentManifest", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListDeploymentManifestRequest(string subscriptionId, string resourceGroupName, string name) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listDeploymentManifest", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// get deployment manifest. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListDeploymentManifestAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListDeploymentManifestRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationDeploymentManifest value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationDeploymentManifest.DeserializeDisconnectedOperationDeploymentManifest(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// get deployment manifest. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListDeploymentManifest(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListDeploymentManifestRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationDeploymentManifest value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationDeploymentManifest.DeserializeDisconnectedOperationDeploymentManifest(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); + return message; + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(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); + return message; + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DisconnectedOperation 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: + { + DisconnectedOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationListResult.DeserializeDisconnectedOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/ImagesRestOperations.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/ImagesRestOperations.cs new file mode 100644 index 000000000000..be3cec863d2d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Generated/RestOperations/ImagesRestOperations.cs @@ -0,0 +1,459 @@ +// 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.DisconnectedOperations.Models; + +namespace Azure.ResourceManager.DisconnectedOperations +{ + internal partial class ImagesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ImagesRestOperations. + /// 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 ImagesRestOperations(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-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByDisconnectedOperationRequestUri(string subscriptionId, string resourceGroupName, string name, string filter, int? top, int? skip) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByDisconnectedOperationRequest(string subscriptionId, string resourceGroupName, string name, string filter, int? top, int? skip) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by disconnected operation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// Filter the result list using the given expression. + /// The number of result items to return. + /// The number of result items to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDisconnectedOperationAsync(string subscriptionId, string resourceGroupName, string name, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListByDisconnectedOperationRequest(subscriptionId, resourceGroupName, name, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageListResult.DeserializeImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by disconnected operation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// Filter the result list using the given expression. + /// The number of result items to return. + /// The number of result items to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDisconnectedOperation(string subscriptionId, string resourceGroupName, string name, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListByDisconnectedOperationRequest(subscriptionId, resourceGroupName, name, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageListResult.DeserializeImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// 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 name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsImageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationsImageData.DeserializeDisconnectedOperationsImageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DisconnectedOperationsImageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// 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 name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsImageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationsImageData.DeserializeDisconnectedOperationsImageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DisconnectedOperationsImageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListDownloadUriRequestUri(string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/listDownloadUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListDownloadUriRequest(string subscriptionId, string resourceGroupName, string name, string imageName) + { + 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.Edge/disconnectedOperations/", false); + uri.AppendPath(name, true); + uri.AppendPath("/images/", false); + uri.AppendPath(imageName, true); + uri.AppendPath("/listDownloadUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the URI to download the image. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListDownloadUriAsync(string subscriptionId, string resourceGroupName, string name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListDownloadUriRequest(subscriptionId, resourceGroupName, name, imageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsImageDownloadResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DisconnectedOperationsImageDownloadResult.DeserializeDisconnectedOperationsImageDownloadResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the URI to download the image. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the resource. + /// The name of the Image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListDownloadUri(string subscriptionId, string resourceGroupName, string name, string imageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(imageName, nameof(imageName)); + + using var message = CreateListDownloadUriRequest(subscriptionId, resourceGroupName, name, imageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DisconnectedOperationsImageDownloadResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DisconnectedOperationsImageDownloadResult.DeserializeDisconnectedOperationsImageDownloadResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDisconnectedOperationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByDisconnectedOperationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string filter, int? top, int? skip) + { + 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 by disconnected operation. + /// 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. + /// Name of the resource. + /// Filter the result list using the given expression. + /// The number of result items to return. + /// The number of result items to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByDisconnectedOperationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListByDisconnectedOperationNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImageListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImageListResult.DeserializeImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by disconnected operation. + /// 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. + /// Name of the resource. + /// Filter the result list using the given expression. + /// The number of result items to return. + /// The number of result items to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByDisconnectedOperationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListByDisconnectedOperationNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImageListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImageListResult.DeserializeImageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Properties/AssemblyInfo.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ed00ac853737 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.DisconnectedOperations.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namespace 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.Edge")] diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Azure.ResourceManager.DisconnectedOperations.Tests.csproj b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Azure.ResourceManager.DisconnectedOperations.Tests.csproj new file mode 100644 index 000000000000..98f9dd79d63b --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Azure.ResourceManager.DisconnectedOperations.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/DisconnectedOperationsManagementTestBase.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/DisconnectedOperationsManagementTestBase.cs new file mode 100644 index 000000000000..4b27ba539416 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/DisconnectedOperationsManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DisconnectedOperations.Tests +{ + public class DisconnectedOperationsManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected DisconnectedOperationsManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected DisconnectedOperationsManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/DisconnectedOperationsManagementTestEnvironment.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/DisconnectedOperationsManagementTestEnvironment.cs new file mode 100644 index 000000000000..814caac1a347 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/DisconnectedOperationsManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.DisconnectedOperations.Tests +{ + public class DisconnectedOperationsManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationCollection.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationCollection.cs new file mode 100644 index 000000000000..c343132d4f50 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationCollection.cs @@ -0,0 +1,165 @@ +// 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.DisconnectedOperations.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DisconnectedOperations.Samples +{ + public partial class Sample_DisconnectedOperationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DisconnectedOperationsCreateOrUpdate() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperation_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 = "51DB5DE7-A66C-4789-BFFF-9F75C95A0201"; + string resourceGroupName = "rgdisconnectedOperations"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DisconnectedOperationResource + DisconnectedOperationCollection collection = resourceGroupResource.GetDisconnectedOperations(); + + // invoke the operation + string name = "demo-resource"; + DisconnectedOperationData data = new DisconnectedOperationData(new AzureLocation("eastus")) + { + Properties = new DisconnectedOperationProperties(null, DisconnectedOperationsBillingModel.Capacity, DisconnectedOperationsConnectionIntent.Disconnected), + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DisconnectedOperationResource 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 + DisconnectedOperationData 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_DisconnectedOperationsGet() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperation_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 = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DisconnectedOperationResource + DisconnectedOperationCollection collection = resourceGroupResource.GetDisconnectedOperations(); + + // invoke the operation + string name = "demo-resource"; + DisconnectedOperationResource result = await collection.GetAsync(name); + + // 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 + DisconnectedOperationData 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 Exists_DisconnectedOperationsGet() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperation_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 = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DisconnectedOperationResource + DisconnectedOperationCollection collection = resourceGroupResource.GetDisconnectedOperations(); + + // invoke the operation + string name = "demo-resource"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DisconnectedOperationsGet() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperation_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 = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DisconnectedOperationResource + DisconnectedOperationCollection collection = resourceGroupResource.GetDisconnectedOperations(); + + // invoke the operation + string name = "demo-resource"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DisconnectedOperationResource 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 + DisconnectedOperationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationResource.cs new file mode 100644 index 000000000000..e3009dedb58f --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationResource.cs @@ -0,0 +1,101 @@ +// 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.DisconnectedOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DisconnectedOperations.Samples +{ + public partial class Sample_DisconnectedOperationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DisconnectedOperationsGet() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperation_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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "demo-resource"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // invoke the operation + DisconnectedOperationResource result = await disconnectedOperation.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 + DisconnectedOperationData 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_DisconnectedOperationsDelete() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperation_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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "demo-resource"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // invoke the operation + await disconnectedOperation.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDeploymentManifest_DisconnectedOperationsListDeploymentManifest() + { + // Generated from example definition: 2025-06-01-preview/DisconnectedOperations_ListDeploymentManifest_MaximumSet_Gen.json + // this example is just showing the usage of "DisconnectedOperations_ListDeploymentManifest" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "demo-resource"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // invoke the operation + DisconnectedOperationDeploymentManifest result = await disconnectedOperation.GetDeploymentManifestAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsArtifactCollection.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsArtifactCollection.cs new file mode 100644 index 000000000000..0bd3f1d5738d --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsArtifactCollection.cs @@ -0,0 +1,164 @@ +// 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.DisconnectedOperations.Samples +{ + public partial class Sample_DisconnectedOperationsArtifactCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ArtifactsGet() + { + // Generated from example definition: 2025-06-01-preview/Artifacts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Artifact_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 DisconnectedOperationsImageResource created on azure + // for more information of creating DisconnectedOperationsImageResource, please refer to the document of DisconnectedOperationsImageResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "J_3-_S--_-UM_-_7w11"; + string imageName = "PMY-"; + ResourceIdentifier disconnectedOperationsImageResourceId = DisconnectedOperationsImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName); + DisconnectedOperationsImageResource disconnectedOperationsImage = client.GetDisconnectedOperationsImageResource(disconnectedOperationsImageResourceId); + + // get the collection of this DisconnectedOperationsArtifactResource + DisconnectedOperationsArtifactCollection collection = disconnectedOperationsImage.GetDisconnectedOperationsArtifacts(); + + // invoke the operation + string artifactName = "-8Y-Us1BNNG6-H5w6-2--RP"; + DisconnectedOperationsArtifactResource result = await collection.GetAsync(artifactName); + + // 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 + DisconnectedOperationsArtifactData 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_ArtifactsListByParent() + { + // Generated from example definition: 2025-06-01-preview/Artifact_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "Artifact_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 DisconnectedOperationsImageResource created on azure + // for more information of creating DisconnectedOperationsImageResource, please refer to the document of DisconnectedOperationsImageResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "XOn_Y-7_M-46E-Y"; + string imageName = "2v5Q3mNihPV88C882LnbQO8"; + ResourceIdentifier disconnectedOperationsImageResourceId = DisconnectedOperationsImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName); + DisconnectedOperationsImageResource disconnectedOperationsImage = client.GetDisconnectedOperationsImageResource(disconnectedOperationsImageResourceId); + + // get the collection of this DisconnectedOperationsArtifactResource + DisconnectedOperationsArtifactCollection collection = disconnectedOperationsImage.GetDisconnectedOperationsArtifacts(); + + // invoke the operation and iterate over the result + await foreach (DisconnectedOperationsArtifactResource 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 + DisconnectedOperationsArtifactData 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_ArtifactsGet() + { + // Generated from example definition: 2025-06-01-preview/Artifacts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Artifact_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 DisconnectedOperationsImageResource created on azure + // for more information of creating DisconnectedOperationsImageResource, please refer to the document of DisconnectedOperationsImageResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "J_3-_S--_-UM_-_7w11"; + string imageName = "PMY-"; + ResourceIdentifier disconnectedOperationsImageResourceId = DisconnectedOperationsImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName); + DisconnectedOperationsImageResource disconnectedOperationsImage = client.GetDisconnectedOperationsImageResource(disconnectedOperationsImageResourceId); + + // get the collection of this DisconnectedOperationsArtifactResource + DisconnectedOperationsArtifactCollection collection = disconnectedOperationsImage.GetDisconnectedOperationsArtifacts(); + + // invoke the operation + string artifactName = "-8Y-Us1BNNG6-H5w6-2--RP"; + bool result = await collection.ExistsAsync(artifactName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ArtifactsGet() + { + // Generated from example definition: 2025-06-01-preview/Artifacts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Artifact_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 DisconnectedOperationsImageResource created on azure + // for more information of creating DisconnectedOperationsImageResource, please refer to the document of DisconnectedOperationsImageResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "J_3-_S--_-UM_-_7w11"; + string imageName = "PMY-"; + ResourceIdentifier disconnectedOperationsImageResourceId = DisconnectedOperationsImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName); + DisconnectedOperationsImageResource disconnectedOperationsImage = client.GetDisconnectedOperationsImageResource(disconnectedOperationsImageResourceId); + + // get the collection of this DisconnectedOperationsArtifactResource + DisconnectedOperationsArtifactCollection collection = disconnectedOperationsImage.GetDisconnectedOperationsArtifacts(); + + // invoke the operation + string artifactName = "-8Y-Us1BNNG6-H5w6-2--RP"; + NullableResponse response = await collection.GetIfExistsAsync(artifactName); + DisconnectedOperationsArtifactResource 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 + DisconnectedOperationsArtifactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsArtifactResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsArtifactResource.cs new file mode 100644 index 000000000000..13d7070c79bf --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsArtifactResource.cs @@ -0,0 +1,79 @@ +// 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.DisconnectedOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DisconnectedOperations.Samples +{ + public partial class Sample_DisconnectedOperationsArtifactResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ArtifactsGet() + { + // Generated from example definition: 2025-06-01-preview/Artifacts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Artifact_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 DisconnectedOperationsArtifactResource created on azure + // for more information of creating DisconnectedOperationsArtifactResource, please refer to the document of DisconnectedOperationsArtifactResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "J_3-_S--_-UM_-_7w11"; + string imageName = "PMY-"; + string artifactName = "-8Y-Us1BNNG6-H5w6-2--RP"; + ResourceIdentifier disconnectedOperationsArtifactResourceId = DisconnectedOperationsArtifactResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName, artifactName); + DisconnectedOperationsArtifactResource disconnectedOperationsArtifact = client.GetDisconnectedOperationsArtifactResource(disconnectedOperationsArtifactResourceId); + + // invoke the operation + DisconnectedOperationsArtifactResource result = await disconnectedOperationsArtifact.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 + DisconnectedOperationsArtifactData 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 GetDownloadUri_ArtifactsListDownloadUri() + { + // Generated from example definition: 2025-06-01-preview/Artifact_ListDownloadUri_MaximumSet_Gen.json + // this example is just showing the usage of "Artifacts_ListDownloadUri" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 DisconnectedOperationsArtifactResource created on azure + // for more information of creating DisconnectedOperationsArtifactResource, please refer to the document of DisconnectedOperationsArtifactResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "L4z_-S"; + string imageName = "B-Ra--W0"; + string artifactName = "artifact1"; + ResourceIdentifier disconnectedOperationsArtifactResourceId = DisconnectedOperationsArtifactResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName, artifactName); + DisconnectedOperationsArtifactResource disconnectedOperationsArtifact = client.GetDisconnectedOperationsArtifactResource(disconnectedOperationsArtifactResourceId); + + // invoke the operation + DisconnectedOperationsArtifactDownloadResult result = await disconnectedOperationsArtifact.GetDownloadUriAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsImageCollection.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsImageCollection.cs new file mode 100644 index 000000000000..96f73dad6330 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsImageCollection.cs @@ -0,0 +1,163 @@ +// 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.DisconnectedOperations.Samples +{ + public partial class Sample_DisconnectedOperationsImageCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImagesGet() + { + // Generated from example definition: 2025-06-01-preview/Images_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Image_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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "bT62l-KS7g1-uh"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // get the collection of this DisconnectedOperationsImageResource + DisconnectedOperationsImageCollection collection = disconnectedOperation.GetDisconnectedOperationsImages(); + + // invoke the operation + string imageName = "2P6"; + DisconnectedOperationsImageResource result = await collection.GetAsync(imageName); + + // 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 + DisconnectedOperationsImageData 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_ImagesListByDisconnectedOperation() + { + // Generated from example definition: 2025-06-01-preview/Images_ListByDisconnectedOperation_MaximumSet_Gen.json + // this example is just showing the usage of "Image_ListByDisconnectedOperation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "1F6CACA0-5FFA-47AD-94FD-42368F71E49E"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "w_-EG-3-euL7K3-E"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // get the collection of this DisconnectedOperationsImageResource + DisconnectedOperationsImageCollection collection = disconnectedOperation.GetDisconnectedOperationsImages(); + + // invoke the operation and iterate over the result + string filter = "toynendoobwkrcwmfdfup"; + int? top = 20; + int? skip = 3; + await foreach (DisconnectedOperationsImageResource item in collection.GetAllAsync(filter: filter, top: top, skip: skip)) + { + // 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 + DisconnectedOperationsImageData 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_ImagesGet() + { + // Generated from example definition: 2025-06-01-preview/Images_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Image_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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "bT62l-KS7g1-uh"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // get the collection of this DisconnectedOperationsImageResource + DisconnectedOperationsImageCollection collection = disconnectedOperation.GetDisconnectedOperationsImages(); + + // invoke the operation + string imageName = "2P6"; + bool result = await collection.ExistsAsync(imageName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ImagesGet() + { + // Generated from example definition: 2025-06-01-preview/Images_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Image_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 DisconnectedOperationResource created on azure + // for more information of creating DisconnectedOperationResource, please refer to the document of DisconnectedOperationResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "bT62l-KS7g1-uh"; + ResourceIdentifier disconnectedOperationResourceId = DisconnectedOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + DisconnectedOperationResource disconnectedOperation = client.GetDisconnectedOperationResource(disconnectedOperationResourceId); + + // get the collection of this DisconnectedOperationsImageResource + DisconnectedOperationsImageCollection collection = disconnectedOperation.GetDisconnectedOperationsImages(); + + // invoke the operation + string imageName = "2P6"; + NullableResponse response = await collection.GetIfExistsAsync(imageName); + DisconnectedOperationsImageResource 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 + DisconnectedOperationsImageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsImageResource.cs b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsImageResource.cs new file mode 100644 index 000000000000..925bcd8b5769 --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tests/Generated/Samples/Sample_DisconnectedOperationsImageResource.cs @@ -0,0 +1,77 @@ +// 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.DisconnectedOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DisconnectedOperations.Samples +{ + public partial class Sample_DisconnectedOperationsImageResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ImagesGet() + { + // Generated from example definition: 2025-06-01-preview/Images_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Image_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 DisconnectedOperationsImageResource created on azure + // for more information of creating DisconnectedOperationsImageResource, please refer to the document of DisconnectedOperationsImageResource + string subscriptionId = "301DCB09-82EC-4777-A56C-6FFF26BCC814"; + string resourceGroupName = "rgdisconnectedoperations"; + string name = "bT62l-KS7g1-uh"; + string imageName = "2P6"; + ResourceIdentifier disconnectedOperationsImageResourceId = DisconnectedOperationsImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName); + DisconnectedOperationsImageResource disconnectedOperationsImage = client.GetDisconnectedOperationsImageResource(disconnectedOperationsImageResourceId); + + // invoke the operation + DisconnectedOperationsImageResource result = await disconnectedOperationsImage.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 + DisconnectedOperationsImageData 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 GetDownloadUri_ImagesListDownloadUri() + { + // Generated from example definition: 2025-06-01-preview/Images_ListDownloadUri_MaximumSet_Gen.json + // this example is just showing the usage of "Images_ListDownloadUri" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 DisconnectedOperationsImageResource created on azure + // for more information of creating DisconnectedOperationsImageResource, please refer to the document of DisconnectedOperationsImageResource + string subscriptionId = "51DB5DE7-A66C-4789-BFFF-9F75C95A0201"; + string resourceGroupName = "rgdisconnectedOperations"; + string name = "g_-5-160"; + string imageName = "1Q6lGV4V65j-1"; + ResourceIdentifier disconnectedOperationsImageResourceId = DisconnectedOperationsImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, imageName); + DisconnectedOperationsImageResource disconnectedOperationsImage = client.GetDisconnectedOperationsImageResource(disconnectedOperationsImageResourceId); + + // invoke the operation + DisconnectedOperationsImageDownloadResult result = await disconnectedOperationsImage.GetDownloadUriAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tsp-location.yaml b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tsp-location.yaml new file mode 100644 index 000000000000..26428a57108e --- /dev/null +++ b/sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/edge/Microsoft.Edge.DisconnectedOperations.Management +commit: f19bec6b8f2d2ca2ea4911f85e5228ba0af8c323 +repo: Azure/azure-rest-api-specs +additionalDirectories: +- specification/edge/Microsoft.Edge.Shared diff --git a/sdk/disconnectedoperations/ci.yml b/sdk/disconnectedoperations/ci.yml new file mode 100644 index 000000000000..7a84feb185b3 --- /dev/null +++ b/sdk/disconnectedoperations/ci.yml @@ -0,0 +1,35 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/disconnectedoperations + - sdk/disconnectedoperations/ci.yml + - sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/disconnectedoperations + - sdk/disconnectedoperations/ci.yml + - sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: disconnectedoperations + ArtifactName: packages + Artifacts: + - name: Azure.ResourceManager.DisconnectedOperations + safeName: AzureResourceManagerDisconnectedOperations diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs index d55275475b20..f8bffb42e7df 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs @@ -127,7 +127,8 @@ public virtual Pageable GetElasticSans(CancellationToken can public virtual AsyncPageable GetSkusAsync(string filter = null, CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListRequest(Id.SubscriptionId, filter); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ElasticSanSkuInformation.DeserializeElasticSanSkuInformation(e), SkusClientDiagnostics, Pipeline, "MockableElasticSanSubscriptionResource.GetSkus", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ElasticSanSkuInformation.DeserializeElasticSanSkuInformation(e), SkusClientDiagnostics, Pipeline, "MockableElasticSanSubscriptionResource.GetSkus", "value", "nextLink", cancellationToken); } /// @@ -153,7 +154,8 @@ public virtual AsyncPageable GetSkusAsync(string filte public virtual Pageable GetSkus(string filter = null, CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListRequest(Id.SubscriptionId, filter); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ElasticSanSkuInformation.DeserializeElasticSanSkuInformation(e), SkusClientDiagnostics, Pipeline, "MockableElasticSanSubscriptionResource.GetSkus", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ElasticSanSkuInformation.DeserializeElasticSanSkuInformation(e), SkusClientDiagnostics, Pipeline, "MockableElasticSanSubscriptionResource.GetSkus", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs index 9d2e2ec0c1e8..c33d8511e29a 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs @@ -123,5 +123,83 @@ public Response List(string subscriptionId, string throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string filter) + { + 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 all the available Skus in the region and information related to them. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Specify $filter='location eq <location>' to filter on location. + /// 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, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSanSkuInformationList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSanSkuInformationList.DeserializeElasticSanSkuInformationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the available Skus in the region and information related to them. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Specify $filter='location eq <location>' to filter on location. + /// 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, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSanSkuInformationList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSanSkuInformationList.DeserializeElasticSanSkuInformationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tsp-location.yaml b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tsp-location.yaml index f67797fbb8b9..cd6acf3ed163 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tsp-location.yaml +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/tsp-location.yaml @@ -1,3 +1,3 @@ -directory: specification\elasticsan\ElasticSan.Management -commit: b88038e1fd9bc69a90b604d273170979bca3132a +directory: specification/elasticsan/resource-manager/Microsoft.ElasticSan/ElasticSan +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b repo: Azure/azure-rest-api-specs diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Azure.Messaging.EventGrid.Namespaces.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Azure.Messaging.EventGrid.Namespaces.csproj index c93475c6f184..b92110dfb23c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Azure.Messaging.EventGrid.Namespaces.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Azure.Messaging.EventGrid.Namespaces.csproj @@ -9,6 +9,7 @@ $(RequiredTargetFrameworks) true true + false diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/properties/AssemblyInfo.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/properties/AssemblyInfo.cs index 32523328c35f..e4681872704d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/properties/AssemblyInfo.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/properties/AssemblyInfo.cs @@ -8,4 +8,3 @@ [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] [assembly: AzureResourceProviderNamespace("Microsoft.EventGrid")] -[assembly: CodeGenSuppressType("MessagingEventGridNamespacesClientBuilderExtensions")] diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tsp-location.yaml index 04d03b5cda53..e89f10414b6b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tsp-location.yaml +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tsp-location.yaml @@ -1,4 +1,4 @@ repo: Azure/azure-rest-api-specs directory: "specification/eventgrid/Azure.Messaging.EventGrid" -commit: 67e43665f813a4c7184ba4066902dc023ce638a6 +commit: 6b625eed7f0f065b6e6cf8f2a74379db81598ff9 emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json \ No newline at end of file diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index bff06a79f7f7..21461f91e396 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml @@ -1,4 +1,4 @@ repo: Azure/azure-rest-api-specs directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 752dade436619ed28bd03ca2e77cfa5acf6222dd +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml b/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml index d51e13806569..683f2cedd1fa 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml +++ b/sdk/grafana/Azure.ResourceManager.Grafana/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/dashboard/Dashboard.Management -commit: 471eab645d7bb83a4f54d283db5690f58d04a670 +commit: d6a665593101ff3ee1e2f1987dc6c6809720831c repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tsp-location.yaml b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tsp-location.yaml index ddaa95fc0939..696c8828db5a 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tsp-location.yaml +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/hardwaresecuritymodules/HardwareSecurityModules.Management repo: Azure/azure-rest-api-specs -commit: cb31a746be435d99ffe27d75922cec612027f171 +commit: 23e7a3756f8886cba0f12a558020366acb69fe69 additionalDirectories: [] diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.net8.0.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.net8.0.cs index 08eec758a096..ec1290e30861 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.net8.0.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.net8.0.cs @@ -43,10 +43,11 @@ public DeidentificationClient(System.Uri endpoint, Azure.Core.TokenCredential cr } public partial class DeidentificationClientOptions : Azure.Core.ClientOptions { - public DeidentificationClientOptions(Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion version = Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion.V2024_11_15) { } + public DeidentificationClientOptions(Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion version = Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion.V2025_07_15_Preview) { } public enum ServiceVersion { V2024_11_15 = 1, + V2025_07_15_Preview = 2, } } public partial class DeidentificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -55,6 +56,7 @@ public DeidentificationContent(string inputText) { } public Azure.Health.Deidentification.DeidentificationCustomizationOptions Customizations { get { throw null; } set { } } public string InputText { get { throw null; } } public Azure.Health.Deidentification.DeidentificationOperationType? OperationType { get { throw null; } set { } } + public Azure.Health.Deidentification.TaggedPhiEntities TaggedEntities { get { throw null; } set { } } protected virtual Azure.Health.Deidentification.DeidentificationContent 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) { } public static implicit operator Azure.Core.RequestContent (Azure.Health.Deidentification.DeidentificationContent deidentificationContent) { throw null; } @@ -69,6 +71,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DeidentificationCustomizationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeidentificationCustomizationOptions() { } + public string InputLocale { get { throw null; } set { } } public string RedactionFormat { get { throw null; } set { } } public string SurrogateLocale { get { throw null; } set { } } protected virtual Azure.Health.Deidentification.DeidentificationCustomizationOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +146,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DeidentificationJobCustomizationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeidentificationJobCustomizationOptions() { } + public string InputLocale { get { throw null; } set { } } public string RedactionFormat { get { throw null; } set { } } public string SurrogateLocale { get { throw null; } set { } } protected virtual Azure.Health.Deidentification.DeidentificationJobCustomizationOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -181,6 +185,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public DeidentificationOperationType(string value) { throw null; } public static Azure.Health.Deidentification.DeidentificationOperationType Redact { get { throw null; } } public static Azure.Health.Deidentification.DeidentificationOperationType Surrogate { get { throw null; } } + public static Azure.Health.Deidentification.DeidentificationOperationType SurrogateOnly { get { throw null; } } public static Azure.Health.Deidentification.DeidentificationOperationType Tag { get { throw null; } } public bool Equals(Azure.Health.Deidentification.DeidentificationOperationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -211,18 +216,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class HealthDeidentificationModelFactory { - public static Azure.Health.Deidentification.DeidentificationContent DeidentificationContent(string inputText = null, Azure.Health.Deidentification.DeidentificationOperationType? operationType = default(Azure.Health.Deidentification.DeidentificationOperationType?), Azure.Health.Deidentification.DeidentificationCustomizationOptions customizations = null) { throw null; } - public static Azure.Health.Deidentification.DeidentificationCustomizationOptions DeidentificationCustomizationOptions(string redactionFormat = null, string surrogateLocale = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.Health.Deidentification.DeidentificationContent DeidentificationContent(string inputText, Azure.Health.Deidentification.DeidentificationOperationType? operationType, Azure.Health.Deidentification.DeidentificationCustomizationOptions customizations) { throw null; } + public static Azure.Health.Deidentification.DeidentificationContent DeidentificationContent(string inputText = null, Azure.Health.Deidentification.DeidentificationOperationType? operationType = default(Azure.Health.Deidentification.DeidentificationOperationType?), Azure.Health.Deidentification.TaggedPhiEntities taggedEntities = null, Azure.Health.Deidentification.DeidentificationCustomizationOptions customizations = null) { throw null; } + public static Azure.Health.Deidentification.DeidentificationCustomizationOptions DeidentificationCustomizationOptions(string redactionFormat = null, string surrogateLocale = null, string inputLocale = null) { throw null; } public static Azure.Health.Deidentification.DeidentificationDocumentDetails DeidentificationDocumentDetails(string id = null, Azure.Health.Deidentification.DeidentificationDocumentLocation inputLocation = null, Azure.Health.Deidentification.DeidentificationDocumentLocation outputLocation = null, Azure.Health.Deidentification.OperationStatus status = default(Azure.Health.Deidentification.OperationStatus), Azure.ResponseError error = null) { throw null; } public static Azure.Health.Deidentification.DeidentificationDocumentLocation DeidentificationDocumentLocation(System.Uri location = null, Azure.ETag etag = default(Azure.ETag)) { throw null; } public static Azure.Health.Deidentification.DeidentificationJob DeidentificationJob(string jobName = null, Azure.Health.Deidentification.DeidentificationOperationType? operationType = default(Azure.Health.Deidentification.DeidentificationOperationType?), Azure.Health.Deidentification.SourceStorageLocation sourceLocation = null, Azure.Health.Deidentification.TargetStorageLocation targetLocation = null, Azure.Health.Deidentification.DeidentificationJobCustomizationOptions customizations = null, Azure.Health.Deidentification.OperationStatus status = default(Azure.Health.Deidentification.OperationStatus), Azure.ResponseError error = null, System.DateTimeOffset lastUpdatedAt = default(System.DateTimeOffset), System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? startedAt = default(System.DateTimeOffset?), Azure.Health.Deidentification.DeidentificationJobSummary summary = null) { throw null; } - public static Azure.Health.Deidentification.DeidentificationJobCustomizationOptions DeidentificationJobCustomizationOptions(string redactionFormat = null, string surrogateLocale = null) { throw null; } + public static Azure.Health.Deidentification.DeidentificationJobCustomizationOptions DeidentificationJobCustomizationOptions(string redactionFormat = null, string surrogateLocale = null, string inputLocale = null) { throw null; } public static Azure.Health.Deidentification.DeidentificationJobSummary DeidentificationJobSummary(int successfulCount = 0, int failedCount = 0, int canceledCount = 0, int totalCount = 0, long bytesProcessed = (long)0) { throw null; } public static Azure.Health.Deidentification.DeidentificationResult DeidentificationResult(string outputText = null, Azure.Health.Deidentification.PhiTaggerResult taggerResult = null) { throw null; } public static Azure.Health.Deidentification.PhiEntity PhiEntity(Azure.Health.Deidentification.PhiCategory category = default(Azure.Health.Deidentification.PhiCategory), Azure.Health.Deidentification.StringIndex offset = null, Azure.Health.Deidentification.StringIndex length = null, string text = null, double? confidenceScore = default(double?)) { throw null; } public static Azure.Health.Deidentification.PhiTaggerResult PhiTaggerResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.Health.Deidentification.SimplePhiEntity SimplePhiEntity(Azure.Health.Deidentification.PhiCategory category = default(Azure.Health.Deidentification.PhiCategory), int offset = 0, int length = 0, string text = null) { throw null; } public static Azure.Health.Deidentification.SourceStorageLocation SourceStorageLocation(System.Uri location = null, string prefix = null, System.Collections.Generic.IEnumerable extensions = null) { throw null; } public static Azure.Health.Deidentification.StringIndex StringIndex(int utf8 = 0, int utf16 = 0, int codePoint = 0) { throw null; } + public static Azure.Health.Deidentification.TaggedPhiEntities TaggedPhiEntities(Azure.Health.Deidentification.TextEncodingType encoding = default(Azure.Health.Deidentification.TextEncodingType), System.Collections.Generic.IEnumerable entities = null) { throw null; } public static Azure.Health.Deidentification.TargetStorageLocation TargetStorageLocation(System.Uri location = null, string prefix = null, bool? overwrite = default(bool?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -325,6 +334,23 @@ 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 SimplePhiEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimplePhiEntity(Azure.Health.Deidentification.PhiCategory category, int offset, int length) { } + public Azure.Health.Deidentification.PhiCategory Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + public string Text { get { throw null; } set { } } + protected virtual Azure.Health.Deidentification.SimplePhiEntity 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.Health.Deidentification.SimplePhiEntity PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.Health.Deidentification.SimplePhiEntity 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.Health.Deidentification.SimplePhiEntity 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 SourceStorageLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SourceStorageLocation(System.Uri location, string prefix) { } @@ -357,6 +383,21 @@ 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 TaggedPhiEntities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaggedPhiEntities(Azure.Health.Deidentification.TextEncodingType encoding, System.Collections.Generic.IEnumerable entities) { } + public Azure.Health.Deidentification.TextEncodingType Encoding { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected virtual Azure.Health.Deidentification.TaggedPhiEntities 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.Health.Deidentification.TaggedPhiEntities PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.Health.Deidentification.TaggedPhiEntities 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.Health.Deidentification.TaggedPhiEntities 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 TargetStorageLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TargetStorageLocation(System.Uri location, string prefix) { } @@ -373,6 +414,26 @@ 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 TextEncodingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextEncodingType(string value) { throw null; } + public static Azure.Health.Deidentification.TextEncodingType CodePoint { get { throw null; } } + public static Azure.Health.Deidentification.TextEncodingType Utf16 { get { throw null; } } + public static Azure.Health.Deidentification.TextEncodingType Utf8 { get { throw null; } } + public bool Equals(Azure.Health.Deidentification.TextEncodingType 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.Health.Deidentification.TextEncodingType left, Azure.Health.Deidentification.TextEncodingType right) { throw null; } + public static implicit operator Azure.Health.Deidentification.TextEncodingType (string value) { throw null; } + public static implicit operator Azure.Health.Deidentification.TextEncodingType? (string value) { throw null; } + public static bool operator !=(Azure.Health.Deidentification.TextEncodingType left, Azure.Health.Deidentification.TextEncodingType right) { throw null; } + public override string ToString() { throw null; } + } } namespace Microsoft.Extensions.Azure { diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs index d013a0b39198..f1c132a9512c 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs @@ -43,10 +43,11 @@ public DeidentificationClient(System.Uri endpoint, Azure.Core.TokenCredential cr } public partial class DeidentificationClientOptions : Azure.Core.ClientOptions { - public DeidentificationClientOptions(Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion version = Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion.V2024_11_15) { } + public DeidentificationClientOptions(Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion version = Azure.Health.Deidentification.DeidentificationClientOptions.ServiceVersion.V2025_07_15_Preview) { } public enum ServiceVersion { V2024_11_15 = 1, + V2025_07_15_Preview = 2, } } public partial class DeidentificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -55,6 +56,7 @@ public DeidentificationContent(string inputText) { } public Azure.Health.Deidentification.DeidentificationCustomizationOptions Customizations { get { throw null; } set { } } public string InputText { get { throw null; } } public Azure.Health.Deidentification.DeidentificationOperationType? OperationType { get { throw null; } set { } } + public Azure.Health.Deidentification.TaggedPhiEntities TaggedEntities { get { throw null; } set { } } protected virtual Azure.Health.Deidentification.DeidentificationContent 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) { } public static implicit operator Azure.Core.RequestContent (Azure.Health.Deidentification.DeidentificationContent deidentificationContent) { throw null; } @@ -69,6 +71,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DeidentificationCustomizationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeidentificationCustomizationOptions() { } + public string InputLocale { get { throw null; } set { } } public string RedactionFormat { get { throw null; } set { } } public string SurrogateLocale { get { throw null; } set { } } protected virtual Azure.Health.Deidentification.DeidentificationCustomizationOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +146,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DeidentificationJobCustomizationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeidentificationJobCustomizationOptions() { } + public string InputLocale { get { throw null; } set { } } public string RedactionFormat { get { throw null; } set { } } public string SurrogateLocale { get { throw null; } set { } } protected virtual Azure.Health.Deidentification.DeidentificationJobCustomizationOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -181,6 +185,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public DeidentificationOperationType(string value) { throw null; } public static Azure.Health.Deidentification.DeidentificationOperationType Redact { get { throw null; } } public static Azure.Health.Deidentification.DeidentificationOperationType Surrogate { get { throw null; } } + public static Azure.Health.Deidentification.DeidentificationOperationType SurrogateOnly { get { throw null; } } public static Azure.Health.Deidentification.DeidentificationOperationType Tag { get { throw null; } } public bool Equals(Azure.Health.Deidentification.DeidentificationOperationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -211,18 +216,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class HealthDeidentificationModelFactory { - public static Azure.Health.Deidentification.DeidentificationContent DeidentificationContent(string inputText = null, Azure.Health.Deidentification.DeidentificationOperationType? operationType = default(Azure.Health.Deidentification.DeidentificationOperationType?), Azure.Health.Deidentification.DeidentificationCustomizationOptions customizations = null) { throw null; } - public static Azure.Health.Deidentification.DeidentificationCustomizationOptions DeidentificationCustomizationOptions(string redactionFormat = null, string surrogateLocale = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.Health.Deidentification.DeidentificationContent DeidentificationContent(string inputText, Azure.Health.Deidentification.DeidentificationOperationType? operationType, Azure.Health.Deidentification.DeidentificationCustomizationOptions customizations) { throw null; } + public static Azure.Health.Deidentification.DeidentificationContent DeidentificationContent(string inputText = null, Azure.Health.Deidentification.DeidentificationOperationType? operationType = default(Azure.Health.Deidentification.DeidentificationOperationType?), Azure.Health.Deidentification.TaggedPhiEntities taggedEntities = null, Azure.Health.Deidentification.DeidentificationCustomizationOptions customizations = null) { throw null; } + public static Azure.Health.Deidentification.DeidentificationCustomizationOptions DeidentificationCustomizationOptions(string redactionFormat = null, string surrogateLocale = null, string inputLocale = null) { throw null; } public static Azure.Health.Deidentification.DeidentificationDocumentDetails DeidentificationDocumentDetails(string id = null, Azure.Health.Deidentification.DeidentificationDocumentLocation inputLocation = null, Azure.Health.Deidentification.DeidentificationDocumentLocation outputLocation = null, Azure.Health.Deidentification.OperationStatus status = default(Azure.Health.Deidentification.OperationStatus), Azure.ResponseError error = null) { throw null; } public static Azure.Health.Deidentification.DeidentificationDocumentLocation DeidentificationDocumentLocation(System.Uri location = null, Azure.ETag etag = default(Azure.ETag)) { throw null; } public static Azure.Health.Deidentification.DeidentificationJob DeidentificationJob(string jobName = null, Azure.Health.Deidentification.DeidentificationOperationType? operationType = default(Azure.Health.Deidentification.DeidentificationOperationType?), Azure.Health.Deidentification.SourceStorageLocation sourceLocation = null, Azure.Health.Deidentification.TargetStorageLocation targetLocation = null, Azure.Health.Deidentification.DeidentificationJobCustomizationOptions customizations = null, Azure.Health.Deidentification.OperationStatus status = default(Azure.Health.Deidentification.OperationStatus), Azure.ResponseError error = null, System.DateTimeOffset lastUpdatedAt = default(System.DateTimeOffset), System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? startedAt = default(System.DateTimeOffset?), Azure.Health.Deidentification.DeidentificationJobSummary summary = null) { throw null; } - public static Azure.Health.Deidentification.DeidentificationJobCustomizationOptions DeidentificationJobCustomizationOptions(string redactionFormat = null, string surrogateLocale = null) { throw null; } + public static Azure.Health.Deidentification.DeidentificationJobCustomizationOptions DeidentificationJobCustomizationOptions(string redactionFormat = null, string surrogateLocale = null, string inputLocale = null) { throw null; } public static Azure.Health.Deidentification.DeidentificationJobSummary DeidentificationJobSummary(int successfulCount = 0, int failedCount = 0, int canceledCount = 0, int totalCount = 0, long bytesProcessed = (long)0) { throw null; } public static Azure.Health.Deidentification.DeidentificationResult DeidentificationResult(string outputText = null, Azure.Health.Deidentification.PhiTaggerResult taggerResult = null) { throw null; } public static Azure.Health.Deidentification.PhiEntity PhiEntity(Azure.Health.Deidentification.PhiCategory category = default(Azure.Health.Deidentification.PhiCategory), Azure.Health.Deidentification.StringIndex offset = null, Azure.Health.Deidentification.StringIndex length = null, string text = null, double? confidenceScore = default(double?)) { throw null; } public static Azure.Health.Deidentification.PhiTaggerResult PhiTaggerResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.Health.Deidentification.SimplePhiEntity SimplePhiEntity(Azure.Health.Deidentification.PhiCategory category = default(Azure.Health.Deidentification.PhiCategory), int offset = 0, int length = 0, string text = null) { throw null; } public static Azure.Health.Deidentification.SourceStorageLocation SourceStorageLocation(System.Uri location = null, string prefix = null, System.Collections.Generic.IEnumerable extensions = null) { throw null; } public static Azure.Health.Deidentification.StringIndex StringIndex(int utf8 = 0, int utf16 = 0, int codePoint = 0) { throw null; } + public static Azure.Health.Deidentification.TaggedPhiEntities TaggedPhiEntities(Azure.Health.Deidentification.TextEncodingType encoding = default(Azure.Health.Deidentification.TextEncodingType), System.Collections.Generic.IEnumerable entities = null) { throw null; } public static Azure.Health.Deidentification.TargetStorageLocation TargetStorageLocation(System.Uri location = null, string prefix = null, bool? overwrite = default(bool?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -325,6 +334,23 @@ 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 SimplePhiEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimplePhiEntity(Azure.Health.Deidentification.PhiCategory category, int offset, int length) { } + public Azure.Health.Deidentification.PhiCategory Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + public string Text { get { throw null; } set { } } + protected virtual Azure.Health.Deidentification.SimplePhiEntity 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.Health.Deidentification.SimplePhiEntity PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.Health.Deidentification.SimplePhiEntity 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.Health.Deidentification.SimplePhiEntity 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 SourceStorageLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SourceStorageLocation(System.Uri location, string prefix) { } @@ -357,6 +383,21 @@ 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 TaggedPhiEntities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaggedPhiEntities(Azure.Health.Deidentification.TextEncodingType encoding, System.Collections.Generic.IEnumerable entities) { } + public Azure.Health.Deidentification.TextEncodingType Encoding { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected virtual Azure.Health.Deidentification.TaggedPhiEntities 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.Health.Deidentification.TaggedPhiEntities PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.Health.Deidentification.TaggedPhiEntities 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.Health.Deidentification.TaggedPhiEntities 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 TargetStorageLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TargetStorageLocation(System.Uri location, string prefix) { } @@ -373,6 +414,26 @@ 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 TextEncodingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextEncodingType(string value) { throw null; } + public static Azure.Health.Deidentification.TextEncodingType CodePoint { get { throw null; } } + public static Azure.Health.Deidentification.TextEncodingType Utf16 { get { throw null; } } + public static Azure.Health.Deidentification.TextEncodingType Utf8 { get { throw null; } } + public bool Equals(Azure.Health.Deidentification.TextEncodingType 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.Health.Deidentification.TextEncodingType left, Azure.Health.Deidentification.TextEncodingType right) { throw null; } + public static implicit operator Azure.Health.Deidentification.TextEncodingType (string value) { throw null; } + public static implicit operator Azure.Health.Deidentification.TextEncodingType? (string value) { throw null; } + public static bool operator !=(Azure.Health.Deidentification.TextEncodingType left, Azure.Health.Deidentification.TextEncodingType right) { throw null; } + public override string ToString() { throw null; } + } } namespace Microsoft.Extensions.Azure { diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/assets.json b/sdk/healthdataaiservices/Azure.Health.Deidentification/assets.json index 6ee2f8e9a8af..55949412374d 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/assets.json +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/healthdataaiservices/Azure.Health.Deidentification", - "Tag": "net/healthdataaiservices/Azure.Health.Deidentification_754ddcb6c3" + "Tag": "net/healthdataaiservices/Azure.Health.Deidentification_c5030f7773" } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationClientOptions.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationClientOptions.cs index 3419fd61b242..a2a680c32366 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationClientOptions.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.Health.Deidentification /// Client options for . public partial class DeidentificationClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15; + private const ServiceVersion LatestVersion = ServiceVersion.V2025_07_15_Preview; /// Initializes a new instance of DeidentificationClientOptions. /// The service version. @@ -22,6 +22,7 @@ public DeidentificationClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V2024_11_15 => "2024-11-15", + ServiceVersion.V2025_07_15_Preview => "2025-07-15-preview", _ => throw new NotSupportedException() }; } @@ -33,7 +34,9 @@ public DeidentificationClientOptions(ServiceVersion version = LatestVersion) public enum ServiceVersion { /// V2024_11_15. - V2024_11_15 = 1 + V2024_11_15 = 1, + /// V2025_07_15_Preview. + V2025_07_15_Preview = 2 } } } 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 69299e01071c..444c6a022aff 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs @@ -46,6 +46,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("operation"u8); writer.WriteStringValue(OperationType.Value.ToString()); } + if (Optional.IsDefined(TaggedEntities)) + { + writer.WritePropertyName("taggedEntities"u8); + writer.WriteObjectValue(TaggedEntities, options); + } if (Optional.IsDefined(Customizations)) { writer.WritePropertyName("customizations"u8); @@ -95,6 +100,7 @@ internal static DeidentificationContent DeserializeDeidentificationContent(JsonE } string inputText = default; DeidentificationOperationType? operationType = default; + TaggedPhiEntities taggedEntities = default; DeidentificationCustomizationOptions customizations = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -113,6 +119,15 @@ internal static DeidentificationContent DeserializeDeidentificationContent(JsonE operationType = new DeidentificationOperationType(prop.Value.GetString()); continue; } + if (prop.NameEquals("taggedEntities"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taggedEntities = TaggedPhiEntities.DeserializeTaggedPhiEntities(prop.Value, options); + continue; + } if (prop.NameEquals("customizations"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -127,7 +142,7 @@ internal static DeidentificationContent DeserializeDeidentificationContent(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new DeidentificationContent(inputText, operationType, customizations, additionalBinaryDataProperties); + return new DeidentificationContent(inputText, operationType, taggedEntities, customizations, additionalBinaryDataProperties); } /// The client options for reading and writing models. diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.cs index ac7b1bc1c4ff..6a5727678638 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.cs @@ -29,12 +29,14 @@ public DeidentificationContent(string inputText) /// Initializes a new instance of . /// Input text to de-identify. /// Operation to perform on the input documents. + /// Grouped PHI entities with single encoding specification for SurrogateOnly operation. /// Customization parameters to override default service behaviors. /// Keeps track of any properties unknown to the library. - internal DeidentificationContent(string inputText, DeidentificationOperationType? operationType, DeidentificationCustomizationOptions customizations, IDictionary additionalBinaryDataProperties) + internal DeidentificationContent(string inputText, DeidentificationOperationType? operationType, TaggedPhiEntities taggedEntities, DeidentificationCustomizationOptions customizations, IDictionary additionalBinaryDataProperties) { InputText = inputText; OperationType = operationType; + TaggedEntities = taggedEntities; Customizations = customizations; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -45,6 +47,9 @@ internal DeidentificationContent(string inputText, DeidentificationOperationType /// Operation to perform on the input documents. public DeidentificationOperationType? OperationType { get; set; } + /// Grouped PHI entities with single encoding specification for SurrogateOnly operation. + public TaggedPhiEntities TaggedEntities { get; set; } + /// Customization parameters to override default service behaviors. public DeidentificationCustomizationOptions Customizations { get; set; } } 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 637e3f4ade13..c016ad044710 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.Serialization.cs @@ -43,6 +43,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("surrogateLocale"u8); writer.WriteStringValue(SurrogateLocale); } + if (Optional.IsDefined(InputLocale)) + { + writer.WritePropertyName("inputLocale"u8); + writer.WriteStringValue(InputLocale); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -87,6 +92,7 @@ internal static DeidentificationCustomizationOptions DeserializeDeidentification } string redactionFormat = default; string surrogateLocale = default; + string inputLocale = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -100,12 +106,17 @@ internal static DeidentificationCustomizationOptions DeserializeDeidentification surrogateLocale = prop.Value.GetString(); continue; } + if (prop.NameEquals("inputLocale"u8)) + { + inputLocale = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new DeidentificationCustomizationOptions(redactionFormat, surrogateLocale, additionalBinaryDataProperties); + return new DeidentificationCustomizationOptions(redactionFormat, surrogateLocale, inputLocale, additionalBinaryDataProperties); } /// The client options for reading and writing models. diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.cs index 0fd323c87a65..2c0f78a78888 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.cs @@ -27,11 +27,13 @@ public DeidentificationCustomizationOptions() /// Please refer to https://learn.microsoft.com/azure/healthcare-apis/deidentification/redaction-format for more details. /// /// Locale in which the output surrogates are written. + /// Locale of the input text. Used for better PHI detection. Defaults to 'en-US'. /// Keeps track of any properties unknown to the library. - internal DeidentificationCustomizationOptions(string redactionFormat, string surrogateLocale, IDictionary additionalBinaryDataProperties) + internal DeidentificationCustomizationOptions(string redactionFormat, string surrogateLocale, string inputLocale, IDictionary additionalBinaryDataProperties) { RedactionFormat = redactionFormat; SurrogateLocale = surrogateLocale; + InputLocale = inputLocale; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -43,5 +45,8 @@ internal DeidentificationCustomizationOptions(string redactionFormat, string sur /// Locale in which the output surrogates are written. public string SurrogateLocale { get; set; } + + /// Locale of the input text. Used for better PHI detection. Defaults to 'en-US'. + public string InputLocale { get; set; } } } 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 8e155b2489d9..994c63e4aba0 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.Serialization.cs @@ -43,6 +43,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("surrogateLocale"u8); writer.WriteStringValue(SurrogateLocale); } + if (Optional.IsDefined(InputLocale)) + { + writer.WritePropertyName("inputLocale"u8); + writer.WriteStringValue(InputLocale); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -87,6 +92,7 @@ internal static DeidentificationJobCustomizationOptions DeserializeDeidentificat } string redactionFormat = default; string surrogateLocale = default; + string inputLocale = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -100,12 +106,17 @@ internal static DeidentificationJobCustomizationOptions DeserializeDeidentificat surrogateLocale = prop.Value.GetString(); continue; } + if (prop.NameEquals("inputLocale"u8)) + { + inputLocale = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new DeidentificationJobCustomizationOptions(redactionFormat, surrogateLocale, additionalBinaryDataProperties); + return new DeidentificationJobCustomizationOptions(redactionFormat, surrogateLocale, inputLocale, additionalBinaryDataProperties); } /// The client options for reading and writing models. diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.cs index 25f18c79bbdf..b709d1c469b8 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.cs @@ -27,11 +27,13 @@ public DeidentificationJobCustomizationOptions() /// Please refer to https://learn.microsoft.com/azure/healthcare-apis/deidentification/redaction-format for more details. /// /// Locale in which the output surrogates are written. + /// Locale of the input text. Used for better PHI detection. Defaults to 'en-US'. /// Keeps track of any properties unknown to the library. - internal DeidentificationJobCustomizationOptions(string redactionFormat, string surrogateLocale, IDictionary additionalBinaryDataProperties) + internal DeidentificationJobCustomizationOptions(string redactionFormat, string surrogateLocale, string inputLocale, IDictionary additionalBinaryDataProperties) { RedactionFormat = redactionFormat; SurrogateLocale = surrogateLocale; + InputLocale = inputLocale; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -43,5 +45,8 @@ internal DeidentificationJobCustomizationOptions(string redactionFormat, string /// Locale in which the output surrogates are written. public string SurrogateLocale { get; set; } + + /// Locale of the input text. Used for better PHI detection. Defaults to 'en-US'. + public string InputLocale { get; set; } } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationOperationType.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationOperationType.cs index 1fde0742863c..a6f633d586a7 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationOperationType.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationOperationType.cs @@ -20,6 +20,8 @@ namespace Azure.Health.Deidentification private const string SurrogateValue = "Surrogate"; /// Tag Operation will detect all entities of PHI, their type, and return their locations in the document. private const string TagValue = "Tag"; + /// SurrogateOnly Operation will replace only specified entities of PHI with surrogate values. + private const string SurrogateOnlyValue = "SurrogateOnly"; /// Initializes a new instance of . /// The value. @@ -40,6 +42,9 @@ public DeidentificationOperationType(string value) /// Tag Operation will detect all entities of PHI, their type, and return their locations in the document. public static DeidentificationOperationType Tag { get; } = new DeidentificationOperationType(TagValue); + /// SurrogateOnly Operation will replace only specified entities of PHI with surrogate values. + public static DeidentificationOperationType SurrogateOnly { get; } = new DeidentificationOperationType(SurrogateOnlyValue); + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/HealthDeidentificationModelFactory.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/HealthDeidentificationModelFactory.cs index 30c8c9b8af69..0aafb1729d55 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/HealthDeidentificationModelFactory.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/HealthDeidentificationModelFactory.cs @@ -88,10 +88,11 @@ public static TargetStorageLocation TargetStorageLocation(Uri location = default /// Please refer to https://learn.microsoft.com/azure/healthcare-apis/deidentification/redaction-format for more details. /// /// Locale in which the output surrogates are written. + /// Locale of the input text. Used for better PHI detection. Defaults to 'en-US'. /// A new instance for mocking. - public static DeidentificationJobCustomizationOptions DeidentificationJobCustomizationOptions(string redactionFormat = default, string surrogateLocale = default) + public static DeidentificationJobCustomizationOptions DeidentificationJobCustomizationOptions(string redactionFormat = default, string surrogateLocale = default, string inputLocale = default) { - return new DeidentificationJobCustomizationOptions(redactionFormat, surrogateLocale, additionalBinaryDataProperties: null); + return new DeidentificationJobCustomizationOptions(redactionFormat, surrogateLocale, inputLocale, additionalBinaryDataProperties: null); } /// Summary metrics of a job. @@ -142,11 +143,34 @@ public static DeidentificationDocumentLocation DeidentificationDocumentLocation( /// Request body for de-identification operation. /// Input text to de-identify. /// Operation to perform on the input documents. + /// Grouped PHI entities with single encoding specification for SurrogateOnly operation. /// Customization parameters to override default service behaviors. /// A new instance for mocking. - public static DeidentificationContent DeidentificationContent(string inputText = default, DeidentificationOperationType? operationType = default, DeidentificationCustomizationOptions customizations = default) + public static DeidentificationContent DeidentificationContent(string inputText = default, DeidentificationOperationType? operationType = default, TaggedPhiEntities taggedEntities = default, DeidentificationCustomizationOptions customizations = default) { - return new DeidentificationContent(inputText, operationType, customizations, additionalBinaryDataProperties: null); + return new DeidentificationContent(inputText, operationType, taggedEntities, customizations, additionalBinaryDataProperties: null); + } + + /// Grouped PHI entities with shared encoding specification. + /// The encoding type used for all entities in this group. + /// List of PHI entities using the specified encoding. + /// A new instance for mocking. + public static TaggedPhiEntities TaggedPhiEntities(TextEncodingType encoding = default, IEnumerable entities = default) + { + entities ??= new ChangeTrackingList(); + + return new TaggedPhiEntities(encoding, entities.ToList(), additionalBinaryDataProperties: null); + } + + /// Simple PHI entity with encoding-specific offset and length values. + /// PHI Category of the entity. + /// Starting index of the location from within the input text using the group's encoding. + /// Length of the input text using the group's encoding. + /// Text of the entity (optional). + /// A new instance for mocking. + public static SimplePhiEntity SimplePhiEntity(PhiCategory category = default, int offset = default, int length = default, string text = default) + { + return new SimplePhiEntity(category, offset, length, text, additionalBinaryDataProperties: null); } /// Customizations options to override default service behaviors for synchronous usage. @@ -155,10 +179,11 @@ public static DeidentificationContent DeidentificationContent(string inputText = /// Please refer to https://learn.microsoft.com/azure/healthcare-apis/deidentification/redaction-format for more details. /// /// Locale in which the output surrogates are written. + /// Locale of the input text. Used for better PHI detection. Defaults to 'en-US'. /// A new instance for mocking. - public static DeidentificationCustomizationOptions DeidentificationCustomizationOptions(string redactionFormat = default, string surrogateLocale = default) + public static DeidentificationCustomizationOptions DeidentificationCustomizationOptions(string redactionFormat = default, string surrogateLocale = default, string inputLocale = default) { - return new DeidentificationCustomizationOptions(redactionFormat, surrogateLocale, additionalBinaryDataProperties: null); + return new DeidentificationCustomizationOptions(redactionFormat, surrogateLocale, inputLocale, additionalBinaryDataProperties: null); } /// Response body for de-identification operation. 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 2e2b0fd49aed..df833165ab25 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Models/AzureHealthDeidentificationContext.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Models/AzureHealthDeidentificationContext.cs @@ -27,8 +27,10 @@ namespace Azure.Health.Deidentification [ModelReaderWriterBuildable(typeof(PhiEntity))] [ModelReaderWriterBuildable(typeof(PhiTaggerResult))] [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(SimplePhiEntity))] [ModelReaderWriterBuildable(typeof(SourceStorageLocation))] [ModelReaderWriterBuildable(typeof(StringIndex))] + [ModelReaderWriterBuildable(typeof(TaggedPhiEntities))] [ModelReaderWriterBuildable(typeof(TargetStorageLocation))] public partial class AzureHealthDeidentificationContext : ModelReaderWriterContext { diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs new file mode 100644 index 000000000000..8efb9ac34efa --- /dev/null +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs @@ -0,0 +1,169 @@ +// 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; + +namespace Azure.Health.Deidentification +{ + /// Simple PHI entity with encoding-specific offset and length values. + public partial class SimplePhiEntity : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal SimplePhiEntity() + { + } + + /// 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(SimplePhiEntity)} does not support writing '{format}' format."); + } + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.ToString()); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + 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. + SimplePhiEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SimplePhiEntity 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(SimplePhiEntity)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSimplePhiEntity(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SimplePhiEntity DeserializeSimplePhiEntity(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PhiCategory category = default; + int offset = default; + int length = default; + string text = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("category"u8)) + { + category = new PhiCategory(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("offset"u8)) + { + offset = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("length"u8)) + { + length = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("text"u8)) + { + text = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SimplePhiEntity(category, offset, length, text, 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, AzureHealthDeidentificationContext.Default); + default: + throw new FormatException($"The model {nameof(SimplePhiEntity)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SimplePhiEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SimplePhiEntity 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 DeserializeSimplePhiEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SimplePhiEntity)} 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/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.cs new file mode 100644 index 000000000000..d71e6b153bd9 --- /dev/null +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Health.Deidentification +{ + /// Simple PHI entity with encoding-specific offset and length values. + public partial class SimplePhiEntity + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// PHI Category of the entity. + /// Starting index of the location from within the input text using the group's encoding. + /// Length of the input text using the group's encoding. + public SimplePhiEntity(PhiCategory category, int offset, int length) + { + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// PHI Category of the entity. + /// Starting index of the location from within the input text using the group's encoding. + /// Length of the input text using the group's encoding. + /// Text of the entity (optional). + /// Keeps track of any properties unknown to the library. + internal SimplePhiEntity(PhiCategory category, int offset, int length, string text, IDictionary additionalBinaryDataProperties) + { + Category = category; + Offset = offset; + Length = length; + Text = text; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// PHI Category of the entity. + public PhiCategory Category { get; } + + /// Starting index of the location from within the input text using the group's encoding. + public int Offset { get; } + + /// Length of the input text using the group's encoding. + public int Length { get; } + + /// Text of the entity (optional). + public string Text { get; set; } + } +} diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.Serialization.cs new file mode 100644 index 000000000000..d9f2947768c1 --- /dev/null +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.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; + +namespace Azure.Health.Deidentification +{ + /// Grouped PHI entities with shared encoding specification. + public partial class TaggedPhiEntities : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal TaggedPhiEntities() + { + } + + /// 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(TaggedPhiEntities)} does not support writing '{format}' format."); + } + writer.WritePropertyName("encoding"u8); + writer.WriteStringValue(Encoding.ToString()); + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (SimplePhiEntity item in Entities) + { + 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. + TaggedPhiEntities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual TaggedPhiEntities 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(TaggedPhiEntities)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaggedPhiEntities(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TaggedPhiEntities DeserializeTaggedPhiEntities(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextEncodingType encoding = default; + IList entities = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("encoding"u8)) + { + encoding = new TextEncodingType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(SimplePhiEntity.DeserializeSimplePhiEntity(item, options)); + } + entities = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TaggedPhiEntities(encoding, entities, 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, AzureHealthDeidentificationContext.Default); + default: + throw new FormatException($"The model {nameof(TaggedPhiEntities)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + TaggedPhiEntities IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual TaggedPhiEntities 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 DeserializeTaggedPhiEntities(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaggedPhiEntities)} 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/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.cs new file mode 100644 index 000000000000..0d2ee848155e --- /dev/null +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.cs @@ -0,0 +1,49 @@ +// 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.Health.Deidentification +{ + /// Grouped PHI entities with shared encoding specification. + public partial class TaggedPhiEntities + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The encoding type used for all entities in this group. + /// List of PHI entities using the specified encoding. + /// is null. + public TaggedPhiEntities(TextEncodingType encoding, IEnumerable entities) + { + Argument.AssertNotNull(entities, nameof(entities)); + + Encoding = encoding; + Entities = entities.ToList(); + } + + /// Initializes a new instance of . + /// The encoding type used for all entities in this group. + /// List of PHI entities using the specified encoding. + /// Keeps track of any properties unknown to the library. + internal TaggedPhiEntities(TextEncodingType encoding, IList entities, IDictionary additionalBinaryDataProperties) + { + Encoding = encoding; + Entities = entities; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The encoding type used for all entities in this group. + public TextEncodingType Encoding { get; } + + /// List of PHI entities using the specified encoding. + public IList Entities { get; } + } +} diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TextEncodingType.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TextEncodingType.cs new file mode 100644 index 000000000000..31bcffc0d30e --- /dev/null +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TextEncodingType.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Health.Deidentification +{ + /// Encoding type for text offset and length calculations. + public readonly partial struct TextEncodingType : IEquatable + { + private readonly string _value; + /// UTF-8 encoding. + private const string Utf8Value = "Utf8"; + /// UTF-16 encoding. Primary encoding used by .NET, Java, and JavaScript. + private const string Utf16Value = "Utf16"; + /// CodePoint encoding. Primary encoding used by Python. + private const string CodePointValue = "CodePoint"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public TextEncodingType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// UTF-8 encoding. + public static TextEncodingType Utf8 { get; } = new TextEncodingType(Utf8Value); + + /// UTF-16 encoding. Primary encoding used by .NET, Java, and JavaScript. + public static TextEncodingType Utf16 { get; } = new TextEncodingType(Utf16Value); + + /// CodePoint encoding. Primary encoding used by Python. + public static TextEncodingType CodePoint { get; } = new TextEncodingType(CodePointValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(TextEncodingType left, TextEncodingType 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 !=(TextEncodingType left, TextEncodingType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator TextEncodingType(string value) => new TextEncodingType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator TextEncodingType?(string value) => value == null ? null : new TextEncodingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TextEncodingType other && Equals(other); + + /// + public bool Equals(TextEncodingType 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/healthdataaiservices/Azure.Health.Deidentification/src/HealthDeidentificationModelFactory.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/HealthDeidentificationModelFactory.cs index 4f12001385f7..8fa80e7fe00e 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/HealthDeidentificationModelFactory.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/HealthDeidentificationModelFactory.cs @@ -1,10 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.ComponentModel; + namespace Azure.Health.Deidentification { [CodeGenType("DeidentificationModelFactory")] public partial class HealthDeidentificationModelFactory { + /// Request body for de-identification operation. + /// Input text to de-identify. + /// Operation to perform on the input documents. + /// Customization parameters to override default service behaviors. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DeidentificationContent DeidentificationContent(string inputText, DeidentificationOperationType? operationType, DeidentificationCustomizationOptions customizations) + { + return DeidentificationContent(inputText, operationType, null, customizations); + } } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/Helpers/DeidentificationTestEnvironment.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/Helpers/DeidentificationTestEnvironment.cs index e1ce1422023b..d97172f72508 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/Helpers/DeidentificationTestEnvironment.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/Helpers/DeidentificationTestEnvironment.cs @@ -10,7 +10,7 @@ public class DeidentificationTestEnvironment : TestEnvironment public string Endpoint => GetRecordedOptionalVariable("DEID_SERVICE_ENDPOINT") ?? "https://localhost:5020"; public string StorageAccountName => GetRecordedOptionalVariable("STORAGE_ACCOUNT_NAME") ?? "storageAccount"; public string StorageContainerName => GetRecordedOptionalVariable("STORAGE_CONTAINER_NAME") ?? "container"; - public static string FakeNextLink => "https://localhost:5020/jobs/net-sdk-job-1234/documents?api-version=2024-11-15&maxpagesize=2&continuationToken=1234"; + public static string FakeNextLink => "https://localhost:5020/jobs/net-sdk-job-1234/documents?api-version=2025-07-15-preview&maxpagesize=2&continuationToken=1234"; public static string FakeStorageLocation => "https://fakeblobstorage.blob.core.windows.net/container"; public static string FakeJobName => "net-sdk-job-1234"; public static string FakeContinuationTokenSegment => "continuationToken=1234"; diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/RealtimeOperationsTest.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/RealtimeOperationsTest.cs index 03a8813c0c34..b69c9e5ec6df 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/RealtimeOperationsTest.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/tests/Tests/RealtimeOperationsTest.cs @@ -46,7 +46,7 @@ public async Task Realtime_Tag_ReturnsExcepted() DeidentificationClient client = GetDeidClient(); string input = "Hello, my name is John Smith."; - DeidentificationContent content = new(input, DeidentificationOperationType.Tag, null, null); + DeidentificationContent content = new(input, DeidentificationOperationType.Tag, null, null, null); DeidentificationResult result = await client.DeidentifyTextAsync(content); diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml b/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml index 8c04f21a6afa..ff4108334226 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml @@ -1,6 +1,6 @@ directory: specification/healthdataaiservices/HealthDataAIServices.DeidServices repo: Azure/azure-rest-api-specs -commit: 70d293f0964bb1e04738cc4192321f40d1dc93a1 +commit: 681c15ad9028f91b3f4978625527fd461b57f4fa additionalDirectories: [] emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml index 12a34944ad25..83b0eaa89cc1 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/hybridconnectivity/HybridConnectivity.Management -commit: 7b93673aa21d915108429c2e625f6424cdb326e8 +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/identity/Azure.Identity/CHANGELOG.md b/sdk/identity/Azure.Identity/CHANGELOG.md index f09048b909a4..b956fe0f0a54 100644 --- a/sdk/identity/Azure.Identity/CHANGELOG.md +++ b/sdk/identity/Azure.Identity/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs Fixed +- TenantId is now configured via MSAL's `WithTenantId` instead of `WithTenantIdFromAuthority` to prevent malformed Uris to the authority. + ### Other Changes ## 1.16.0 (2025-09-09) diff --git a/sdk/identity/Azure.Identity/README.md b/sdk/identity/Azure.Identity/README.md index 837ba0319a65..34f6b6e676db 100644 --- a/sdk/identity/Azure.Identity/README.md +++ b/sdk/identity/Azure.Identity/README.md @@ -1,6 +1,6 @@ # Azure Identity client library for .NET -The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/entra/fundamentals/whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/entra/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet) implementations that can be used to construct Azure SDK clients that support Microsoft Entra token authentication. +The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/entra/fundamentals/whatis) token-based authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet) implementations that can be used to construct Azure SDK clients that support Microsoft Entra token authentication. [Source code][source] | [Package (NuGet)][package] | [API reference documentation][identity_api_docs] | [Microsoft Entra ID documentation][entraid_doc] diff --git a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs index 0e6330aede9f..71e94cd105a4 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs @@ -36,7 +36,7 @@ protected AuthorizationCodeCredential() } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. + /// Creates an instance of the AuthorizationCodeCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. /// /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal @@ -49,7 +49,7 @@ public AuthorizationCodeCredential(string tenantId, string clientId, string clie } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. + /// Creates an instance of the AuthorizationCodeCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. /// /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal @@ -66,7 +66,7 @@ public AuthorizationCodeCredential( { } /// - /// Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. + /// Creates an instance of the AuthorizationCodeCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code. /// /// The Microsoft Entra tenant (directory) ID of the service principal. /// The client (application) ID of the service principal diff --git a/sdk/identity/Azure.Identity/src/MsalClientBase.cs b/sdk/identity/Azure.Identity/src/MsalClientBase.cs index eb137521fcc9..bc1cf064c7e5 100644 --- a/sdk/identity/Azure.Identity/src/MsalClientBase.cs +++ b/sdk/identity/Azure.Identity/src/MsalClientBase.cs @@ -108,20 +108,5 @@ await _clientWithCaeAsyncLock.GetLockOrValueAsync(true, default).ConfigureAwait( return asyncLock.HasValue ? asyncLock.Value.Cache : null; } - - public UriBuilder BuildTenantIdWithAuthorityHost(string tenantId) - { - UriBuilder uriBuilder = new(AuthorityHost); - if (uriBuilder.Path.EndsWith("/")) - { - uriBuilder.Path += tenantId; - } - else - { - uriBuilder.Path = uriBuilder.Path + "/" + tenantId; - } - - return uriBuilder; - } } } diff --git a/sdk/identity/Azure.Identity/src/MsalConfidentialClient.cs b/sdk/identity/Azure.Identity/src/MsalConfidentialClient.cs index d77d9f955dfb..9aa79112905a 100644 --- a/sdk/identity/Azure.Identity/src/MsalConfidentialClient.cs +++ b/sdk/identity/Azure.Identity/src/MsalConfidentialClient.cs @@ -169,8 +169,7 @@ public virtual async ValueTask AcquireTokenForClientCoreAs if (!string.IsNullOrEmpty(tenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } if (!string.IsNullOrEmpty(claims)) { @@ -211,8 +210,7 @@ public virtual async ValueTask AcquireTokenSilentCoreAsync var builder = client.AcquireTokenSilent(scopes, account); if (!string.IsNullOrEmpty(tenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } if (!string.IsNullOrEmpty(claims)) { @@ -254,8 +252,7 @@ public virtual async ValueTask AcquireTokenByAuthorization if (!string.IsNullOrEmpty(tenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } if (!string.IsNullOrEmpty(claims)) { @@ -297,8 +294,7 @@ public virtual async ValueTask AcquireTokenOnBehalfOfCoreA if (!string.IsNullOrEmpty(tenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } if (!string.IsNullOrEmpty(claims)) { diff --git a/sdk/identity/Azure.Identity/src/MsalPublicClient.cs b/sdk/identity/Azure.Identity/src/MsalPublicClient.cs index de50918530b2..77e515f3cd45 100644 --- a/sdk/identity/Azure.Identity/src/MsalPublicClient.cs +++ b/sdk/identity/Azure.Identity/src/MsalPublicClient.cs @@ -126,8 +126,7 @@ protected virtual async ValueTask AcquireTokenSilentCoreAs } if (tenantId != null) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } if (context.IsProofOfPossessionEnabled) @@ -182,8 +181,7 @@ protected virtual async ValueTask AcquireTokenSilentCoreAs if (tenantId != null || record.TenantId != null) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId ?? record.TenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId ?? record.TenantId); } if (!string.IsNullOrEmpty(claims)) @@ -284,8 +282,7 @@ protected virtual async ValueTask AcquireTokenInteractiveC } if (tenantId != null) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } if (browserOptions != null) { @@ -328,8 +325,7 @@ protected virtual async ValueTask AcquireTokenByUsernamePa } if (!string.IsNullOrEmpty(tenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(tenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(tenantId); } return await builder.ExecuteAsync(async, cancellationToken) .ConfigureAwait(false); @@ -353,8 +349,7 @@ protected virtual async ValueTask AcquireTokenWithDeviceCo } if (!string.IsNullOrEmpty(TenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(TenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(TenantId); } return await builder.ExecuteAsync(async, cancellationToken) @@ -380,8 +375,7 @@ protected virtual async ValueTask AcquireTokenByRefreshTok if (!string.IsNullOrEmpty(TenantId)) { - UriBuilder uriBuilder = BuildTenantIdWithAuthorityHost(TenantId); - builder.WithTenantIdFromAuthority(uriBuilder.Uri); + builder.WithTenantId(TenantId); } return await builder.ExecuteAsync(async, cancellationToken) diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md index 9266a6857c27..1afec44dc9ca 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.2.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.1.0 (2025-09-15) ### Features Added diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Azure.ResourceManager.IotFirmwareDefense.csproj b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Azure.ResourceManager.IotFirmwareDefense.csproj index d439e26af1b3..0df85e00bd27 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Azure.ResourceManager.IotFirmwareDefense.csproj +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Azure.ResourceManager.IotFirmwareDefense.csproj @@ -1,7 +1,7 @@ - 1.1.0 - 1.0.1 + 1.2.0-beta.1 + 1.1.0 Azure.ResourceManager.IotFirmwareDefense diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md b/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md index 92537cc17f57..799b6e649910 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.3.3 (2025-09-15) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Upgraded API version to `2025-05-01`. +- Added support for `IpRules` and `ServiceTags` fields introduced in the new API version. ## 1.3.2 (2025-03-26) diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.net8.0.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.net8.0.cs index e0efc2017e47..2a000a33de75 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.net8.0.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.net8.0.cs @@ -1239,6 +1239,7 @@ public ManagedHsmNetworkRuleSet() { } public Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleBypassOption? Bypass { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleAction? DefaultAction { get { throw null; } set { } } public System.Collections.Generic.IList IPRules { get { throw null; } } + public System.Collections.Generic.IList ServiceTags { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1431,6 +1432,17 @@ 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 ManagedHsmServiceTagRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedHsmServiceTagRule(string tag) { } + public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.KeyVault.Models.ManagedHsmServiceTagRule 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.KeyVault.Models.ManagedHsmServiceTagRule 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 ManagedHsmSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedHsmSku(Azure.ResourceManager.KeyVault.Models.ManagedHsmSkuFamily family, Azure.ResourceManager.KeyVault.Models.ManagedHsmSkuName name) { } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs index e0efc2017e47..2a000a33de75 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/api/Azure.ResourceManager.KeyVault.netstandard2.0.cs @@ -1239,6 +1239,7 @@ public ManagedHsmNetworkRuleSet() { } public Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleBypassOption? Bypass { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleAction? DefaultAction { get { throw null; } set { } } public System.Collections.Generic.IList IPRules { get { throw null; } } + public System.Collections.Generic.IList ServiceTags { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkRules { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1431,6 +1432,17 @@ 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 ManagedHsmServiceTagRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedHsmServiceTagRule(string tag) { } + public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.KeyVault.Models.ManagedHsmServiceTagRule 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.KeyVault.Models.ManagedHsmServiceTagRule 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 ManagedHsmSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedHsmSku(Azure.ResourceManager.KeyVault.Models.ManagedHsmSkuFamily family, Azure.ResourceManager.KeyVault.Models.ManagedHsmSkuName name) { } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj index edf725dffa36..26e9cc013d69 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj @@ -1,6 +1,6 @@ - 1.4.0-beta.1 + 1.3.3 1.3.2 Azure.ResourceManager.KeyVault diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs index 026eb02f5c16..2c49e1438863 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(AzureLocat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation location, str /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string vaultName, C /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs index a6d054c9829c..23c208f85218 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task PurgeDeletedAsync(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs index 928590822e89..a2dd9bed6317 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(AzureLoc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation location, s /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string name, Cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs index 825b2747414d..abfe33176efd 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task PurgeDeletedAsync(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs index ad4c34ebc793..eb12d44186d5 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs @@ -196,7 +196,7 @@ public static KeyVaultCollection GetKeyVaults(this ResourceGroupResource resourc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -234,7 +234,7 @@ public static async Task> GetKeyVaultAsync(this Resou /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public static ManagedHsmCollection GetManagedHsms(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -327,7 +327,7 @@ public static async Task> GetManagedHsmAsync(this R /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -382,7 +382,7 @@ public static DeletedKeyVaultCollection GetDeletedKeyVaults(this SubscriptionRes /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -421,7 +421,7 @@ public static async Task> GetDeletedKeyVaultAs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -477,7 +477,7 @@ public static DeletedManagedHsmCollection GetDeletedManagedHsms(this Subscriptio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -516,7 +516,7 @@ public static async Task> GetDeletedManagedH /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -555,7 +555,7 @@ public static Response GetDeletedManagedHsm(this Subs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -592,7 +592,7 @@ public static AsyncPageable GetKeyVaultsAsync(this Subscriptio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -629,7 +629,7 @@ public static Pageable GetKeyVaults(this SubscriptionResource /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -661,7 +661,7 @@ public static AsyncPageable GetDeletedKeyVaultsAsync(th /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -693,7 +693,7 @@ public static Pageable GetDeletedKeyVaults(this Subscri /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -729,7 +729,7 @@ public static async Task> CheckKeyVault /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -765,7 +765,7 @@ public static Response CheckKeyVaultNameAvailabi /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -802,7 +802,7 @@ public static AsyncPageable GetManagedHsmsAsync(this Subscri /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -839,7 +839,7 @@ public static Pageable GetManagedHsms(this SubscriptionResou /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -871,7 +871,7 @@ public static AsyncPageable GetDeletedManagedHsmsAsyn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -903,7 +903,7 @@ public static Pageable GetDeletedManagedHsms(this Sub /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -939,7 +939,7 @@ public static async Task> CheckManage /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs index 883687417b15..fc725405cff3 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual KeyVaultCollection GetKeyVaults() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetKeyVaultAsync(string va /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual ManagedHsmCollection GetManagedHsms() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetManagedHsmAsync(strin /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs index ec217bd4a936..b13848ea6138 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs @@ -74,7 +74,7 @@ public virtual DeletedKeyVaultCollection GetDeletedKeyVaults() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetDeletedKeyVaultA /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual DeletedManagedHsmCollection GetDeletedManagedHsms() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual async Task> GetDeletedManaged /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual Response GetDeletedManagedHsm(AzureLoc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -240,7 +240,7 @@ public virtual AsyncPageable GetKeyVaultsAsync(int? top = null /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Pageable GetKeyVaults(int? top = null, Cancella /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -297,7 +297,7 @@ public virtual AsyncPageable GetDeletedKeyVaultsAsync(C /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -323,7 +323,7 @@ public virtual Pageable GetDeletedKeyVaults(Cancellatio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> CheckKeyVaul /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response CheckKeyVaultNameAvailab /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -438,7 +438,7 @@ public virtual AsyncPageable GetManagedHsmsAsync(int? top = /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -469,7 +469,7 @@ public virtual Pageable GetManagedHsms(int? top = null, Canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -495,7 +495,7 @@ public virtual AsyncPageable GetDeletedManagedHsmsAsy /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -521,7 +521,7 @@ public virtual Pageable GetDeletedManagedHsms(Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> CheckManag /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs index ccaa4ab31b3b..7685b3b601fb 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string vaultName, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string vaultName, CancellationToke /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, Canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? top = null, CancellationTo /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string vaultName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs index 6ccaf51bf3aa..4842a47425cc 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string pr /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs index 15f06cf4737a..0943851e07af 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(Wa /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs index 23bc19236232..da0a74b99c37 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs @@ -115,7 +115,7 @@ public virtual KeyVaultPrivateEndpointConnectionCollection GetKeyVaultPrivateEnd /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual KeyVaultSecretCollection GetKeyVaultSecrets() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetKeyVaultSecretAsy /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetKeyVaultSecret(string secretN /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(KeyVaultPatch /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -498,7 +498,7 @@ public virtual Response Update(KeyVaultPatch patch, Cancellati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -537,7 +537,7 @@ public virtual async Task> UpdateAccess /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -576,7 +576,7 @@ public virtual Response UpdateAccessPolicy(Acces /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -601,7 +601,7 @@ public virtual AsyncPageable GetPrivateLinkReso /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -626,7 +626,7 @@ public virtual Pageable GetPrivateLinkResources /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -688,7 +688,7 @@ public virtual async Task> AddTagAsync(string key, st /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -750,7 +750,7 @@ public virtual Response AddTag(string key, string value, Cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -807,7 +807,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -864,7 +864,7 @@ public virtual Response SetTags(IDictionary ta /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -924,7 +924,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs index f415d81cd4f9..6a2a1d5a3825 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string secr /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string secretName, Cancellat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cancella /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string secretName, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string secretName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs index f6f3f68d4283..8a10c378c6e7 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> UpdateAsync(KeyVault /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs index 1a7668a7b9bc..eec89928c614 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name, Ca /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationToken c /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, Ca /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(int? top = null, Cancellation /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs index 140470aae55e..18033464e994 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs index 5a0270bdc430..0e985793511b 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -476,7 +476,7 @@ public virtual Response AddTag(stri /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Response SetTags(IDi /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -643,7 +643,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs index 890b7d1c689f..b1a2dcabee76 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs @@ -119,7 +119,7 @@ public virtual ManagedHsmPrivateEndpointConnectionCollection GetManagedHsmPrivat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -150,7 +150,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response GetManagedH /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -221,7 +221,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -303,7 +303,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -391,7 +391,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -437,7 +437,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Mana /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -462,7 +462,7 @@ public virtual AsyncPageable GetMHSMPrivateLi /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -487,7 +487,7 @@ public virtual Pageable GetMHSMPrivateLinkRes /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -513,7 +513,7 @@ public virtual AsyncPageable GetMHSMRegionsByReso /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// @@ -539,7 +539,7 @@ public virtual Pageable GetMHSMRegionsByResource( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -663,7 +663,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -777,7 +777,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource @@ -837,7 +837,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/AzureResourceManagerKeyVaultContext.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/AzureResourceManagerKeyVaultContext.cs index 8f3ab5ced4b6..2701d7184caf 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/AzureResourceManagerKeyVaultContext.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/AzureResourceManagerKeyVaultContext.cs @@ -69,6 +69,7 @@ namespace Azure.ResourceManager.KeyVault [ModelReaderWriterBuildable(typeof(ManagedHsmRegionsListResult))] [ModelReaderWriterBuildable(typeof(ManagedHsmResource))] [ModelReaderWriterBuildable(typeof(ManagedHSMSecurityDomainProperties))] + [ModelReaderWriterBuildable(typeof(ManagedHsmServiceTagRule))] [ModelReaderWriterBuildable(typeof(ManagedHsmSku))] [ModelReaderWriterBuildable(typeof(ManagedHsmVirtualNetworkRule))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.Serialization.cs index dfefadbfdd7e..5456f0ca2b07 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.Serialization.cs @@ -56,6 +56,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(ServiceTags)) + { + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartArray(); + foreach (var item in ServiceTags) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsCollectionDefined(VirtualNetworkRules)) { writer.WritePropertyName("virtualNetworkRules"u8); @@ -106,6 +116,7 @@ internal static ManagedHsmNetworkRuleSet DeserializeManagedHsmNetworkRuleSet(Jso ManagedHsmNetworkRuleBypassOption? bypass = default; ManagedHsmNetworkRuleAction? defaultAction = default; IList ipRules = default; + IList serviceTags = default; IList virtualNetworkRules = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -143,6 +154,20 @@ internal static ManagedHsmNetworkRuleSet DeserializeManagedHsmNetworkRuleSet(Jso ipRules = array; continue; } + if (property.NameEquals("serviceTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ManagedHsmServiceTagRule.DeserializeManagedHsmServiceTagRule(item, options)); + } + serviceTags = array; + continue; + } if (property.NameEquals("virtualNetworkRules"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -163,7 +188,13 @@ internal static ManagedHsmNetworkRuleSet DeserializeManagedHsmNetworkRuleSet(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedHsmNetworkRuleSet(bypass, defaultAction, ipRules ?? new ChangeTrackingList(), virtualNetworkRules ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ManagedHsmNetworkRuleSet( + bypass, + defaultAction, + ipRules ?? new ChangeTrackingList(), + serviceTags ?? new ChangeTrackingList(), + virtualNetworkRules ?? new ChangeTrackingList(), + serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -230,6 +261,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServiceTags)) + { + if (ServiceTags.Any()) + { + builder.Append(" serviceTags: "); + builder.AppendLine("["); + foreach (var item in ServiceTags) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " serviceTags: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkRules), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs index 8ffac591c66a..7562020c3333 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmNetworkRuleSet.cs @@ -49,6 +49,7 @@ public partial class ManagedHsmNetworkRuleSet public ManagedHsmNetworkRuleSet() { IPRules = new ChangeTrackingList(); + ServiceTags = new ChangeTrackingList(); VirtualNetworkRules = new ChangeTrackingList(); } @@ -56,13 +57,15 @@ public ManagedHsmNetworkRuleSet() /// Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. /// The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. /// The list of IP address rules. + /// The list of service tags. /// The list of virtual network rules. /// Keeps track of any properties unknown to the library. - internal ManagedHsmNetworkRuleSet(ManagedHsmNetworkRuleBypassOption? bypass, ManagedHsmNetworkRuleAction? defaultAction, IList ipRules, IList virtualNetworkRules, IDictionary serializedAdditionalRawData) + internal ManagedHsmNetworkRuleSet(ManagedHsmNetworkRuleBypassOption? bypass, ManagedHsmNetworkRuleAction? defaultAction, IList ipRules, IList serviceTags, IList virtualNetworkRules, IDictionary serializedAdditionalRawData) { Bypass = bypass; DefaultAction = defaultAction; IPRules = ipRules; + ServiceTags = serviceTags; VirtualNetworkRules = virtualNetworkRules; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,6 +79,9 @@ internal ManagedHsmNetworkRuleSet(ManagedHsmNetworkRuleBypassOption? bypass, Man /// The list of IP address rules. [WirePath("ipRules")] public IList IPRules { get; } + /// The list of service tags. + [WirePath("serviceTags")] + public IList ServiceTags { get; } /// The list of virtual network rules. [WirePath("virtualNetworkRules")] public IList VirtualNetworkRules { get; } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmServiceTagRule.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmServiceTagRule.Serialization.cs new file mode 100644 index 000000000000..6f2277b25fa9 --- /dev/null +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmServiceTagRule.Serialization.cs @@ -0,0 +1,167 @@ +// 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.KeyVault.Models +{ + public partial class ManagedHsmServiceTagRule : 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(ManagedHsmServiceTagRule)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("tag"u8); + writer.WriteStringValue(Tag); + 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 + } + } + } + + ManagedHsmServiceTagRule 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(ManagedHsmServiceTagRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedHsmServiceTagRule(document.RootElement, options); + } + + internal static ManagedHsmServiceTagRule DeserializeManagedHsmServiceTagRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string tag = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tag"u8)) + { + tag = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedHsmServiceTagRule(tag, 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(Tag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tag)) + { + builder.Append(" tag: "); + if (Tag.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Tag}'''"); + } + else + { + builder.AppendLine($"'{Tag}'"); + } + } + } + + 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, AzureResourceManagerKeyVaultContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ManagedHsmServiceTagRule)} does not support writing '{options.Format}' format."); + } + } + + ManagedHsmServiceTagRule 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 DeserializeManagedHsmServiceTagRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedHsmServiceTagRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmServiceTagRule.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmServiceTagRule.cs new file mode 100644 index 000000000000..1cb70087bc58 --- /dev/null +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmServiceTagRule.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.KeyVault.Models +{ + /// A rule governing the accessibility of a managed hsm pool from a specific service tags. + public partial class ManagedHsmServiceTagRule + { + /// + /// 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 . + /// Name of the service tag. + /// is null. + public ManagedHsmServiceTagRule(string tag) + { + Argument.AssertNotNull(tag, nameof(tag)); + + Tag = tag; + } + + /// Initializes a new instance of . + /// Name of the service tag. + /// Keeps track of any properties unknown to the library. + internal ManagedHsmServiceTagRule(string tag, IDictionary serializedAdditionalRawData) + { + Tag = tag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ManagedHsmServiceTagRule() + { + } + + /// Name of the service tag. + [WirePath("tag")] + public string Tag { get; set; } + } +} diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs index d84152ab8ff1..5ff245ff4a28 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedHsmsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs index 9fbe32f3c0e7..28a5c9f20e38 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public MhsmPrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs index 02dff07e5128..b3ebc31c9c2b 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public MhsmPrivateLinkResourcesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs index 758c33f6a7ee..4c0ec35fca6d 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs @@ -32,7 +32,7 @@ public MhsmRegionsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 13a3bd432810..139bc5c0e004 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/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 ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 6b6f14faa13c..4bace6b72ef5 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/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 ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs index ba10e0538c8b..d469b770aae7 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs @@ -32,7 +32,7 @@ public SecretsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs index 42e0b468a8a9..bb9c6e099f8c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs @@ -32,7 +32,7 @@ public VaultsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md index 5a62f6f8e450..76ecfd09857e 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: KeyVault namespace: Azure.ResourceManager.KeyVault -require: https://github.com/Azure/azure-rest-api-specs/blob/b92fe44fbb8e415302342ecd6c2c5bb764da7949/specification/keyvault/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/402675202904b97229b067bf3b03ac8519de5125/specification/keyvault/resource-manager/readme.md #tag: package-2023-07 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultCollection.cs index 0f00cee5f9a2..f1c607b05cd9 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedKeyVaultCollection [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RetrieveADeletedVault() [Ignore("Only validating compilation of examples")] public async Task Exists_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_RetrieveADeletedVault() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultResource.cs index c3a3592fe443..f25ff5642c9b 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedKeyVaultResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DeletedKeyVaultResource [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Get_RetrieveADeletedVault() [Ignore("Only validating compilation of examples")] public async Task PurgeDeleted_PurgeADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/purgeDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/purgeDeletedVault.json // this example is just showing the usage of "Vaults_PurgeDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmCollection.cs index 4d2dda5caa6c..055fe20f1e2e 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedManagedHsmCollection [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RetrieveADeletedManagedHSM() [Ignore("Only validating compilation of examples")] public async Task Exists_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_RetrieveADeletedManagedHSM() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmResource.cs index 57a471c50b7e..6d633a64a9ed 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_DeletedManagedHsmResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DeletedManagedHsmResource [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Get_RetrieveADeletedManagedHSM() [Ignore("Only validating compilation of examples")] public async Task PurgeDeleted_PurgeAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/DeletedManagedHsm_Purge.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/DeletedManagedHsm_Purge.json // this example is just showing the usage of "ManagedHsms_PurgeDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultCollection.cs index f5a883e82a47..0633ba633911 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_KeyVaultCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateANewVaultOrUpdateAnExistingVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/createVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/createVault.json // this example is just showing the usage of "Vaults_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 @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateANewVaultOrUpdateAnExistingVault() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAVaultWithNetworkAcls() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/createVaultWithNetworkAcls.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/createVaultWithNetworkAcls.json // this example is just showing the usage of "Vaults_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 @@ -115,7 +115,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAVaultWithNetworkAcls() [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getVault.json // this example is just showing the usage of "Vaults_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 @@ -148,7 +148,7 @@ public async Task Get_RetrieveAVault() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVaultsInTheSpecifiedResourceGroup() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/listVaultByResourceGroup.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listVaultByResourceGroup.json // this example is just showing the usage of "Vaults_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 @@ -184,7 +184,7 @@ public async Task GetAll_ListVaultsInTheSpecifiedResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getVault.json // this example is just showing the usage of "Vaults_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 @@ -213,7 +213,7 @@ public async Task Exists_RetrieveAVault() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getVault.json // this example is just showing the usage of "Vaults_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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs index bc251a49b15e..14369d860be2 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_KeyVaultPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/putPrivateEndpointConnection.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 @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_KeyVaultPutPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Get_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getPrivateEndpointConnection.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 @@ -98,7 +98,7 @@ public async Task Get_KeyVaultGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_KeyVaultListPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/listPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetAll_KeyVaultListPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getPrivateEndpointConnection.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 @@ -164,7 +164,7 @@ public async Task Exists_KeyVaultGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getPrivateEndpointConnection.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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs index 8f11c569a7c3..6afd4f202893 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getPrivateEndpointConnection.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_KeyVaultGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_KeyVaultDeletePrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/deletePrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/deletePrivateEndpointConnection.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 @@ -83,7 +83,7 @@ public async Task Delete_KeyVaultDeletePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_KeyVaultPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/putPrivateEndpointConnection.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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultResource.cs index e66aaee2593f..dd145ab4fc93 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultResource.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultResource [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getVault.json // this example is just showing the usage of "Vaults_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_RetrieveAVault() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/deleteVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/deleteVault.json // this example is just showing the usage of "Vaults_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_DeleteAVault() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnExistingVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/updateVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/updateVault.json // this example is just showing the usage of "Vaults_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_UpdateAnExistingVault() [Ignore("Only validating compilation of examples")] public async Task UpdateAccessPolicy_AddAnAccessPolicyOrUpdateAnAccessPolicyWithNewPermissions() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/updateAccessPoliciesAdd.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/updateAccessPoliciesAdd.json // this example is just showing the usage of "Vaults_UpdateAccessPolicy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 UpdateAccessPolicy_AddAnAccessPolicyOrUpdateAnAccessPolicyWith [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinkResources_KeyVaultListPrivateLinkResources() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/listPrivateLinkResources.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListByVault" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretCollection.cs index 415724e0fca9..301dccff1284 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultSecretCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/createSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/createSecret.json // this example is just showing the usage of "Secrets_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateASecret() [Ignore("Only validating compilation of examples")] public async Task Get_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getSecret.json // this example is just showing the usage of "Secrets_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_GetASecret() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSecretsInTheVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/listSecrets.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listSecrets.json // this example is just showing the usage of "Secrets_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_ListSecretsInTheVault() [Ignore("Only validating compilation of examples")] public async Task Exists_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getSecret.json // this example is just showing the usage of "Secrets_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_GetASecret() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getSecret.json // this example is just showing the usage of "Secrets_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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretResource.cs index 0d7a238d112f..17cddd5cbcab 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_KeyVaultSecretResource.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultSecretResource [Ignore("Only validating compilation of examples")] public async Task Get_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/getSecret.json // this example is just showing the usage of "Secrets_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_GetASecret() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/updateSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/updateSecret.json // this example is just showing the usage of "Secrets_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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmCollection.cs index 9413eac31976..9ef567eb1707 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ManagedHsmCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateANewManagedHSMPoolOrUpdateAnExistingManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_CreateOrUpdate.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_CreateOrUpdate.json // this example is just showing the usage of "ManagedHsms_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 @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_CreateANewManagedHSMPoolOrUpdateAnExistingManag [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_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 @@ -105,7 +105,7 @@ public async Task Get_RetrieveAManagedHSMPool() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedHSMPoolsInAResourceGroup() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_ListByResourceGroup.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_ListByResourceGroup.json // this example is just showing the usage of "ManagedHsms_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 @@ -140,7 +140,7 @@ public async Task GetAll_ListManagedHSMPoolsInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_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 @@ -169,7 +169,7 @@ public async Task Exists_RetrieveAManagedHSMPool() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs index 26fa0950d8c2..a27533989cd6 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedHsmPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ManagedHsmPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_putPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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_ManagedHsmPutPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Get_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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_ManagedHsmGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedHSMPoolsInASubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_ListPrivateEndpointConnectionsByResource.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_ListPrivateEndpointConnectionsByResource.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListManagedHSMPoolsInASubscription() [Ignore("Only validating compilation of examples")] public async Task Exists_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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_ManagedHsmGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs index e3c526a26959..dcf1f4adf5a2 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedHsmPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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_ManagedHsmGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_ManagedHsmDeletePrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_deletePrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_deletePrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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 @@ -83,7 +83,7 @@ public async Task Delete_ManagedHsmDeletePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_ManagedHsmPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_putPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmResource.cs index 769a7ca2f109..29e069b36555 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_ManagedHsmResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedHsmResource [Ignore("Only validating compilation of examples")] public async Task Get_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_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_RetrieveAManagedHSMPool() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_Delete.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_Delete.json // this example is just showing the usage of "ManagedHsms_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_DeleteAManagedHSMPool() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnExistingManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_Update.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_Update.json // this example is just showing the usage of "ManagedHsms_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 @@ -116,7 +116,7 @@ public async Task Update_UpdateAnExistingManagedHSMPool() [Ignore("Only validating compilation of examples")] public async Task GetMHSMPrivateLinkResourcesByManagedHsmResource_KeyVaultListPrivateLinkResources() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_listPrivateLinkResources.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_listPrivateLinkResources.json // this example is just showing the usage of "MHSMPrivateLinkResources_ListByManagedHsmResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetMHSMPrivateLinkResourcesByManagedHsmResource_KeyVaultListPr [Ignore("Only validating compilation of examples")] public async Task GetMHSMRegionsByResource_ListManagedHSMPoolsInASubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_ListRegionsByResource.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_ListRegionsByResource.json // this example is just showing the usage of "MHSMRegions_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 52920fa3120b..0cae07e12992 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetKeyVaults_ListVaultsInTheSpecifiedSubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/listVaultBySubscription.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listVaultBySubscription.json // this example is just showing the usage of "Vaults_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 @@ -53,7 +53,7 @@ public async Task GetKeyVaults_ListVaultsInTheSpecifiedSubscription() [Ignore("Only validating compilation of examples")] public async Task GetDeletedKeyVaults_ListDeletedVaultsInTheSpecifiedSubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/listDeletedVaults.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listDeletedVaults.json // this example is just showing the usage of "Vaults_ListDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task GetDeletedKeyVaults_ListDeletedVaultsInTheSpecifiedSubscriptio [Ignore("Only validating compilation of examples")] public async Task CheckKeyVaultNameAvailability_ValidateAVaultName() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/checkVaultNameAvailability.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/checkVaultNameAvailability.json // this example is just showing the usage of "Vaults_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 @@ -109,7 +109,7 @@ public async Task CheckKeyVaultNameAvailability_ValidateAVaultName() [Ignore("Only validating compilation of examples")] public async Task GetManagedHsms_ListManagedHSMPoolsInASubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_ListBySubscription.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_ListBySubscription.json // this example is just showing the usage of "ManagedHsms_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 @@ -140,7 +140,7 @@ public async Task GetManagedHsms_ListManagedHSMPoolsInASubscription() [Ignore("Only validating compilation of examples")] public async Task GetDeletedManagedHsms_ListDeletedManagedHSMsInTheSpecifiedSubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/DeletedManagedHsm_List.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/DeletedManagedHsm_List.json // this example is just showing the usage of "ManagedHsms_ListDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task GetDeletedManagedHsms_ListDeletedManagedHSMsInTheSpecifiedSubs [Ignore("Only validating compilation of examples")] public async Task CheckManagedHsmNameAvailability_ValidateAManagedHsmName() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2024-11-01/examples/ManagedHsm_checkMhsmNameAvailability.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/ManagedHsm_checkMhsmNameAvailability.json // this example is just showing the usage of "ManagedHsms_CheckManagedHsmNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs index 9dca60ff7a75..39f3219908ff 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.Security.KeyVault.Administration /// Client options for . internal partial class KeyVaultRestClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V7_6; + private const ServiceVersion LatestVersion = ServiceVersion.V2025_06_01_Preview; /// Initializes a new instance of KeyVaultRestClientOptions. /// The service version. @@ -24,6 +24,7 @@ public KeyVaultRestClientOptions(ServiceVersion version = LatestVersion) ServiceVersion.V7_5 => "7.5", ServiceVersion.V7_6_Preview_2 => "7.6-preview.2", ServiceVersion.V7_6 => "7.6", + ServiceVersion.V2025_06_01_Preview => "2025-06-01-preview", _ => throw new NotSupportedException() }; } @@ -38,7 +39,9 @@ internal enum ServiceVersion /// The 7.6-preview.2 API version. V7_6_Preview_2 = 2, /// The 7.6 API version. - V7_6 = 3 + V7_6 = 3, + /// The 2025-06-01-preview API version. + V2025_06_01_Preview = 4 } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tsp-location.yaml b/sdk/keyvault/Azure.Security.KeyVault.Administration/tsp-location.yaml index 6bdb7f482858..10d384063a39 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tsp-location.yaml +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.Administration -commit: ec896c71d24c943806bf4e5c8f9779aecdd9ca5a +commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json diff --git a/sdk/monitor/Azure.Monitor.Ingestion/tsp-location.yaml b/sdk/monitor/Azure.Monitor.Ingestion/tsp-location.yaml index 3dd792ade846..2726e3edcaaa 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/tsp-location.yaml +++ b/sdk/monitor/Azure.Monitor.Ingestion/tsp-location.yaml @@ -1,4 +1,4 @@ repo: Azure/azure-rest-api-specs directory: specification/monitor/Monitor.Ingestion -commit: 4081040baf95813d6ae4fac980d11d077ed113e6 +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-emitter-package.json" diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/AzureMonitorTransmitter.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/AzureMonitorTransmitter.cs index 0e7a0fc62a47..012b333fa70c 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/AzureMonitorTransmitter.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/AzureMonitorTransmitter.cs @@ -179,7 +179,8 @@ await _applicationInsightsRestClient.InternalTrackAsync(telemetryItems, cancella if (result == ExportResult.Failure && _fileBlobProvider != null) { _transmissionStateManager.EnableBackOff(httpMessage.HasResponse ? httpMessage.Response : null); - result = HttpPipelineHelper.HandleFailures(httpMessage, _fileBlobProvider, _connectionVars, origin, _isAadEnabled); + var transmissionResult = HttpPipelineHelper.ProcessTransmissionResult(httpMessage, _fileBlobProvider, null, _connectionVars, origin, _isAadEnabled); + result = transmissionResult.ExportResult; } else { diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/HttpPipelineHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/HttpPipelineHelper.cs index c9d2a9d4c7bc..fcfd6707cb7c 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/HttpPipelineHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/HttpPipelineHelper.cs @@ -2,20 +2,19 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Text; using System.Text.Json; using System.Threading; - using Azure.Core; +using Azure.Monitor.OpenTelemetry.Exporter.Internals.ConnectionString; +using Azure.Monitor.OpenTelemetry.Exporter.Internals.Diagnostics; +using Azure.Monitor.OpenTelemetry.Exporter.Internals.PersistentStorage; using Azure.Monitor.OpenTelemetry.Exporter.Models; using OpenTelemetry; using OpenTelemetry.PersistentStorage.Abstractions; -using Azure.Monitor.OpenTelemetry.Exporter.Internals.PersistentStorage; -using System.Diagnostics.CodeAnalysis; -using Azure.Monitor.OpenTelemetry.Exporter.Internals.ConnectionString; -using Azure.Monitor.OpenTelemetry.Exporter.Internals.Diagnostics; -using System.Collections.Generic; namespace Azure.Monitor.OpenTelemetry.Exporter.Internals { @@ -25,6 +24,26 @@ internal static class HttpPipelineHelper internal static int MinimumRetryInterval = 60000; + private static TransmissionResult CreateTransmissionResult() => new() + { + ExportResult = ExportResult.Failure, + WillRetry = false, + SavedToStorage = false, + DeletedBlob = false, + StatusCode = 0, + ItemsAccepted = null + }; + + private static bool IsRetriableStatus(int statusCode) => statusCode == ResponseStatusCodes.RequestTimeout + || statusCode == ResponseStatusCodes.ResponseCodeTooManyRequests + || statusCode == ResponseStatusCodes.ResponseCodeTooManyRequestsAndRefreshCache + || statusCode == ResponseStatusCodes.Unauthorized + || statusCode == ResponseStatusCodes.Forbidden + || statusCode == ResponseStatusCodes.InternalServerError + || statusCode == ResponseStatusCodes.BadGateway + || statusCode == ResponseStatusCodes.ServiceUnavailable + || statusCode == ResponseStatusCodes.GatewayTimeout; + internal static int GetItemsAccepted(HttpMessage message) { return TryGetTrackResponse(message, out var trackResponse) @@ -180,118 +199,130 @@ internal static ExportResult IsSuccess(HttpMessage httpMessage) return ExportResult.Failure; } - internal static ExportResult HandleFailures(HttpMessage httpMessage, PersistentBlobProvider blobProvider, ConnectionVars connectionVars, TelemetryItemOrigin origin, bool isAadEnabled) + /// + /// Centralized handling of a transmission result (exporter or storage origin). + /// Decides whether to persist for retry, delete existing storage blob, and logs telemetry. + /// + /// The HTTP message (request/response). + /// Optional blob provider used to save new blobs. + /// Existing blob (when retransmitting from storage). + /// Connection vars for logging. + /// Origin of telemetry (Exporter vs Storage). + /// If AAD auth is enabled. + /// TransmissionResult describing actions taken. + internal static TransmissionResult ProcessTransmissionResult(HttpMessage httpMessage, PersistentBlobProvider? blobProvider, PersistentBlob? blob, ConnectionVars connectionVars, TelemetryItemOrigin origin, bool isAadEnabled) { - ExportResult result = ExportResult.Failure; - int statusCode = 0; - byte[]? content; + var result = CreateTransmissionResult(); if (!httpMessage.HasResponse) { - // HttpRequestException - if (TryGetRequestContent(httpMessage.Request.Content, out content)) + if (origin != TelemetryItemOrigin.Storage) { - result = blobProvider.SaveTelemetry(content); + HandleNetworkFailure(httpMessage, blobProvider, origin, ref result); } + + AzureMonitorExporterEventSource.Log.TransmissionFailed( + origin: origin, + statusCode: result.StatusCode, + isAadEnabled: isAadEnabled, + connectionVars: connectionVars, + requestEndpoint: httpMessage.Request.Uri.Host, + willRetry: result.WillRetry, + response: null); + + return result; + } + + result.StatusCode = httpMessage.Response.Status; + + if (result.StatusCode == ResponseStatusCodes.PartialSuccess) + { + HandlePartialSuccess(httpMessage, blobProvider, blob, origin, ref result); + } + else if (IsRetriableStatus(result.StatusCode)) + { + HandleRetriableFailure(httpMessage, blobProvider, origin, ref result); } else { - statusCode = httpMessage.Response.Status; - switch (statusCode) - { - case ResponseStatusCodes.PartialSuccess: - // Parse retry-after header - // Send Failed Messages To Storage - if (TryGetTrackResponse(httpMessage, out TrackResponse? trackResponse)) - { - content = HttpPipelineHelper.GetPartialContentForRetry(trackResponse, httpMessage.Request.Content); - if (content != null) - { - result = blobProvider.SaveTelemetry(content); - } - } - break; - case ResponseStatusCodes.RequestTimeout: - case ResponseStatusCodes.ResponseCodeTooManyRequests: - case ResponseStatusCodes.ResponseCodeTooManyRequestsAndRefreshCache: - case ResponseStatusCodes.Unauthorized: - case ResponseStatusCodes.Forbidden: - case ResponseStatusCodes.InternalServerError: - case ResponseStatusCodes.BadGateway: - case ResponseStatusCodes.ServiceUnavailable: - case ResponseStatusCodes.GatewayTimeout: - // Send Messages To Storage - if (TryGetRequestContent(httpMessage.Request.Content, out content)) - { - result = blobProvider.SaveTelemetry(content); - } - break; - default: - // Log Non-Retriable Status and don't retry or store; - break; - } + HandleNonRetriableFailure(blob, origin, ref result); } AzureMonitorExporterEventSource.Log.TransmissionFailed( origin: origin, - statusCode: statusCode, + statusCode: result.StatusCode, isAadEnabled: isAadEnabled, connectionVars: connectionVars, requestEndpoint: httpMessage.Request.Uri.Host, - willRetry: (result == ExportResult.Success), - response: httpMessage.HasResponse ? httpMessage.Response : null); + willRetry: result.WillRetry, + response: httpMessage.Response); return result; } - internal static void HandleFailures(HttpMessage httpMessage, PersistentBlob blob, PersistentBlobProvider blobProvider, ConnectionVars connectionVars, bool isAadEnabled) + private static void HandleNetworkFailure(HttpMessage httpMessage, PersistentBlobProvider? blobProvider, TelemetryItemOrigin origin, ref TransmissionResult result) + { + if (blobProvider != null && TryGetRequestContent(httpMessage.Request.Content, out var content)) + { + result.ExportResult = blobProvider.SaveTelemetry(content); + result.WillRetry = (result.ExportResult == ExportResult.Success); + result.SavedToStorage = result.WillRetry; + } + } + + private static void HandlePartialSuccess(HttpMessage httpMessage, PersistentBlobProvider? blobProvider, PersistentBlob? blob, TelemetryItemOrigin origin, ref TransmissionResult result) { - int statusCode = 0; - bool willRetry = true; + if (!TryGetTrackResponse(httpMessage, out TrackResponse? trackResponse)) + { + return; + } + + result.ItemsAccepted = trackResponse.ItemsAccepted; + var partialContent = GetPartialContentForRetry(trackResponse, httpMessage.Request.Content); + if (partialContent == null || blobProvider == null) + { + return; + } - if (httpMessage.HasResponse) + if (origin == TelemetryItemOrigin.Storage && blob != null) { - statusCode = httpMessage.Response.Status; - switch (statusCode) + if (blob.TryDelete()) { - case ResponseStatusCodes.PartialSuccess: - // Parse retry-after header - // Send Failed Messages To Storage - // Delete existing file - if (TryGetTrackResponse(httpMessage, out TrackResponse? trackResponse)) - { - var content = GetPartialContentForRetry(trackResponse, httpMessage.Request.Content); - if (content != null) - { - blob.TryDelete(); - blobProvider.SaveTelemetry(content); - } - } - break; - case ResponseStatusCodes.RequestTimeout: - case ResponseStatusCodes.ResponseCodeTooManyRequests: - case ResponseStatusCodes.ResponseCodeTooManyRequestsAndRefreshCache: - case ResponseStatusCodes.Unauthorized: - case ResponseStatusCodes.Forbidden: - case ResponseStatusCodes.InternalServerError: - case ResponseStatusCodes.BadGateway: - case ResponseStatusCodes.ServiceUnavailable: - case ResponseStatusCodes.GatewayTimeout: - break; - default: - willRetry = false; - break; + result.DeletedBlob = true; } } - AzureMonitorExporterEventSource.Log.TransmissionFailed( - origin: TelemetryItemOrigin.Storage, - isAadEnabled: isAadEnabled, - statusCode: statusCode, - connectionVars: connectionVars, - requestEndpoint: httpMessage.Request.Uri.Host, - willRetry: willRetry, - response: httpMessage.HasResponse ? httpMessage.Response : null); + result.ExportResult = blobProvider.SaveTelemetry(partialContent); + result.WillRetry = (result.ExportResult == ExportResult.Success); + result.SavedToStorage = result.WillRetry; + } + + private static void HandleRetriableFailure(HttpMessage httpMessage, PersistentBlobProvider? blobProvider, TelemetryItemOrigin origin, ref TransmissionResult result) + { + if (origin != TelemetryItemOrigin.Storage) + { + if (blobProvider != null && TryGetRequestContent(httpMessage.Request.Content, out var content)) + { + result.ExportResult = blobProvider.SaveTelemetry(content); + result.WillRetry = (result.ExportResult == ExportResult.Success); + result.SavedToStorage = result.WillRetry; + } + } + else if (origin == TelemetryItemOrigin.Storage) + { + result.WillRetry = true; + } + } + + private static void HandleNonRetriableFailure(PersistentBlob? blob, TelemetryItemOrigin origin, ref TransmissionResult result) + { + if (origin == TelemetryItemOrigin.Storage && blob != null) + { + if (blob.TryDelete()) + { + result.DeletedBlob = true; + } + } } } } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmissionResult.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmissionResult.cs new file mode 100644 index 000000000000..54380d1bb67d --- /dev/null +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmissionResult.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using OpenTelemetry; + +namespace Azure.Monitor.OpenTelemetry.Exporter.Internals +{ + /// + /// Represents the unified result of attempting to transmit telemetry (exporter or from storage). + /// + internal struct TransmissionResult + { + internal ExportResult ExportResult { get; set; } + + internal bool WillRetry { get; set; } + + internal bool SavedToStorage { get; set; } + + internal bool DeletedBlob { get; set; } + + internal int StatusCode { get; set; } + + internal int? ItemsAccepted { get; set; } + } +} diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmitFromStorageHandler.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmitFromStorageHandler.cs index e8ab78c8a5c0..e04861b041f4 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmitFromStorageHandler.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/TransmitFromStorageHandler.cs @@ -70,7 +70,7 @@ internal void TransmitFromStorage(object? sender, ElapsedEventArgs? e) else { _transmissionStateManager.EnableBackOff(httpMessage.HasResponse ? httpMessage.Response : null); - HttpPipelineHelper.HandleFailures(httpMessage, blob, _blobProvider, _connectionVars, _isAadEnabled); + HttpPipelineHelper.ProcessTransmissionResult(httpMessage, _blobProvider, blob, _connectionVars, TelemetryItemOrigin.Storage, _isAadEnabled); break; } } diff --git a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md index 695f5158b628..716d13a17fcb 100644 --- a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md +++ b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md @@ -1,15 +1,15 @@ # Release History -## 1.12.0-beta.1 (Unreleased) +## 1.12.0 (2025-09-19) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2024-07-01' to 'package-2024-10-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/cbfe154470792d8aea255885a4a96609603982cc/specification/network/resource-manager/readme.md. ### Other Changes +- Upgraded Azure.Core from 1.47.3 to 1.48.0 + ## 1.11.3 (2025-08-21) ### Features Added @@ -458,4 +458,4 @@ IPsecPolicy policy = new IPsecPolicy( IkeIntegrity.Sha1, DHGroup.DHGroup2, PfsGroup.Pfs1); -``` +``` \ No newline at end of file diff --git a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.net8.0.cs b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.net8.0.cs index 643275c15ec6..85943adc19b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.net8.0.cs +++ b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.net8.0.cs @@ -331,6 +331,7 @@ public AzureFirewallData() { } public System.Collections.Generic.IList ApplicationRuleCollections { get { throw null; } } public Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration AutoscaleConfiguration { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FirewallPolicyId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HubIPAddresses HubIPAddresses { get { throw null; } set { } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } @@ -371,6 +372,8 @@ protected AzureFirewallResource() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task PacketCaptureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task PacketCaptureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PacketCaptureOperation(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PacketCaptureOperationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent 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; } @@ -3304,6 +3307,8 @@ public static partial class NetworkExtensions public static Azure.ResourceManager.Network.NetworkSecurityPerimeterCollection GetNetworkSecurityPerimeters(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkSecurityPerimeters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNetworkSecurityPerimetersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetNetworkSecurityPerimeterServiceTags(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkSecurityPerimeterServiceTagsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Network.NetworkVerifierWorkspaceResource GetNetworkVerifierWorkspaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNetworkVirtualAppliance(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkVirtualApplianceName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkVirtualApplianceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkVirtualApplianceName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4917,8 +4922,10 @@ public NetworkVirtualApplianceData() { } public System.Collections.Generic.IReadOnlyList InboundSecurityRules { get { throw null; } } public System.Collections.Generic.IList InternetIngressPublicIPs { get { throw null; } } public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + public System.Collections.Generic.IList NvaInterfaceConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties NvaSku { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties PartnerManagedResource { get { throw null; } set { } } + public System.Net.IPAddress PrivateIPAddress { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string SshPublicKey { get { throw null; } set { } } public long? VirtualApplianceAsn { get { throw null; } set { } } @@ -8651,6 +8658,8 @@ protected MockableNetworkSubscriptionResource() { } public virtual Azure.AsyncPageable GetNetworkSecurityPerimeterAssociableResourceTypesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkSecurityPerimeters(int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetworkSecurityPerimetersAsync(int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetNetworkSecurityPerimeterServiceTags(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetNetworkSecurityPerimeterServiceTagsAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkVirtualAppliances(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetworkVirtualAppliancesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkVirtualApplianceSku(string skuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -9063,6 +9072,9 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? CookieBasedAffinity { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public string HostName { get { throw null; } set { } } + public bool? IsDedicatedBackendConnectionEnabled { get { throw null; } set { } } + public bool? IsValidateCertChainAndExpiryEnabled { get { throw null; } set { } } + public bool? IsValidateSniEnabled { get { throw null; } set { } } public string Path { get { throw null; } set { } } public bool? PickHostNameFromBackendAddress { get { throw null; } set { } } public int? Port { get { throw null; } set { } } @@ -9071,6 +9083,7 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? RequestTimeoutInSeconds { get { throw null; } set { } } + public string SniName { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10257,7 +10270,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthOnDemand ApplicationGatewayBackendHealthOnDemand(Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool backendAddressPool = null, Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings = null) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthPool ApplicationGatewayBackendHealthPool(Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool backendAddressPool = null, System.Collections.Generic.IEnumerable backendHttpSettingsCollection = null) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServer ApplicationGatewayBackendHealthServer(string address = null, Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData ipConfiguration = null, Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth? health = default(Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth?), string healthProbeLog = null) { throw null; } - public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? port = default(int?), Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol = default(Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol?), Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = default(Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity?), int? requestTimeoutInSeconds = default(int?), Azure.Core.ResourceIdentifier probeId = null, System.Collections.Generic.IEnumerable authenticationCertificates = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining connectionDraining = null, string hostName = null, bool? pickHostNameFromBackendAddress = default(bool?), string affinityCookieName = null, bool? probeEnabled = default(bool?), string path = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, int? port, Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol, Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity, int? requestTimeoutInSeconds, Azure.Core.ResourceIdentifier probeId, System.Collections.Generic.IEnumerable authenticationCertificates, System.Collections.Generic.IEnumerable trustedRootCertificates, Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining connectionDraining, string hostName, bool? pickHostNameFromBackendAddress, string affinityCookieName, bool? probeEnabled, string path, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? port = default(int?), Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol = default(Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol?), Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = default(Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity?), int? requestTimeoutInSeconds = default(int?), Azure.Core.ResourceIdentifier probeId = null, System.Collections.Generic.IEnumerable authenticationCertificates = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining connectionDraining = null, string hostName = null, bool? pickHostNameFromBackendAddress = default(bool?), string affinityCookieName = null, bool? probeEnabled = default(bool?), string path = null, bool? isDedicatedBackendConnectionEnabled = default(bool?), bool? isValidateCertChainAndExpiryEnabled = default(bool?), bool? isValidateSniEnabled = default(bool?), string sniName = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendSettings ApplicationGatewayBackendSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? port = default(int?), Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol = default(Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol?), int? timeoutInSeconds = default(int?), Azure.Core.ResourceIdentifier probeId = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, string hostName = null, bool? pickHostNameFromBackendAddress = default(bool?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.ApplicationGatewayData ApplicationGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable availabilityZones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Network.Models.ApplicationGatewaySku sku = null, Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy sslPolicy = null, Azure.ResourceManager.Network.Models.ApplicationGatewayOperationalState? operationalState = default(Azure.ResourceManager.Network.Models.ApplicationGatewayOperationalState?), System.Collections.Generic.IEnumerable gatewayIPConfigurations = null, System.Collections.Generic.IEnumerable authenticationCertificates = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, System.Collections.Generic.IEnumerable trustedClientCertificates = null, System.Collections.Generic.IEnumerable sslCertificates = null, System.Collections.Generic.IEnumerable frontendIPConfigurations = null, System.Collections.Generic.IEnumerable frontendPorts = null, System.Collections.Generic.IEnumerable probes = null, System.Collections.Generic.IEnumerable backendAddressPools = null, System.Collections.Generic.IEnumerable backendHttpSettingsCollection = null, System.Collections.Generic.IEnumerable backendSettingsCollection = null, System.Collections.Generic.IEnumerable httpListeners = null, System.Collections.Generic.IEnumerable listeners = null, System.Collections.Generic.IEnumerable sslProfiles = null, System.Collections.Generic.IEnumerable urlPathMaps = null, System.Collections.Generic.IEnumerable requestRoutingRules = null, System.Collections.Generic.IEnumerable routingRules = null, System.Collections.Generic.IEnumerable rewriteRuleSets = null, System.Collections.Generic.IEnumerable redirectConfigurations = null, Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration = null, Azure.Core.ResourceIdentifier firewallPolicyId = null, bool? enableHttp2 = default(bool?), bool? enableFips = default(bool?), Azure.ResourceManager.Network.Models.ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration = null, System.Collections.Generic.IEnumerable privateLinkConfigurations = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), System.Collections.Generic.IEnumerable customErrorConfigurations = null, bool? forceFirewallPolicyAssociation = default(bool?), System.Collections.Generic.IEnumerable loadDistributionPolicies = null, Azure.ResourceManager.Network.Models.ApplicationGatewayGlobalConfiguration globalConfiguration = null, Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? defaultPredefinedSslPolicy = default(Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName?)) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallManifestRuleSet ApplicationGatewayFirewallManifestRuleSet(string ruleSetType = null, string ruleSetVersion = null, Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption? status = default(Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption?), System.Collections.Generic.IEnumerable tiers = null, System.Collections.Generic.IEnumerable ruleGroups = null) { throw null; } @@ -10299,14 +10314,17 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.AvailableProvidersListState AvailableProvidersListState(string stateName = null, System.Collections.Generic.IEnumerable providers = null, System.Collections.Generic.IEnumerable cities = null) { throw null; } public static Azure.ResourceManager.Network.Models.AvailableServiceAlias AvailableServiceAlias(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string resourceName = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleCollectionData AzureFirewallApplicationRuleCollectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? priority = default(int?), Azure.ResourceManager.Network.Models.AzureFirewallRCActionType? actionType = default(Azure.ResourceManager.Network.Models.AzureFirewallRCActionType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable zones = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable applicationRuleCollections = null, System.Collections.Generic.IEnumerable natRuleCollections = null, System.Collections.Generic.IEnumerable networkRuleCollections = null, System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode = default(Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode?), Azure.Core.ResourceIdentifier virtualHubId = null, Azure.Core.ResourceIdentifier firewallPolicyId = null, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses = null, System.Collections.Generic.IEnumerable ipGroups = null, Azure.ResourceManager.Network.Models.AzureFirewallSku sku = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration autoscaleConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, Azure.ETag? etag, System.Collections.Generic.IEnumerable applicationRuleCollections, System.Collections.Generic.IEnumerable natRuleCollections, System.Collections.Generic.IEnumerable networkRuleCollections, System.Collections.Generic.IEnumerable ipConfigurations, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode, Azure.Core.ResourceIdentifier virtualHubId, Azure.Core.ResourceIdentifier firewallPolicyId, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses, System.Collections.Generic.IEnumerable ipGroups, Azure.ResourceManager.Network.Models.AzureFirewallSku sku, System.Collections.Generic.IDictionary additionalProperties) { throw null; } - public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable applicationRuleCollections = null, System.Collections.Generic.IEnumerable natRuleCollections = null, System.Collections.Generic.IEnumerable networkRuleCollections = null, System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode = default(Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode?), Azure.Core.ResourceIdentifier virtualHubId = null, Azure.Core.ResourceIdentifier firewallPolicyId = null, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses = null, System.Collections.Generic.IEnumerable ipGroups = null, Azure.ResourceManager.Network.Models.AzureFirewallSku sku = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration autoscaleConfiguration = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, Azure.ETag? etag, System.Collections.Generic.IEnumerable applicationRuleCollections, System.Collections.Generic.IEnumerable natRuleCollections, System.Collections.Generic.IEnumerable networkRuleCollections, System.Collections.Generic.IEnumerable ipConfigurations, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode, Azure.Core.ResourceIdentifier virtualHubId, Azure.Core.ResourceIdentifier firewallPolicyId, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses, System.Collections.Generic.IEnumerable ipGroups, Azure.ResourceManager.Network.Models.AzureFirewallSku sku, System.Collections.Generic.IDictionary additionalProperties, Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration autoscaleConfiguration) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallFqdnTag AzureFirewallFqdnTag(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string fqdnTagName = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration AzureFirewallIPConfiguration(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string privateIPAddress = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallIPGroups AzureFirewallIPGroups(Azure.Core.ResourceIdentifier id = null, string changeNumber = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallNatRuleCollectionData AzureFirewallNatRuleCollectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? priority = default(int?), Azure.ResourceManager.Network.Models.AzureFirewallNatRCActionType? actionType = default(Azure.ResourceManager.Network.Models.AzureFirewallNatRCActionType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleCollectionData AzureFirewallNetworkRuleCollectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? priority = default(int?), Azure.ResourceManager.Network.Models.AzureFirewallRCActionType? actionType = default(Azure.ResourceManager.Network.Models.AzureFirewallRCActionType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResult AzureFirewallPacketCaptureResult(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode? statusCode = default(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode?), string message = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureReachabilityReport AzureReachabilityReport(string aggregationLevel = null, Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation providerLocation = null, System.Collections.Generic.IEnumerable reachabilityReport = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureReachabilityReportContent AzureReachabilityReportContent(Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation providerLocation = null, System.Collections.Generic.IEnumerable providers = null, System.Collections.Generic.IEnumerable azureLocations = null, System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset endOn = default(System.DateTimeOffset)) { throw null; } public static Azure.ResourceManager.Network.Models.AzureReachabilityReportItem AzureReachabilityReportItem(string provider = null, Azure.Core.AzureLocation? azureLocation = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable latencies = null) { throw null; } @@ -10530,6 +10548,7 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.NetworkSecurityPerimeterLoggingConfigurationData NetworkSecurityPerimeterLoggingConfigurationData(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 enabledLogCategories = null, string version = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterPatch NetworkSecurityPerimeterPatch(Azure.Core.ResourceIdentifier id = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.Network.NetworkSecurityPerimeterProfileData NetworkSecurityPerimeterProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string accessRulesVersion = null, string diagnosticSettingsVersion = null) { throw null; } + public static Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterServiceTags NetworkSecurityPerimeterServiceTags(System.Collections.Generic.IEnumerable serviceTags = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkSecurityRulesEvaluationResult NetworkSecurityRulesEvaluationResult(string name = null, bool? protocolMatched = default(bool?), bool? sourceMatched = default(bool?), bool? sourcePortMatched = default(bool?), bool? destinationMatched = default(bool?), bool? destinationPortMatched = default(bool?)) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkTopology NetworkTopology(string id = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable resources = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkTrackedResourceData NetworkTrackedResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null) { throw null; } @@ -10544,7 +10563,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku, string addressPrefix, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs, Azure.Core.ResourceIdentifier virtualHubId, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, System.Collections.Generic.IEnumerable virtualApplianceNics, System.Collections.Generic.IEnumerable additionalNics, System.Collections.Generic.IEnumerable internetIngressPublicIPs, System.Collections.Generic.IEnumerable virtualApplianceSites, System.Collections.Generic.IEnumerable virtualApplianceConnections, System.Collections.Generic.IEnumerable inboundSecurityRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string deploymentType, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku, string addressPrefix, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs, Azure.Core.ResourceIdentifier virtualHubId, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, System.Collections.Generic.IEnumerable virtualApplianceNics, System.Collections.Generic.IEnumerable additionalNics, System.Collections.Generic.IEnumerable virtualApplianceSites, System.Collections.Generic.IEnumerable virtualApplianceConnections, System.Collections.Generic.IEnumerable inboundSecurityRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string deploymentType, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource) { throw null; } - public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku = null, string addressPrefix = null, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs = null, Azure.Core.ResourceIdentifier virtualHubId = null, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs = null, string cloudInitConfiguration = null, long? virtualApplianceAsn = default(long?), string sshPublicKey = null, System.Collections.Generic.IEnumerable virtualApplianceNics = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, System.Collections.Generic.IEnumerable additionalNics = null, System.Collections.Generic.IEnumerable internetIngressPublicIPs = null, System.Collections.Generic.IEnumerable virtualApplianceSites = null, System.Collections.Generic.IEnumerable virtualApplianceConnections = null, System.Collections.Generic.IEnumerable inboundSecurityRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string deploymentType = null, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation = null, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku, string addressPrefix, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs, Azure.Core.ResourceIdentifier virtualHubId, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, System.Collections.Generic.IEnumerable virtualApplianceNics, System.Collections.Generic.IEnumerable networkInterfaceConfigurations, System.Collections.Generic.IEnumerable additionalNics, System.Collections.Generic.IEnumerable internetIngressPublicIPs, System.Collections.Generic.IEnumerable virtualApplianceSites, System.Collections.Generic.IEnumerable virtualApplianceConnections, System.Collections.Generic.IEnumerable inboundSecurityRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string deploymentType, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource) { throw null; } + public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku = null, string addressPrefix = null, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs = null, Azure.Core.ResourceIdentifier virtualHubId = null, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs = null, string cloudInitConfiguration = null, long? virtualApplianceAsn = default(long?), string sshPublicKey = null, System.Collections.Generic.IEnumerable virtualApplianceNics = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, System.Collections.Generic.IEnumerable additionalNics = null, System.Collections.Generic.IEnumerable internetIngressPublicIPs = null, System.Collections.Generic.IEnumerable virtualApplianceSites = null, System.Collections.Generic.IEnumerable virtualApplianceConnections = null, System.Collections.Generic.IEnumerable inboundSecurityRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string deploymentType = null, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation = null, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource = null, System.Collections.Generic.IEnumerable nvaInterfaceConfigurations = null, System.Net.IPAddress privateIPAddress = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceId NetworkVirtualApplianceInstanceId(int? instanceId = default(int?)) { throw null; } public static Azure.ResourceManager.Network.NetworkVirtualApplianceSkuData NetworkVirtualApplianceSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), string vendor = null, System.Collections.Generic.IEnumerable availableVersions = null, System.Collections.Generic.IEnumerable availableScaleUnits = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkVirtualApplianceSkuInstances NetworkVirtualApplianceSkuInstances(string scaleUnit = null, int? instanceCount = default(int?)) { throw null; } @@ -11125,6 +11146,63 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureFirewallPacketCaptureOperationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureFirewallPacketCaptureOperationType(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType Start { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType Status { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType Stop { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType 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.Network.Models.AzureFirewallPacketCaptureOperationType left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AzureFirewallPacketCaptureResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AzureFirewallPacketCaptureResult() { } + public string Message { get { throw null; } } + public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode? StatusCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResult 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.Network.Models.AzureFirewallPacketCaptureResult 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 AzureFirewallPacketCaptureResultCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureFirewallPacketCaptureResultCode(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureCompleted { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureFailed { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureInProgress { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureNotInProgress { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailed { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailedToUpload { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailure { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartSucceeded { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStopSucceeded { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode NotImplemented { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode 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.Network.Models.AzureFirewallPacketCaptureResultCode left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode right) { throw null; } + public override string ToString() { throw null; } + } public partial class AzureFirewallPacketCaptureRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureFirewallPacketCaptureRule() { } @@ -13649,6 +13727,7 @@ public FirewallPacketCaptureRequestContent() { } public System.Collections.Generic.IList Filters { get { throw null; } } public System.Collections.Generic.IList Flags { get { throw null; } } public int? NumberOfPacketsToCapture { get { throw null; } set { } } + public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType? Operation { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleProtocol? Protocol { get { throw null; } set { } } public System.Uri SasUri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -15256,6 +15335,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public LoadBalancingTransportProtocol(string value) { throw null; } public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol All { get { throw null; } } + public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol Quic { get { throw null; } } public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol Tcp { get { throw null; } } public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol Udp { get { throw null; } } public bool Equals(Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol other) { throw null; } @@ -16385,6 +16465,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterProvisioningState left, Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class NetworkSecurityPerimeterServiceTags : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkSecurityPerimeterServiceTags() { } + public System.Collections.Generic.IReadOnlyList ServiceTags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterServiceTags 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.Network.Models.NetworkSecurityPerimeterServiceTags 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 NetworkSecurityRulesEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NetworkSecurityRulesEvaluationResult() { } @@ -16748,6 +16839,39 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Network.Models.NicTypeInResponse left, Azure.ResourceManager.Network.Models.NicTypeInResponse right) { throw null; } public override string ToString() { throw null; } } + public partial class NvaInterfaceConfigurationsProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NvaInterfaceConfigurationsProperties() { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList PropertiesType { get { throw null; } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.NvaInterfaceConfigurationsProperties 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.Network.Models.NvaInterfaceConfigurationsProperties 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 NvaNicType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NvaNicType(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.NvaNicType AdditionalPrivateNic { get { throw null; } } + public static Azure.ResourceManager.Network.Models.NvaNicType AdditionalPublicNic { get { throw null; } } + public static Azure.ResourceManager.Network.Models.NvaNicType PrivateNic { get { throw null; } } + public static Azure.ResourceManager.Network.Models.NvaNicType PublicNic { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.NvaNicType 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.Network.Models.NvaNicType left, Azure.ResourceManager.Network.Models.NvaNicType right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.NvaNicType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.NvaNicType left, Azure.ResourceManager.Network.Models.NvaNicType right) { throw null; } + public override string ToString() { throw null; } + } public partial class O365BreakOutCategoryPolicies : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public O365BreakOutCategoryPolicies() { } diff --git a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs index 643275c15ec6..85943adc19b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs +++ b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs @@ -331,6 +331,7 @@ public AzureFirewallData() { } public System.Collections.Generic.IList ApplicationRuleCollections { get { throw null; } } public Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration AutoscaleConfiguration { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FirewallPolicyId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HubIPAddresses HubIPAddresses { get { throw null; } set { } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } @@ -371,6 +372,8 @@ protected AzureFirewallResource() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task PacketCaptureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task PacketCaptureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PacketCaptureOperation(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PacketCaptureOperationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent 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; } @@ -3304,6 +3307,8 @@ public static partial class NetworkExtensions public static Azure.ResourceManager.Network.NetworkSecurityPerimeterCollection GetNetworkSecurityPerimeters(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkSecurityPerimeters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNetworkSecurityPerimetersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetNetworkSecurityPerimeterServiceTags(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkSecurityPerimeterServiceTagsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Network.NetworkVerifierWorkspaceResource GetNetworkVerifierWorkspaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNetworkVirtualAppliance(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkVirtualApplianceName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkVirtualApplianceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkVirtualApplianceName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4917,8 +4922,10 @@ public NetworkVirtualApplianceData() { } public System.Collections.Generic.IReadOnlyList InboundSecurityRules { get { throw null; } } public System.Collections.Generic.IList InternetIngressPublicIPs { get { throw null; } } public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + public System.Collections.Generic.IList NvaInterfaceConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties NvaSku { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties PartnerManagedResource { get { throw null; } set { } } + public System.Net.IPAddress PrivateIPAddress { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string SshPublicKey { get { throw null; } set { } } public long? VirtualApplianceAsn { get { throw null; } set { } } @@ -8651,6 +8658,8 @@ protected MockableNetworkSubscriptionResource() { } public virtual Azure.AsyncPageable GetNetworkSecurityPerimeterAssociableResourceTypesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkSecurityPerimeters(int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetworkSecurityPerimetersAsync(int? top = default(int?), string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetNetworkSecurityPerimeterServiceTags(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetNetworkSecurityPerimeterServiceTagsAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkVirtualAppliances(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetworkVirtualAppliancesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkVirtualApplianceSku(string skuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -9063,6 +9072,9 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? CookieBasedAffinity { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public string HostName { get { throw null; } set { } } + public bool? IsDedicatedBackendConnectionEnabled { get { throw null; } set { } } + public bool? IsValidateCertChainAndExpiryEnabled { get { throw null; } set { } } + public bool? IsValidateSniEnabled { get { throw null; } set { } } public string Path { get { throw null; } set { } } public bool? PickHostNameFromBackendAddress { get { throw null; } set { } } public int? Port { get { throw null; } set { } } @@ -9071,6 +9083,7 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? RequestTimeoutInSeconds { get { throw null; } set { } } + public string SniName { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10257,7 +10270,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthOnDemand ApplicationGatewayBackendHealthOnDemand(Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool backendAddressPool = null, Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings backendHealthHttpSettings = null) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthPool ApplicationGatewayBackendHealthPool(Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool backendAddressPool = null, System.Collections.Generic.IEnumerable backendHttpSettingsCollection = null) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServer ApplicationGatewayBackendHealthServer(string address = null, Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData ipConfiguration = null, Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth? health = default(Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth?), string healthProbeLog = null) { throw null; } - public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? port = default(int?), Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol = default(Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol?), Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = default(Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity?), int? requestTimeoutInSeconds = default(int?), Azure.Core.ResourceIdentifier probeId = null, System.Collections.Generic.IEnumerable authenticationCertificates = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining connectionDraining = null, string hostName = null, bool? pickHostNameFromBackendAddress = default(bool?), string affinityCookieName = null, bool? probeEnabled = default(bool?), string path = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, int? port, Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol, Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity, int? requestTimeoutInSeconds, Azure.Core.ResourceIdentifier probeId, System.Collections.Generic.IEnumerable authenticationCertificates, System.Collections.Generic.IEnumerable trustedRootCertificates, Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining connectionDraining, string hostName, bool? pickHostNameFromBackendAddress, string affinityCookieName, bool? probeEnabled, string path, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? port = default(int?), Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol = default(Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol?), Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = default(Azure.ResourceManager.Network.Models.ApplicationGatewayCookieBasedAffinity?), int? requestTimeoutInSeconds = default(int?), Azure.Core.ResourceIdentifier probeId = null, System.Collections.Generic.IEnumerable authenticationCertificates = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining connectionDraining = null, string hostName = null, bool? pickHostNameFromBackendAddress = default(bool?), string affinityCookieName = null, bool? probeEnabled = default(bool?), string path = null, bool? isDedicatedBackendConnectionEnabled = default(bool?), bool? isValidateCertChainAndExpiryEnabled = default(bool?), bool? isValidateSniEnabled = default(bool?), string sniName = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayBackendSettings ApplicationGatewayBackendSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? port = default(int?), Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? protocol = default(Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol?), int? timeoutInSeconds = default(int?), Azure.Core.ResourceIdentifier probeId = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, string hostName = null, bool? pickHostNameFromBackendAddress = default(bool?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.ApplicationGatewayData ApplicationGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable availabilityZones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Network.Models.ApplicationGatewaySku sku = null, Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy sslPolicy = null, Azure.ResourceManager.Network.Models.ApplicationGatewayOperationalState? operationalState = default(Azure.ResourceManager.Network.Models.ApplicationGatewayOperationalState?), System.Collections.Generic.IEnumerable gatewayIPConfigurations = null, System.Collections.Generic.IEnumerable authenticationCertificates = null, System.Collections.Generic.IEnumerable trustedRootCertificates = null, System.Collections.Generic.IEnumerable trustedClientCertificates = null, System.Collections.Generic.IEnumerable sslCertificates = null, System.Collections.Generic.IEnumerable frontendIPConfigurations = null, System.Collections.Generic.IEnumerable frontendPorts = null, System.Collections.Generic.IEnumerable probes = null, System.Collections.Generic.IEnumerable backendAddressPools = null, System.Collections.Generic.IEnumerable backendHttpSettingsCollection = null, System.Collections.Generic.IEnumerable backendSettingsCollection = null, System.Collections.Generic.IEnumerable httpListeners = null, System.Collections.Generic.IEnumerable listeners = null, System.Collections.Generic.IEnumerable sslProfiles = null, System.Collections.Generic.IEnumerable urlPathMaps = null, System.Collections.Generic.IEnumerable requestRoutingRules = null, System.Collections.Generic.IEnumerable routingRules = null, System.Collections.Generic.IEnumerable rewriteRuleSets = null, System.Collections.Generic.IEnumerable redirectConfigurations = null, Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration = null, Azure.Core.ResourceIdentifier firewallPolicyId = null, bool? enableHttp2 = default(bool?), bool? enableFips = default(bool?), Azure.ResourceManager.Network.Models.ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration = null, System.Collections.Generic.IEnumerable privateLinkConfigurations = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), System.Collections.Generic.IEnumerable customErrorConfigurations = null, bool? forceFirewallPolicyAssociation = default(bool?), System.Collections.Generic.IEnumerable loadDistributionPolicies = null, Azure.ResourceManager.Network.Models.ApplicationGatewayGlobalConfiguration globalConfiguration = null, Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? defaultPredefinedSslPolicy = default(Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName?)) { throw null; } public static Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallManifestRuleSet ApplicationGatewayFirewallManifestRuleSet(string ruleSetType = null, string ruleSetVersion = null, Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption? status = default(Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption?), System.Collections.Generic.IEnumerable tiers = null, System.Collections.Generic.IEnumerable ruleGroups = null) { throw null; } @@ -10299,14 +10314,17 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.AvailableProvidersListState AvailableProvidersListState(string stateName = null, System.Collections.Generic.IEnumerable providers = null, System.Collections.Generic.IEnumerable cities = null) { throw null; } public static Azure.ResourceManager.Network.Models.AvailableServiceAlias AvailableServiceAlias(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string resourceName = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleCollectionData AzureFirewallApplicationRuleCollectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? priority = default(int?), Azure.ResourceManager.Network.Models.AzureFirewallRCActionType? actionType = default(Azure.ResourceManager.Network.Models.AzureFirewallRCActionType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable zones = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable applicationRuleCollections = null, System.Collections.Generic.IEnumerable natRuleCollections = null, System.Collections.Generic.IEnumerable networkRuleCollections = null, System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode = default(Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode?), Azure.Core.ResourceIdentifier virtualHubId = null, Azure.Core.ResourceIdentifier firewallPolicyId = null, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses = null, System.Collections.Generic.IEnumerable ipGroups = null, Azure.ResourceManager.Network.Models.AzureFirewallSku sku = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration autoscaleConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, Azure.ETag? etag, System.Collections.Generic.IEnumerable applicationRuleCollections, System.Collections.Generic.IEnumerable natRuleCollections, System.Collections.Generic.IEnumerable networkRuleCollections, System.Collections.Generic.IEnumerable ipConfigurations, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode, Azure.Core.ResourceIdentifier virtualHubId, Azure.Core.ResourceIdentifier firewallPolicyId, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses, System.Collections.Generic.IEnumerable ipGroups, Azure.ResourceManager.Network.Models.AzureFirewallSku sku, System.Collections.Generic.IDictionary additionalProperties) { throw null; } - public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable applicationRuleCollections = null, System.Collections.Generic.IEnumerable natRuleCollections = null, System.Collections.Generic.IEnumerable networkRuleCollections = null, System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode = default(Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode?), Azure.Core.ResourceIdentifier virtualHubId = null, Azure.Core.ResourceIdentifier firewallPolicyId = null, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses = null, System.Collections.Generic.IEnumerable ipGroups = null, Azure.ResourceManager.Network.Models.AzureFirewallSku sku = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration autoscaleConfiguration = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.AzureFirewallData AzureFirewallData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, Azure.ETag? etag, System.Collections.Generic.IEnumerable applicationRuleCollections, System.Collections.Generic.IEnumerable natRuleCollections, System.Collections.Generic.IEnumerable networkRuleCollections, System.Collections.Generic.IEnumerable ipConfigurations, Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration managementIPConfiguration, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? threatIntelMode, Azure.Core.ResourceIdentifier virtualHubId, Azure.Core.ResourceIdentifier firewallPolicyId, Azure.ResourceManager.Network.Models.HubIPAddresses hubIPAddresses, System.Collections.Generic.IEnumerable ipGroups, Azure.ResourceManager.Network.Models.AzureFirewallSku sku, System.Collections.Generic.IDictionary additionalProperties, Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration autoscaleConfiguration) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallFqdnTag AzureFirewallFqdnTag(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string fqdnTagName = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration AzureFirewallIPConfiguration(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string privateIPAddress = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallIPGroups AzureFirewallIPGroups(Azure.Core.ResourceIdentifier id = null, string changeNumber = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallNatRuleCollectionData AzureFirewallNatRuleCollectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? priority = default(int?), Azure.ResourceManager.Network.Models.AzureFirewallNatRCActionType? actionType = default(Azure.ResourceManager.Network.Models.AzureFirewallNatRCActionType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleCollectionData AzureFirewallNetworkRuleCollectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), int? priority = default(int?), Azure.ResourceManager.Network.Models.AzureFirewallRCActionType? actionType = default(Azure.ResourceManager.Network.Models.AzureFirewallRCActionType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResult AzureFirewallPacketCaptureResult(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode? statusCode = default(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode?), string message = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureReachabilityReport AzureReachabilityReport(string aggregationLevel = null, Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation providerLocation = null, System.Collections.Generic.IEnumerable reachabilityReport = null) { throw null; } public static Azure.ResourceManager.Network.Models.AzureReachabilityReportContent AzureReachabilityReportContent(Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation providerLocation = null, System.Collections.Generic.IEnumerable providers = null, System.Collections.Generic.IEnumerable azureLocations = null, System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset endOn = default(System.DateTimeOffset)) { throw null; } public static Azure.ResourceManager.Network.Models.AzureReachabilityReportItem AzureReachabilityReportItem(string provider = null, Azure.Core.AzureLocation? azureLocation = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable latencies = null) { throw null; } @@ -10530,6 +10548,7 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.NetworkSecurityPerimeterLoggingConfigurationData NetworkSecurityPerimeterLoggingConfigurationData(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 enabledLogCategories = null, string version = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterPatch NetworkSecurityPerimeterPatch(Azure.Core.ResourceIdentifier id = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.Network.NetworkSecurityPerimeterProfileData NetworkSecurityPerimeterProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string accessRulesVersion = null, string diagnosticSettingsVersion = null) { throw null; } + public static Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterServiceTags NetworkSecurityPerimeterServiceTags(System.Collections.Generic.IEnumerable serviceTags = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkSecurityRulesEvaluationResult NetworkSecurityRulesEvaluationResult(string name = null, bool? protocolMatched = default(bool?), bool? sourceMatched = default(bool?), bool? sourcePortMatched = default(bool?), bool? destinationMatched = default(bool?), bool? destinationPortMatched = default(bool?)) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkTopology NetworkTopology(string id = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable resources = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkTrackedResourceData NetworkTrackedResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null) { throw null; } @@ -10544,7 +10563,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku, string addressPrefix, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs, Azure.Core.ResourceIdentifier virtualHubId, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, System.Collections.Generic.IEnumerable virtualApplianceNics, System.Collections.Generic.IEnumerable additionalNics, System.Collections.Generic.IEnumerable internetIngressPublicIPs, System.Collections.Generic.IEnumerable virtualApplianceSites, System.Collections.Generic.IEnumerable virtualApplianceConnections, System.Collections.Generic.IEnumerable inboundSecurityRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string deploymentType, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku, string addressPrefix, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs, Azure.Core.ResourceIdentifier virtualHubId, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, System.Collections.Generic.IEnumerable virtualApplianceNics, System.Collections.Generic.IEnumerable additionalNics, System.Collections.Generic.IEnumerable virtualApplianceSites, System.Collections.Generic.IEnumerable virtualApplianceConnections, System.Collections.Generic.IEnumerable inboundSecurityRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string deploymentType, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource) { throw null; } - public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku = null, string addressPrefix = null, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs = null, Azure.Core.ResourceIdentifier virtualHubId = null, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs = null, string cloudInitConfiguration = null, long? virtualApplianceAsn = default(long?), string sshPublicKey = null, System.Collections.Generic.IEnumerable virtualApplianceNics = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, System.Collections.Generic.IEnumerable additionalNics = null, System.Collections.Generic.IEnumerable internetIngressPublicIPs = null, System.Collections.Generic.IEnumerable virtualApplianceSites = null, System.Collections.Generic.IEnumerable virtualApplianceConnections = null, System.Collections.Generic.IEnumerable inboundSecurityRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string deploymentType = null, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation = null, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku, string addressPrefix, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs, Azure.Core.ResourceIdentifier virtualHubId, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, System.Collections.Generic.IEnumerable virtualApplianceNics, System.Collections.Generic.IEnumerable networkInterfaceConfigurations, System.Collections.Generic.IEnumerable additionalNics, System.Collections.Generic.IEnumerable internetIngressPublicIPs, System.Collections.Generic.IEnumerable virtualApplianceSites, System.Collections.Generic.IEnumerable virtualApplianceConnections, System.Collections.Generic.IEnumerable inboundSecurityRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string deploymentType, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource) { throw null; } + public static Azure.ResourceManager.Network.NetworkVirtualApplianceData NetworkVirtualApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties nvaSku = null, string addressPrefix = null, System.Collections.Generic.IEnumerable bootStrapConfigurationBlobs = null, Azure.Core.ResourceIdentifier virtualHubId = null, System.Collections.Generic.IEnumerable cloudInitConfigurationBlobs = null, string cloudInitConfiguration = null, long? virtualApplianceAsn = default(long?), string sshPublicKey = null, System.Collections.Generic.IEnumerable virtualApplianceNics = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, System.Collections.Generic.IEnumerable additionalNics = null, System.Collections.Generic.IEnumerable internetIngressPublicIPs = null, System.Collections.Generic.IEnumerable virtualApplianceSites = null, System.Collections.Generic.IEnumerable virtualApplianceConnections = null, System.Collections.Generic.IEnumerable inboundSecurityRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string deploymentType = null, Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties delegation = null, Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties partnerManagedResource = null, System.Collections.Generic.IEnumerable nvaInterfaceConfigurations = null, System.Net.IPAddress privateIPAddress = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceId NetworkVirtualApplianceInstanceId(int? instanceId = default(int?)) { throw null; } public static Azure.ResourceManager.Network.NetworkVirtualApplianceSkuData NetworkVirtualApplianceSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), string vendor = null, System.Collections.Generic.IEnumerable availableVersions = null, System.Collections.Generic.IEnumerable availableScaleUnits = null) { throw null; } public static Azure.ResourceManager.Network.Models.NetworkVirtualApplianceSkuInstances NetworkVirtualApplianceSkuInstances(string scaleUnit = null, int? instanceCount = default(int?)) { throw null; } @@ -11125,6 +11146,63 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureFirewallPacketCaptureOperationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureFirewallPacketCaptureOperationType(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType Start { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType Status { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType Stop { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType 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.Network.Models.AzureFirewallPacketCaptureOperationType left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AzureFirewallPacketCaptureResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AzureFirewallPacketCaptureResult() { } + public string Message { get { throw null; } } + public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode? StatusCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResult 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.Network.Models.AzureFirewallPacketCaptureResult 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 AzureFirewallPacketCaptureResultCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureFirewallPacketCaptureResultCode(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureCompleted { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureFailed { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureInProgress { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureNotInProgress { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailed { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailedToUpload { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailure { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartSucceeded { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStopSucceeded { get { throw null; } } + public static Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode NotImplemented { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode 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.Network.Models.AzureFirewallPacketCaptureResultCode left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode left, Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureResultCode right) { throw null; } + public override string ToString() { throw null; } + } public partial class AzureFirewallPacketCaptureRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureFirewallPacketCaptureRule() { } @@ -13649,6 +13727,7 @@ public FirewallPacketCaptureRequestContent() { } public System.Collections.Generic.IList Filters { get { throw null; } } public System.Collections.Generic.IList Flags { get { throw null; } } public int? NumberOfPacketsToCapture { get { throw null; } set { } } + public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureOperationType? Operation { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleProtocol? Protocol { get { throw null; } set { } } public System.Uri SasUri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -15256,6 +15335,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public LoadBalancingTransportProtocol(string value) { throw null; } public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol All { get { throw null; } } + public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol Quic { get { throw null; } } public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol Tcp { get { throw null; } } public static Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol Udp { get { throw null; } } public bool Equals(Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol other) { throw null; } @@ -16385,6 +16465,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterProvisioningState left, Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class NetworkSecurityPerimeterServiceTags : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkSecurityPerimeterServiceTags() { } + public System.Collections.Generic.IReadOnlyList ServiceTags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.NetworkSecurityPerimeterServiceTags 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.Network.Models.NetworkSecurityPerimeterServiceTags 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 NetworkSecurityRulesEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NetworkSecurityRulesEvaluationResult() { } @@ -16748,6 +16839,39 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Network.Models.NicTypeInResponse left, Azure.ResourceManager.Network.Models.NicTypeInResponse right) { throw null; } public override string ToString() { throw null; } } + public partial class NvaInterfaceConfigurationsProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NvaInterfaceConfigurationsProperties() { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList PropertiesType { get { throw null; } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.NvaInterfaceConfigurationsProperties 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.Network.Models.NvaInterfaceConfigurationsProperties 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 NvaNicType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NvaNicType(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.NvaNicType AdditionalPrivateNic { get { throw null; } } + public static Azure.ResourceManager.Network.Models.NvaNicType AdditionalPublicNic { get { throw null; } } + public static Azure.ResourceManager.Network.Models.NvaNicType PrivateNic { get { throw null; } } + public static Azure.ResourceManager.Network.Models.NvaNicType PublicNic { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.NvaNicType 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.Network.Models.NvaNicType left, Azure.ResourceManager.Network.Models.NvaNicType right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.NvaNicType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.NvaNicType left, Azure.ResourceManager.Network.Models.NvaNicType right) { throw null; } + public override string ToString() { throw null; } + } public partial class O365BreakOutCategoryPolicies : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public O365BreakOutCategoryPolicies() { } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj b/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj index 2e0446df4bff..6bd81d230e94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj +++ b/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj @@ -1,6 +1,6 @@ - 1.12.0-beta.1 + 1.12.0 1.11.3 Azure.ResourceManager.Network diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverSingleTestDetailsOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverSingleTestDetailsOperationSource.cs index 119f334acb14..5ed4a7724860 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverSingleTestDetailsOperationSource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverSingleTestDetailsOperationSource.cs @@ -10,14 +10,14 @@ using Azure.Core; using Azure.ResourceManager.Network.Models; +// Remove this file until https://github.com/Azure/azure-sdk-for-net/issues/47572 fixed namespace Azure.ResourceManager.Network { internal class IListFailoverSingleTestDetailsOperationSource : IOperationSource> { - // Remove this file until https://github.com/Azure/azure-sdk-for-net/issues/47572 fixed IList IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) { - using var document = JsonDocument.Parse(response.ContentStream); + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { @@ -28,7 +28,7 @@ IList IOperationSource> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverTestDetailsOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverTestDetailsOperationSource.cs index 45522edffa31..cfdd29a0afc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverTestDetailsOperationSource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/LongRunningOperation/IListFailoverTestDetailsOperationSource.cs @@ -17,7 +17,7 @@ internal class IListFailoverTestDetailsOperationSource : IOperationSource IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) { - using var document = JsonDocument.Parse(response.ContentStream); + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { @@ -28,7 +28,7 @@ IList IOperationSource> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs index 4ac41763004a..f08aece42f1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs @@ -67,6 +67,7 @@ internal FirewallPacketCaptureRequestContent ToNewRequestContent() Protocol, Flags, Filters, + null, _serializedAdditionalRawData); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs index e85be5344ba9..d20ab1830f6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string rule /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleCollectionName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null, string s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleCollectionName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs index 41d890e099bd..ac7a7139d9e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs @@ -109,7 +109,7 @@ public virtual BaseAdminRuleCollection GetBaseAdminRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetBaseAdminRuleAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetBaseAdminRule(string ruleName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs index cf2b4a6508b8..23f8319d7d50 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string applicationGatewa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string applicationGatewayN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string applicationGatewayName, Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs index a4ad1588fa2b..7cb5d2aebfa6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs index 5bf63dd5918b..ac8556936f86 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs index 37fbb381d262..93b6a50d2bb2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs @@ -115,7 +115,7 @@ public virtual ApplicationGatewayPrivateEndpointConnectionCollection GetApplicat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -299,7 +299,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(Netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual Response Update(NetworkTagsObject net /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -467,7 +467,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -509,7 +509,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -551,7 +551,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -593,7 +593,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> Backend /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -679,7 +679,7 @@ public virtual ArmOperation BackendHealth(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -773,7 +773,7 @@ public virtual ArmOperation BackendHeal /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -799,7 +799,7 @@ public virtual AsyncPageable GetApplicati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -825,7 +825,7 @@ public virtual Pageable GetApplicationGat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -887,7 +887,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -949,7 +949,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1006,7 +1006,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1063,7 +1063,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1123,7 +1123,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs index 4c44db5b8082..60a829a99e53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs @@ -73,7 +73,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual Pageable GetAll(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual async Task> ExistsAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual Response Exists(CancellationToken cancellationToken = defau /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs index f24381137a08..cbf6bc16c646 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs index c4993f8df758..8037d8809cb3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string application /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string applicationSecurity /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string applicationSecurityGroupName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs index bc9add064881..c7f10c612b31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObje /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs index c6c9becf74d9..7c9b0d2f912c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs @@ -1594,9 +1594,13 @@ public static NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties Net /// Cookie name to use for the affinity cookie. /// Whether the probe is enabled. Default value is false. /// Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + /// Enable or disable dedicated connection per backend server. Default is set to false. + /// Verify or skip both chain and expiry validations of the certificate on the backend server. Default is set to true. + /// When enabled, verifies if the Common Name of the certificate provided by the backend server matches the Server Name Indication (SNI) value. Default value is true. + /// Specify an SNI value to match the common name of the certificate on the backend. By default, the application gateway uses the incoming request’s host header as the SNI. Default value is null. /// The provisioning state of the backend HTTP settings resource. /// A new instance for mocking. - public static ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, int? port = null, ApplicationGatewayProtocol? protocol = null, ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = null, int? requestTimeoutInSeconds = null, ResourceIdentifier probeId = null, IEnumerable authenticationCertificates = null, IEnumerable trustedRootCertificates = null, ApplicationGatewayConnectionDraining connectionDraining = null, string hostName = null, bool? pickHostNameFromBackendAddress = null, string affinityCookieName = null, bool? probeEnabled = null, string path = null, NetworkProvisioningState? provisioningState = null) + public static ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, int? port = null, ApplicationGatewayProtocol? protocol = null, ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity = null, int? requestTimeoutInSeconds = null, ResourceIdentifier probeId = null, IEnumerable authenticationCertificates = null, IEnumerable trustedRootCertificates = null, ApplicationGatewayConnectionDraining connectionDraining = null, string hostName = null, bool? pickHostNameFromBackendAddress = null, string affinityCookieName = null, bool? probeEnabled = null, string path = null, bool? isDedicatedBackendConnectionEnabled = null, bool? isValidateCertChainAndExpiryEnabled = null, bool? isValidateSniEnabled = null, string sniName = null, NetworkProvisioningState? provisioningState = null) { authenticationCertificates ??= new List(); trustedRootCertificates ??= new List(); @@ -1620,6 +1624,10 @@ public static ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHtt affinityCookieName, probeEnabled, path, + isDedicatedBackendConnectionEnabled, + isValidateCertChainAndExpiryEnabled, + isValidateSniEnabled, + sniName, provisioningState); } @@ -2311,6 +2319,7 @@ public static AvailableServiceAlias AvailableServiceAlias(ResourceIdentifier id /// Resource type. /// Resource location. /// Resource tags. + /// The extended location of type local virtual network gateway. /// A list of availability zones denoting where the resource needs to come from. /// A unique read-only string that changes whenever the resource is updated. /// Collection of application rule collections used by Azure Firewall. @@ -2328,7 +2337,7 @@ public static AvailableServiceAlias AvailableServiceAlias(ResourceIdentifier id /// The additional properties used to further config this azure firewall. /// Properties to provide a custom autoscale configuration to this azure firewall. /// A new instance for mocking. - public static AzureFirewallData AzureFirewallData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, IEnumerable zones = null, ETag? etag = null, IEnumerable applicationRuleCollections = null, IEnumerable natRuleCollections = null, IEnumerable networkRuleCollections = null, IEnumerable ipConfigurations = null, AzureFirewallIPConfiguration managementIPConfiguration = null, NetworkProvisioningState? provisioningState = null, AzureFirewallThreatIntelMode? threatIntelMode = null, ResourceIdentifier virtualHubId = null, ResourceIdentifier firewallPolicyId = null, HubIPAddresses hubIPAddresses = null, IEnumerable ipGroups = null, AzureFirewallSku sku = null, IDictionary additionalProperties = null, AzureFirewallAutoscaleConfiguration autoscaleConfiguration = null) + public static AzureFirewallData AzureFirewallData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ExtendedLocation extendedLocation = null, IEnumerable zones = null, ETag? etag = null, IEnumerable applicationRuleCollections = null, IEnumerable natRuleCollections = null, IEnumerable networkRuleCollections = null, IEnumerable ipConfigurations = null, AzureFirewallIPConfiguration managementIPConfiguration = null, NetworkProvisioningState? provisioningState = null, AzureFirewallThreatIntelMode? threatIntelMode = null, ResourceIdentifier virtualHubId = null, ResourceIdentifier firewallPolicyId = null, HubIPAddresses hubIPAddresses = null, IEnumerable ipGroups = null, AzureFirewallSku sku = null, IDictionary additionalProperties = null, AzureFirewallAutoscaleConfiguration autoscaleConfiguration = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -2346,6 +2355,7 @@ public static AzureFirewallData AzureFirewallData(ResourceIdentifier id = null, location, tags, serializedAdditionalRawData: null, + extendedLocation, zones?.ToList(), etag, applicationRuleCollections?.ToList(), @@ -2485,6 +2495,15 @@ public static LearnedIPPrefixesListResult LearnedIPPrefixesListResult(IEnumerabl return new LearnedIPPrefixesListResult(ipPrefixes?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The response code of the performed packet capture operation. + /// Localized Message String of The Result Of The Azure Firewall Packet Capture Operation. + /// A new instance for mocking. + public static AzureFirewallPacketCaptureResult AzureFirewallPacketCaptureResult(AzureFirewallPacketCaptureResultCode? statusCode = null, string message = null) + { + return new AzureFirewallPacketCaptureResult(statusCode, message, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Resource ID. /// Resource name. @@ -5297,6 +5316,16 @@ public static NetworkSecurityPerimeterLoggingConfigurationData NetworkSecurityPe serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// NSP service tags. + /// A new instance for mocking. + public static NetworkSecurityPerimeterServiceTags NetworkSecurityPerimeterServiceTags(IEnumerable serviceTags = null) + { + serviceTags ??= new List(); + + return new NetworkSecurityPerimeterServiceTags(serviceTags?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -5408,17 +5437,19 @@ public static NetworkVerifierWorkspaceData NetworkVerifierWorkspaceData(Resource /// Public key for SSH login. /// List of Virtual Appliance Network Interfaces. /// Network Profile containing configurations for Public and Private NIC. - /// Details required for Additional Network Interface. + /// Details required for Additional Network Interface. This property is not compatible with the NVA deployed in VNets. /// List of Resource Uri of Public IPs for Internet Ingress Scenario. /// List of references to VirtualApplianceSite. /// List of references to VirtualApplianceConnections. /// List of references to InboundSecurityRules. /// The provisioning state of the resource. /// The deployment type. PartnerManaged for the SaaS NVA. - /// The delegation for the Virtual Appliance. + /// The delegation for the Virtual Appliance. Only appliable for SaaS NVA. /// The delegation for the Virtual Appliance. + /// The NVA in VNet interface configurations. + /// A Internal Load Balancer's HA port frontend IP address. Can be used to set routes & UDR to load balance traffic between NVA instances. /// A new instance for mocking. - public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ManagedServiceIdentity identity = null, ETag? etag = null, VirtualApplianceSkuProperties nvaSku = null, string addressPrefix = null, IEnumerable bootStrapConfigurationBlobs = null, ResourceIdentifier virtualHubId = null, IEnumerable cloudInitConfigurationBlobs = null, string cloudInitConfiguration = null, long? virtualApplianceAsn = null, string sshPublicKey = null, IEnumerable virtualApplianceNics = null, IEnumerable networkInterfaceConfigurations = null, IEnumerable additionalNics = null, IEnumerable internetIngressPublicIPs = null, IEnumerable virtualApplianceSites = null, IEnumerable virtualApplianceConnections = null, IEnumerable inboundSecurityRules = null, NetworkProvisioningState? provisioningState = null, string deploymentType = null, VirtualApplianceDelegationProperties delegation = null, PartnerManagedResourceProperties partnerManagedResource = null) + public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ManagedServiceIdentity identity = null, ETag? etag = null, VirtualApplianceSkuProperties nvaSku = null, string addressPrefix = null, IEnumerable bootStrapConfigurationBlobs = null, ResourceIdentifier virtualHubId = null, IEnumerable cloudInitConfigurationBlobs = null, string cloudInitConfiguration = null, long? virtualApplianceAsn = null, string sshPublicKey = null, IEnumerable virtualApplianceNics = null, IEnumerable networkInterfaceConfigurations = null, IEnumerable additionalNics = null, IEnumerable internetIngressPublicIPs = null, IEnumerable virtualApplianceSites = null, IEnumerable virtualApplianceConnections = null, IEnumerable inboundSecurityRules = null, NetworkProvisioningState? provisioningState = null, string deploymentType = null, VirtualApplianceDelegationProperties delegation = null, PartnerManagedResourceProperties partnerManagedResource = null, IEnumerable nvaInterfaceConfigurations = null, IPAddress privateIPAddress = null) { tags ??= new Dictionary(); bootStrapConfigurationBlobs ??= new List(); @@ -5430,6 +5461,7 @@ public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceId virtualApplianceSites ??= new List(); virtualApplianceConnections ??= new List(); inboundSecurityRules ??= new List(); + nvaInterfaceConfigurations ??= new List(); return new NetworkVirtualApplianceData( id, @@ -5458,11 +5490,13 @@ public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceId provisioningState, deploymentType, delegation, - partnerManagedResource); + partnerManagedResource, + nvaInterfaceConfigurations?.ToList(), + privateIPAddress); } /// Initializes a new instance of . - /// NIC type - PublicNic, PrivateNic, or AdditionalNic. + /// NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. /// NIC name. /// Public IP address. /// Private IP address. @@ -9107,6 +9141,95 @@ public static ConnectionMonitorQueryResult ConnectionMonitorQueryResult(Connecti return new ConnectionMonitorQueryResult(sourceStatus, states?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// A unique read-only string that changes whenever the resource is updated. + /// The destination port on the backend. + /// The protocol used to communicate with the backend. + /// Cookie based affinity. + /// Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. + /// Probe resource of an application gateway. + /// Array of references to application gateway authentication certificates. + /// Array of references to application gateway trusted root certificates. + /// Connection draining of the backend http settings resource. + /// Host header to be sent to the backend servers. + /// Whether to pick host header should be picked from the host name of the backend server. Default value is false. + /// Cookie name to use for the affinity cookie. + /// Whether the probe is enabled. Default value is false. + /// Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + /// The provisioning state of the backend HTTP settings resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApplicationGatewayBackendHttpSettings ApplicationGatewayBackendHttpSettings(ResourceIdentifier id, string name, ResourceType? resourceType, ETag? etag, int? port, ApplicationGatewayProtocol? protocol, ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity, int? requestTimeoutInSeconds, ResourceIdentifier probeId, IEnumerable authenticationCertificates, IEnumerable trustedRootCertificates, ApplicationGatewayConnectionDraining connectionDraining, string hostName, bool? pickHostNameFromBackendAddress, string affinityCookieName, bool? probeEnabled, string path, NetworkProvisioningState? provisioningState) + { + return ApplicationGatewayBackendHttpSettings(id: id, name: name, resourceType: resourceType, etag: etag, port: port, protocol: protocol, cookieBasedAffinity: cookieBasedAffinity, requestTimeoutInSeconds: requestTimeoutInSeconds, probeId: probeId, authenticationCertificates: authenticationCertificates, trustedRootCertificates: trustedRootCertificates, connectionDraining: connectionDraining, hostName: hostName, pickHostNameFromBackendAddress: pickHostNameFromBackendAddress, affinityCookieName: affinityCookieName, probeEnabled: probeEnabled, path: path, isDedicatedBackendConnectionEnabled: default, isValidateCertChainAndExpiryEnabled: default, isValidateSniEnabled: default, sniName: default, provisioningState: provisioningState); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// A list of availability zones denoting where the resource needs to come from. + /// A unique read-only string that changes whenever the resource is updated. + /// Collection of application rule collections used by Azure Firewall. + /// Collection of NAT rule collections used by Azure Firewall. + /// Collection of network rule collections used by Azure Firewall. + /// IP configuration of the Azure Firewall resource. + /// IP configuration of the Azure Firewall used for management traffic. + /// The provisioning state of the Azure firewall resource. + /// The operation mode for Threat Intelligence. + /// The virtualHub to which the firewall belongs. + /// The firewallPolicy associated with this azure firewall. + /// IP addresses associated with AzureFirewall. + /// IpGroups associated with AzureFirewall. + /// The Azure Firewall Resource SKU. + /// The additional properties used to further config this azure firewall. + /// Properties to provide a custom autoscale configuration to this azure firewall. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AzureFirewallData AzureFirewallData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IEnumerable zones, ETag? etag, IEnumerable applicationRuleCollections, IEnumerable natRuleCollections, IEnumerable networkRuleCollections, IEnumerable ipConfigurations, AzureFirewallIPConfiguration managementIPConfiguration, NetworkProvisioningState? provisioningState, AzureFirewallThreatIntelMode? threatIntelMode, ResourceIdentifier virtualHubId, ResourceIdentifier firewallPolicyId, HubIPAddresses hubIPAddresses, IEnumerable ipGroups, AzureFirewallSku sku, IDictionary additionalProperties, AzureFirewallAutoscaleConfiguration autoscaleConfiguration) + { + return AzureFirewallData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, extendedLocation: default, zones: zones, etag: etag, applicationRuleCollections: applicationRuleCollections, natRuleCollections: natRuleCollections, networkRuleCollections: networkRuleCollections, ipConfigurations: ipConfigurations, managementIPConfiguration: managementIPConfiguration, provisioningState: provisioningState, threatIntelMode: threatIntelMode, virtualHubId: virtualHubId, firewallPolicyId: firewallPolicyId, hubIPAddresses: hubIPAddresses, ipGroups: ipGroups, sku: sku, additionalProperties: additionalProperties, autoscaleConfiguration: autoscaleConfiguration); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// The service principal that has read access to cloud-init and config blob. + /// A unique read-only string that changes whenever the resource is updated. + /// Network Virtual Appliance SKU. + /// Address Prefix. + /// BootStrapConfigurationBlobs storage URLs. + /// The Virtual Hub where Network Virtual Appliance is being deployed. + /// CloudInitConfigurationBlob storage URLs. + /// CloudInitConfiguration string in plain text. + /// VirtualAppliance ASN. Microsoft private, public and IANA reserved ASN are not supported. + /// Public key for SSH login. + /// List of Virtual Appliance Network Interfaces. + /// Network Profile containing configurations for Public and Private NIC. + /// Details required for Additional Network Interface. + /// List of Resource Uri of Public IPs for Internet Ingress Scenario. + /// List of references to VirtualApplianceSite. + /// List of references to VirtualApplianceConnections. + /// List of references to InboundSecurityRules. + /// The provisioning state of the resource. + /// The deployment type. PartnerManaged for the SaaS NVA. + /// The delegation for the Virtual Appliance. + /// The delegation for the Virtual Appliance. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, ManagedServiceIdentity identity, ETag? etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IEnumerable bootStrapConfigurationBlobs, ResourceIdentifier virtualHubId, IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, IEnumerable virtualApplianceNics, IEnumerable networkInterfaceConfigurations, IEnumerable additionalNics, IEnumerable internetIngressPublicIPs, IEnumerable virtualApplianceSites, IEnumerable virtualApplianceConnections, IEnumerable inboundSecurityRules, NetworkProvisioningState? provisioningState, string deploymentType, VirtualApplianceDelegationProperties delegation, PartnerManagedResourceProperties partnerManagedResource) + { + return NetworkVirtualApplianceData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, identity: identity, etag: etag, nvaSku: nvaSku, addressPrefix: addressPrefix, bootStrapConfigurationBlobs: bootStrapConfigurationBlobs, virtualHubId: virtualHubId, cloudInitConfigurationBlobs: cloudInitConfigurationBlobs, cloudInitConfiguration: cloudInitConfiguration, virtualApplianceAsn: virtualApplianceAsn, sshPublicKey: sshPublicKey, virtualApplianceNics: virtualApplianceNics, networkInterfaceConfigurations: networkInterfaceConfigurations, additionalNics: additionalNics, internetIngressPublicIPs: internetIngressPublicIPs, virtualApplianceSites: virtualApplianceSites, virtualApplianceConnections: virtualApplianceConnections, inboundSecurityRules: inboundSecurityRules, provisioningState: provisioningState, deploymentType: deploymentType, delegation: delegation, partnerManagedResource: partnerManagedResource, nvaInterfaceConfigurations: default, privateIPAddress: default); + } + /// Initializes a new instance of BackendAddressPoolData. /// Resource ID. /// Resource name. @@ -9308,7 +9431,7 @@ public static ApplicationGatewayListener ApplicationGatewayListener(ResourceIden [EditorBrowsable(EditorBrowsableState.Never)] public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, ManagedServiceIdentity identity, ETag? etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IEnumerable bootStrapConfigurationBlobs, ResourceIdentifier virtualHubId, IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, IEnumerable virtualApplianceNics, IEnumerable additionalNics, IEnumerable virtualApplianceSites, IEnumerable virtualApplianceConnections, IEnumerable inboundSecurityRules, NetworkProvisioningState? provisioningState, string deploymentType, VirtualApplianceDelegationProperties delegation, PartnerManagedResourceProperties partnerManagedResource) { - return NetworkVirtualApplianceData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, identity: identity, etag: etag, nvaSku: nvaSku, addressPrefix: addressPrefix, bootStrapConfigurationBlobs: bootStrapConfigurationBlobs, virtualHubId: virtualHubId, cloudInitConfigurationBlobs: cloudInitConfigurationBlobs, cloudInitConfiguration: cloudInitConfiguration, virtualApplianceAsn: virtualApplianceAsn, sshPublicKey: sshPublicKey, virtualApplianceNics: virtualApplianceNics, networkInterfaceConfigurations: default, additionalNics: additionalNics, internetIngressPublicIPs: default, virtualApplianceSites: virtualApplianceSites, virtualApplianceConnections: virtualApplianceConnections, inboundSecurityRules: inboundSecurityRules, provisioningState: provisioningState, deploymentType: deploymentType, delegation: delegation, partnerManagedResource: partnerManagedResource); + return NetworkVirtualApplianceData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, identity: identity, etag: etag, nvaSku: nvaSku, addressPrefix: addressPrefix, bootStrapConfigurationBlobs: bootStrapConfigurationBlobs, virtualHubId: virtualHubId, cloudInitConfigurationBlobs: cloudInitConfigurationBlobs, cloudInitConfiguration: cloudInitConfiguration, virtualApplianceAsn: virtualApplianceAsn, sshPublicKey: sshPublicKey, virtualApplianceNics: virtualApplianceNics, networkInterfaceConfigurations: default, additionalNics: additionalNics, internetIngressPublicIPs: default, virtualApplianceSites: virtualApplianceSites, virtualApplianceConnections: virtualApplianceConnections, inboundSecurityRules: inboundSecurityRules, provisioningState: provisioningState, deploymentType: deploymentType, delegation: delegation, partnerManagedResource: partnerManagedResource, nvaInterfaceConfigurations: default, privateIPAddress: default); } /// Initializes a new instance of . @@ -9770,7 +9893,7 @@ public static ServiceEndpointProperties ServiceEndpointProperties(string service [EditorBrowsable(EditorBrowsableState.Never)] public static AzureFirewallData AzureFirewallData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IEnumerable zones, ETag? etag, IEnumerable applicationRuleCollections, IEnumerable natRuleCollections, IEnumerable networkRuleCollections, IEnumerable ipConfigurations, AzureFirewallIPConfiguration managementIPConfiguration, NetworkProvisioningState? provisioningState, AzureFirewallThreatIntelMode? threatIntelMode, ResourceIdentifier virtualHubId, ResourceIdentifier firewallPolicyId, HubIPAddresses hubIPAddresses, IEnumerable ipGroups, AzureFirewallSku sku, IDictionary additionalProperties) { - return AzureFirewallData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, zones: zones, etag: etag, applicationRuleCollections: applicationRuleCollections, natRuleCollections: natRuleCollections, networkRuleCollections: networkRuleCollections, ipConfigurations: ipConfigurations, managementIPConfiguration: managementIPConfiguration, provisioningState: provisioningState, threatIntelMode: threatIntelMode, virtualHubId: virtualHubId, firewallPolicyId: firewallPolicyId, hubIPAddresses: hubIPAddresses, ipGroups: ipGroups, sku: sku, additionalProperties: additionalProperties, autoscaleConfiguration: default); + return AzureFirewallData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, extendedLocation: default, zones: zones, etag: etag, applicationRuleCollections: applicationRuleCollections, natRuleCollections: natRuleCollections, networkRuleCollections: networkRuleCollections, ipConfigurations: ipConfigurations, managementIPConfiguration: managementIPConfiguration, provisioningState: provisioningState, threatIntelMode: threatIntelMode, virtualHubId: virtualHubId, firewallPolicyId: firewallPolicyId, hubIPAddresses: hubIPAddresses, ipGroups: ipGroups, sku: sku, additionalProperties: additionalProperties, autoscaleConfiguration: default); } /// Initializes a new instance of . @@ -10005,7 +10128,7 @@ public static ExpressRouteCircuitData ExpressRouteCircuitData(ResourceIdentifier [EditorBrowsable(EditorBrowsableState.Never)] public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, ManagedServiceIdentity identity, ETag? etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IEnumerable bootStrapConfigurationBlobs, ResourceIdentifier virtualHubId, IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, IEnumerable virtualApplianceNics, IEnumerable additionalNics, IEnumerable internetIngressPublicIPs, IEnumerable virtualApplianceSites, IEnumerable virtualApplianceConnections, IEnumerable inboundSecurityRules, NetworkProvisioningState? provisioningState, string deploymentType, VirtualApplianceDelegationProperties delegation, PartnerManagedResourceProperties partnerManagedResource) { - return NetworkVirtualApplianceData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, identity: identity, etag: etag, nvaSku: nvaSku, addressPrefix: addressPrefix, bootStrapConfigurationBlobs: bootStrapConfigurationBlobs, virtualHubId: virtualHubId, cloudInitConfigurationBlobs: cloudInitConfigurationBlobs, cloudInitConfiguration: cloudInitConfiguration, virtualApplianceAsn: virtualApplianceAsn, sshPublicKey: sshPublicKey, virtualApplianceNics: virtualApplianceNics, networkInterfaceConfigurations: default, additionalNics: additionalNics, internetIngressPublicIPs: internetIngressPublicIPs, virtualApplianceSites: virtualApplianceSites, virtualApplianceConnections: virtualApplianceConnections, inboundSecurityRules: inboundSecurityRules, provisioningState: provisioningState, deploymentType: deploymentType, delegation: delegation, partnerManagedResource: partnerManagedResource); + return NetworkVirtualApplianceData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, identity: identity, etag: etag, nvaSku: nvaSku, addressPrefix: addressPrefix, bootStrapConfigurationBlobs: bootStrapConfigurationBlobs, virtualHubId: virtualHubId, cloudInitConfigurationBlobs: cloudInitConfigurationBlobs, cloudInitConfiguration: cloudInitConfiguration, virtualApplianceAsn: virtualApplianceAsn, sshPublicKey: sshPublicKey, virtualApplianceNics: virtualApplianceNics, networkInterfaceConfigurations: default, additionalNics: additionalNics, internetIngressPublicIPs: internetIngressPublicIPs, virtualApplianceSites: virtualApplianceSites, virtualApplianceConnections: virtualApplianceConnections, inboundSecurityRules: inboundSecurityRules, provisioningState: provisioningState, deploymentType: deploymentType, delegation: delegation, partnerManagedResource: partnerManagedResource, nvaInterfaceConfigurations: default, privateIPAddress: default); } /// Initializes a new instance of . diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs index 178697daef75..8e8eaaea5634 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string azure /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string azureFirewallName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string azureFirewallName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string azureFirewallName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs index e77132e57931..d52afb612cbf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -180,6 +185,7 @@ internal static AzureFirewallData DeserializeAzureFirewallData(JsonElement eleme { return null; } + ExtendedLocation extendedLocation = default; IList zones = default; ETag? etag = default; ResourceIdentifier id = default; @@ -205,6 +211,15 @@ internal static AzureFirewallData DeserializeAzureFirewallData(JsonElement eleme Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerNetworkContext.Default); + continue; + } if (property.NameEquals("zones"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -455,6 +470,7 @@ internal static AzureFirewallData DeserializeAzureFirewallData(JsonElement eleme location, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, + extendedLocation, zones ?? new ChangeTrackingList(), etag, applicationRuleCollections ?? new ChangeTrackingList(), @@ -559,6 +575,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtendedLocation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extendedLocation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtendedLocation)) + { + builder.Append(" extendedLocation: "); + BicepSerializationHelpers.AppendChildObject(builder, ExtendedLocation, options, 2, false, " extendedLocation: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.cs index bf850aae56ca..d9bf2c263999 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.cs @@ -38,6 +38,7 @@ public AzureFirewallData() /// Resource location. /// Resource tags. /// Keeps track of any properties unknown to the library. + /// The extended location of type local virtual network gateway. /// A list of availability zones denoting where the resource needs to come from. /// A unique read-only string that changes whenever the resource is updated. /// Collection of application rule collections used by Azure Firewall. @@ -54,8 +55,9 @@ public AzureFirewallData() /// The Azure Firewall Resource SKU. /// The additional properties used to further config this azure firewall. /// Properties to provide a custom autoscale configuration to this azure firewall. - internal AzureFirewallData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, IList zones, ETag? etag, IList applicationRuleCollections, IList natRuleCollections, IList networkRuleCollections, IList ipConfigurations, AzureFirewallIPConfiguration managementIPConfiguration, NetworkProvisioningState? provisioningState, AzureFirewallThreatIntelMode? threatIntelMode, WritableSubResource virtualHub, WritableSubResource firewallPolicy, HubIPAddresses hubIPAddresses, IReadOnlyList ipGroups, AzureFirewallSku sku, IDictionary additionalProperties, AzureFirewallAutoscaleConfiguration autoscaleConfiguration) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) + internal AzureFirewallData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ExtendedLocation extendedLocation, IList zones, ETag? etag, IList applicationRuleCollections, IList natRuleCollections, IList networkRuleCollections, IList ipConfigurations, AzureFirewallIPConfiguration managementIPConfiguration, NetworkProvisioningState? provisioningState, AzureFirewallThreatIntelMode? threatIntelMode, WritableSubResource virtualHub, WritableSubResource firewallPolicy, HubIPAddresses hubIPAddresses, IReadOnlyList ipGroups, AzureFirewallSku sku, IDictionary additionalProperties, AzureFirewallAutoscaleConfiguration autoscaleConfiguration) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) { + ExtendedLocation = extendedLocation; Zones = zones; ETag = etag; ApplicationRuleCollections = applicationRuleCollections; @@ -74,6 +76,9 @@ internal AzureFirewallData(ResourceIdentifier id, string name, ResourceType? res AutoscaleConfiguration = autoscaleConfiguration; } + /// The extended location of type local virtual network gateway. + [WirePath("extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } /// A list of availability zones denoting where the resource needs to come from. [WirePath("zones")] public IList Zones { get; } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs index 2dceb3e81a3f..66c01f234046 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> GetLearnedP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation GetLearnedPrefixes(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual async Task PacketCaptureAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -522,6 +522,98 @@ public virtual ArmOperation PacketCapture(WaitUntil waitUntil, FirewallPacketCap } } + /// + /// Runs a packet capture operation on AzureFirewall. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCaptureOperation + /// + /// + /// Operation Id + /// AzureFirewalls_PacketCaptureOperation + /// + /// + /// Default Api Version + /// 2024-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. + /// Parameters supplied to run packet capture on azure firewall. + /// The cancellation token to use. + /// is null. + public virtual async Task> PacketCaptureOperationAsync(WaitUntil waitUntil, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _azureFirewallClientDiagnostics.CreateScope("AzureFirewallResource.PacketCaptureOperation"); + scope.Start(); + try + { + var response = await _azureFirewallRestClient.PacketCaptureOperationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetworkArmOperation(new AzureFirewallPacketCaptureResultOperationSource(), _azureFirewallClientDiagnostics, Pipeline, _azureFirewallRestClient.CreatePacketCaptureOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs a packet capture operation on AzureFirewall. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCaptureOperation + /// + /// + /// Operation Id + /// AzureFirewalls_PacketCaptureOperation + /// + /// + /// Default Api Version + /// 2024-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. + /// Parameters supplied to run packet capture on azure firewall. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PacketCaptureOperation(WaitUntil waitUntil, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _azureFirewallClientDiagnostics.CreateScope("AzureFirewallResource.PacketCaptureOperation"); + scope.Start(); + try + { + var response = _azureFirewallRestClient.PacketCaptureOperation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new NetworkArmOperation(new AzureFirewallPacketCaptureResultOperationSource(), _azureFirewallClientDiagnostics, Pipeline, _azureFirewallRestClient.CreatePacketCaptureOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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. /// @@ -535,7 +627,7 @@ public virtual ArmOperation PacketCapture(WaitUntil waitUntil, FirewallPacketCap /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -597,7 +689,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -659,7 +751,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -716,7 +808,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -773,7 +865,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -833,7 +925,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs index 27cb5190f5be..db1df106aa2b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(string na /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual Response Get(string name, string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string name, string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string name, string expand = null, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs index a4011f3b9f75..bc6627c25769 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(string ex /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs index 5f3db24fdb62..227f9f77218c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backendAddressPoo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backendAddressPoolN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backendAddressPoolName, Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs index 29b45141aa58..45dd8af9e3ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs index 461ec85b89c0..b0957f0ad638 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string ruleN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleName, Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null, string sk /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs index f01a209763f3..719205880ef9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs index 849978345aa3..9603306f4129 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string bastion /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string bastionHostName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string bastionHostName, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string bastionHostName, CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs index 1f19c267f6bb..e4b83a501dbb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Net /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task DeleteBastionShareableLinkByTokenAsync(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual ArmOperation DeleteBastionShareableLinkByToken(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -518,7 +518,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -637,7 +637,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -694,7 +694,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -754,7 +754,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs index 7b57710a4c2c..13c4a0191f13 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string conne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string connectionName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs index cb8deff22733..0b05602a0b63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, B /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task>>> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual ArmOperation>> GetVirtualHub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task>>> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs index 423f479c459d..a023721cdbf7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task CreateOrUpdateAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, CloudServiceSwap /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -202,7 +202,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual async Task> ExistsAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual Response Exists(CancellationToken cancellationToken = defau /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs index 88d1567fff6b..84e24e186f05 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, CloudSe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs index abca5e9f6e2c..e0f3984454d1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(string c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string connectionMonitorN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string connectionMonitorNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string connectionMonitorName, CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs index d66f32aed037..7c3458a5ac7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Netwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -393,7 +393,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -435,7 +435,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -497,7 +497,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -559,7 +559,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -616,7 +616,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -673,7 +673,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs index 7c849ecd5a9a..43cfbc37d196 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string configurat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs index 1e06c810f447..f1fb9838ee6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs index 17ca5431660e..804b2a2e3f67 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string cust /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string customIPPrefixName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string customIPPrefixName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string customIPPrefixName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs index b9c42ed764e4..24703dcd3e42 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs index a25ad967aee5..cf19f8eb3050 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -205,7 +205,7 @@ public virtual async Task> GetAsync(string dd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(string ddosCustomPolicyNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string ddosCustomPolicyNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Exists(string ddosCustomPolicyName, CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs index e9c37631278e..a3e33cce8797 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Networ /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject netwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs index 7ee7a9a1ccc5..cd2b454814b9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string ddosProtectionPla /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string ddosProtectionPlanN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string ddosProtectionPlanName, Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs index 19fcc0656ff1..27a2e693d754 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject net /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs index 31e7001f015d..2e30066df341 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string defaultSecurityR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string defaultSecurityRule /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string defaultSecurityRuleName, Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs index 1307c1b3806d..37c09b194588 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs index 0d8f5be0b3cb..25d66ffdedb1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string d /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string dscpConfigurationN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string dscpConfigurationNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string dscpConfigurationName, CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs index 0d4a7dcb22bd..e56b101d2975 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -528,7 +528,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -584,7 +584,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -639,7 +639,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs index 7279416091a8..5256fdd60d9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string aut /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs index 8853c211dfbf..c09704ddd7b2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs index b43e66508a37..4c9bb98cc3e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string circuitName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string circuitName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string circuitName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs index 39167b153c62..742aac76a4d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs index d916016089d3..0f35a82036f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs index dc45c1595ad1..31c06551bcde 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string peeringNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string peeringName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string peeringName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs index b2d55ec8f3b2..a7be38349320 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs @@ -114,7 +114,7 @@ public virtual ExpressRouteCircuitConnectionCollection GetExpressRouteCircuitCon /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual PeerExpressRouteCircuitConnectionCollection GetPeerExpressRouteCi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response GetPeerExpres /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -548,7 +548,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -595,7 +595,7 @@ public virtual ArmOperation GetArpTableE /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -642,7 +642,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -689,7 +689,7 @@ public virtual ArmOperation GetRoutes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -736,7 +736,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -783,7 +783,7 @@ public virtual ArmOperation Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -821,7 +821,7 @@ public virtual async Task> GetPeeringStatsExp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs index 2bb9880fd8e9..6f1071839542 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteCircuitAuthorizationCollection GetExpressRouteCircuit /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ExpressRouteCircuitPeeringCollection GetExpressRouteCircuitPeerin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetExpre /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetExpressRouteCircu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> UpdateAsync(Net /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual Response Update(NetworkTagsObject ne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -527,7 +527,7 @@ public virtual async Task> GetStatsAsync(Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual Response GetStats(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -627,7 +627,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -689,7 +689,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -746,7 +746,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -803,7 +803,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -863,7 +863,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs index 6d3d6afa2737..3b86e869e21f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectionNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs index b606746719e2..b027170d55bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs index 8480e7a72b9a..dced6cb1dff5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string crossCon /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string crossConnectionName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string crossConnectionName, CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs index 59ace8299645..65392b20638c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string p /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string peeringName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string peeringName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs index 0f3098d97449..82cf3a9efffa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual ArmOperation GetArpTableE /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -504,7 +504,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -551,7 +551,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs index eca368d7526e..fef027605fbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteCrossConnectionPeeringCollection GetExpressRouteCross /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetExpressRo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Update(NetworkTagsO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task> AddTagA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -517,7 +517,7 @@ public virtual async Task> SetTags /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -574,7 +574,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> RemoveT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs index e2ec56f2d02f..af68a6da8208 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expressRouteGate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string expressRouteGateway /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string expressRouteGatewayName, Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs index b83e719b70ee..22bbe07429b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteConnectionCollection GetExpressRouteConnections() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetExpressRo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetExpressRouteConnectio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -552,7 +552,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs index 3e0143825866..9291c5277ec7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string li /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string linkName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string linkName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string linkName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs index 876bfc46b35c..e28c50c68da7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs index 15749ba90e79..de1a733bcbbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string author /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs index 4db9d6d58b83..0662fbcda2b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs index c42146cd6450..232abce7c26b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string ex /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expressRoutePortNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string expressRoutePortNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string expressRoutePortName, CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs index 4348b576ee80..1b104dd5591f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteLinkCollection GetExpressRouteLinks() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetExpressRouteLin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ExpressRoutePortAuthorizationCollection GetExpressRoutePortAuthor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetExpressRoutePo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> UpdateAsync(Networ /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual Response Update(NetworkTagsObject netwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -531,7 +531,7 @@ public virtual async Task> Generate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -573,7 +573,7 @@ public virtual Response GenerateLoa(Generate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -635,7 +635,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -697,7 +697,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -754,7 +754,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -811,7 +811,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -871,7 +871,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs index 2ecf6275f021..7339746d738a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string locationNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string locationName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string locationName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs index 45b311cf74a9..7e6726f78f81 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs index 7b77d769dda9..35525a0156c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string providerpor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string providerport, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string providerport, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs index 537a8497e4cc..1b6652e409ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs index 013df8f3ea77..fd4c5f30a37f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs @@ -53,7 +53,7 @@ public virtual ManagementGroupNetworkManagerConnectionCollection GetManagementGr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs index 0a9cecff1e14..308f11c22f50 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs @@ -74,7 +74,7 @@ public virtual ApplicationGatewayCollection GetApplicationGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> GetApplicationGa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual ApplicationSecurityGroupCollection GetApplicationSecurityGroups() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual async Task> GetApplica /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual AzureFirewallCollection GetAzureFirewalls() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -243,7 +243,7 @@ public virtual async Task> GetAzureFirewallAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual BastionHostCollection GetBastionHosts() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetBastionHostAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual CloudServiceSwapCollection GetCloudServiceSwaps(string resourceNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> GetCloudServiceSwa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual CustomIPPrefixCollection GetCustomIPPrefixes() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> GetCustomIPPrefixAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -493,7 +493,7 @@ public virtual DdosCustomPolicyCollection GetDdosCustomPolicies() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -524,7 +524,7 @@ public virtual async Task> GetDdosCustomPolic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -562,7 +562,7 @@ public virtual DdosProtectionPlanCollection GetDdosProtectionPlans() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -593,7 +593,7 @@ public virtual async Task> GetDdosProtectio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -631,7 +631,7 @@ public virtual DscpConfigurationCollection GetDscpConfigurations() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -662,7 +662,7 @@ public virtual async Task> GetDscpConfigurat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -700,7 +700,7 @@ public virtual ExpressRouteCircuitCollection GetExpressRouteCircuits() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -731,7 +731,7 @@ public virtual async Task> GetExpressRoute /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -769,7 +769,7 @@ public virtual ExpressRouteCrossConnectionCollection GetExpressRouteCrossConnect /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -800,7 +800,7 @@ public virtual async Task> GetExpr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -838,7 +838,7 @@ public virtual ExpressRoutePortCollection GetExpressRoutePorts() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -869,7 +869,7 @@ public virtual async Task> GetExpressRoutePor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -907,7 +907,7 @@ public virtual FirewallPolicyCollection GetFirewallPolicies() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -939,7 +939,7 @@ public virtual async Task> GetFirewallPolicyAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -978,7 +978,7 @@ public virtual IPAllocationCollection GetIPAllocations() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1010,7 +1010,7 @@ public virtual async Task> GetIPAllocationAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1049,7 +1049,7 @@ public virtual IPGroupCollection GetIPGroups() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1081,7 +1081,7 @@ public virtual async Task> GetIPGroupAsync(string ipGr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1120,7 +1120,7 @@ public virtual LoadBalancerCollection GetLoadBalancers() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1152,7 +1152,7 @@ public virtual async Task> GetLoadBalancerAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1191,7 +1191,7 @@ public virtual NatGatewayCollection GetNatGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1223,7 +1223,7 @@ public virtual async Task> GetNatGatewayAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1262,7 +1262,7 @@ public virtual NetworkInterfaceCollection GetNetworkInterfaces() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1294,7 +1294,7 @@ public virtual async Task> GetNetworkInterfac /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1333,7 +1333,7 @@ public virtual NetworkManagerCollection GetNetworkManagers() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1364,7 +1364,7 @@ public virtual async Task> GetNetworkManagerAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1402,7 +1402,7 @@ public virtual NetworkProfileCollection GetNetworkProfiles() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1434,7 +1434,7 @@ public virtual async Task> GetNetworkProfileAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1473,7 +1473,7 @@ public virtual NetworkSecurityGroupCollection GetNetworkSecurityGroups() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1505,7 +1505,7 @@ public virtual async Task> GetNetworkSecu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1544,7 +1544,7 @@ public virtual NetworkSecurityPerimeterCollection GetNetworkSecurityPerimeters() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1575,7 +1575,7 @@ public virtual async Task> GetNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1613,7 +1613,7 @@ public virtual NetworkVirtualApplianceCollection GetNetworkVirtualAppliances() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1645,7 +1645,7 @@ public virtual async Task> GetNetworkV /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1684,7 +1684,7 @@ public virtual NetworkWatcherCollection GetNetworkWatchers() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1715,7 +1715,7 @@ public virtual async Task> GetNetworkWatcherAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1753,7 +1753,7 @@ public virtual PrivateEndpointCollection GetPrivateEndpoints() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1785,7 +1785,7 @@ public virtual async Task> GetPrivateEndpointA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1824,7 +1824,7 @@ public virtual PrivateLinkServiceCollection GetPrivateLinkServices() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1856,7 +1856,7 @@ public virtual async Task> GetPrivateLinkSe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1895,7 +1895,7 @@ public virtual PublicIPAddressCollection GetPublicIPAddresses() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1927,7 +1927,7 @@ public virtual async Task> GetPublicIPAddressA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1966,7 +1966,7 @@ public virtual PublicIPPrefixCollection GetPublicIPPrefixes() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1998,7 +1998,7 @@ public virtual async Task> GetPublicIPPrefixAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2037,7 +2037,7 @@ public virtual RouteFilterCollection GetRouteFilters() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2069,7 +2069,7 @@ public virtual async Task> GetRouteFilterAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2108,7 +2108,7 @@ public virtual RouteTableCollection GetRouteTables() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2140,7 +2140,7 @@ public virtual async Task> GetRouteTableAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2179,7 +2179,7 @@ public virtual SecurityPartnerProviderCollection GetSecurityPartnerProviders() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2210,7 +2210,7 @@ public virtual async Task> GetSecurity /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2248,7 +2248,7 @@ public virtual ServiceEndpointPolicyCollection GetServiceEndpointPolicies() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2280,7 +2280,7 @@ public virtual async Task> GetServiceEnd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2319,7 +2319,7 @@ public virtual VirtualNetworkCollection GetVirtualNetworks() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2351,7 +2351,7 @@ public virtual async Task> GetVirtualNetworkAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2390,7 +2390,7 @@ public virtual VirtualNetworkGatewayCollection GetVirtualNetworkGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2421,7 +2421,7 @@ public virtual async Task> GetVirtualNet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2459,7 +2459,7 @@ public virtual VirtualNetworkGatewayConnectionCollection GetVirtualNetworkGatewa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2490,7 +2490,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2528,7 +2528,7 @@ public virtual LocalNetworkGatewayCollection GetLocalNetworkGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2559,7 +2559,7 @@ public virtual async Task> GetLocalNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2597,7 +2597,7 @@ public virtual VirtualNetworkTapCollection GetVirtualNetworkTaps() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2628,7 +2628,7 @@ public virtual async Task> GetVirtualNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2666,7 +2666,7 @@ public virtual VirtualRouterCollection GetVirtualRouters() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2698,7 +2698,7 @@ public virtual async Task> GetVirtualRouterAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2737,7 +2737,7 @@ public virtual VirtualWanCollection GetVirtualWans() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2768,7 +2768,7 @@ public virtual async Task> GetVirtualWanAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2806,7 +2806,7 @@ public virtual VpnSiteCollection GetVpnSites() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2837,7 +2837,7 @@ public virtual async Task> GetVpnSiteAsync(string vpnS /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2875,7 +2875,7 @@ public virtual VpnServerConfigurationCollection GetVpnServerConfigurations() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2906,7 +2906,7 @@ public virtual async Task> GetVpnServer /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2944,7 +2944,7 @@ public virtual VirtualHubCollection GetVirtualHubs() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2975,7 +2975,7 @@ public virtual async Task> GetVirtualHubAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3013,7 +3013,7 @@ public virtual VpnGatewayCollection GetVpnGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3044,7 +3044,7 @@ public virtual async Task> GetVpnGatewayAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3082,7 +3082,7 @@ public virtual P2SVpnGatewayCollection GetP2SVpnGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3113,7 +3113,7 @@ public virtual async Task> GetP2SVpnGatewayAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3151,7 +3151,7 @@ public virtual ExpressRouteGatewayCollection GetExpressRouteGateways() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3182,7 +3182,7 @@ public virtual async Task> GetExpressRoute /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3220,7 +3220,7 @@ public virtual WebApplicationFirewallPolicyCollection GetWebApplicationFirewallP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3251,7 +3251,7 @@ public virtual async Task> GetWeb /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3282,7 +3282,7 @@ public virtual Response GetWebApplicationF /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3309,7 +3309,7 @@ public virtual AsyncPageable GetAvailableResourceGroupDeleg /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3336,7 +3336,7 @@ public virtual Pageable GetAvailableResourceGroupDelegation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3363,7 +3363,7 @@ public virtual AsyncPageable GetAvailableServiceAliasesBy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3390,7 +3390,7 @@ public virtual Pageable GetAvailableServiceAliasesByResou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3417,7 +3417,7 @@ public virtual AsyncPageable GetAvailablePrivateEn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3444,7 +3444,7 @@ public virtual Pageable GetAvailablePrivateEndpoin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3487,7 +3487,7 @@ public virtual async Task> CheckPriva /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3530,7 +3530,7 @@ public virtual ArmOperation CheckPrivateLinkServic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3557,7 +3557,7 @@ public virtual AsyncPageable GetAutoApprovedPriv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs index 2e05340943c4..cc7aeaa54d85 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs @@ -72,6 +72,8 @@ public partial class MockableNetworkSubscriptionResource : ArmResource private NetworkSecurityPerimetersRestOperations _networkSecurityPerimeterRestClient; private ClientDiagnostics _networkSecurityPerimeterAssociableResourceTypesClientDiagnostics; private NetworkSecurityPerimeterAssociableResourceTypesRestOperations _networkSecurityPerimeterAssociableResourceTypesRestClient; + private ClientDiagnostics _networkSecurityPerimeterServiceTagsClientDiagnostics; + private NetworkSecurityPerimeterServiceTagsRestOperations _networkSecurityPerimeterServiceTagsRestClient; private ClientDiagnostics _networkVirtualApplianceClientDiagnostics; private NetworkVirtualAppliancesRestOperations _networkVirtualApplianceRestClient; private ClientDiagnostics _networkWatcherClientDiagnostics; @@ -193,6 +195,8 @@ internal MockableNetworkSubscriptionResource(ArmClient client, ResourceIdentifie private NetworkSecurityPerimetersRestOperations NetworkSecurityPerimeterRestClient => _networkSecurityPerimeterRestClient ??= new NetworkSecurityPerimetersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkSecurityPerimeterResource.ResourceType)); private ClientDiagnostics NetworkSecurityPerimeterAssociableResourceTypesClientDiagnostics => _networkSecurityPerimeterAssociableResourceTypesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", ProviderConstants.DefaultProviderNamespace, Diagnostics); private NetworkSecurityPerimeterAssociableResourceTypesRestOperations NetworkSecurityPerimeterAssociableResourceTypesRestClient => _networkSecurityPerimeterAssociableResourceTypesRestClient ??= new NetworkSecurityPerimeterAssociableResourceTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics NetworkSecurityPerimeterServiceTagsClientDiagnostics => _networkSecurityPerimeterServiceTagsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private NetworkSecurityPerimeterServiceTagsRestOperations NetworkSecurityPerimeterServiceTagsRestClient => _networkSecurityPerimeterServiceTagsRestClient ??= new NetworkSecurityPerimeterServiceTagsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics NetworkVirtualApplianceClientDiagnostics => _networkVirtualApplianceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", NetworkVirtualApplianceResource.ResourceType.Namespace, Diagnostics); private NetworkVirtualAppliancesRestOperations NetworkVirtualApplianceRestClient => _networkVirtualApplianceRestClient ??= new NetworkVirtualAppliancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkVirtualApplianceResource.ResourceType)); private ClientDiagnostics NetworkWatcherClientDiagnostics => _networkWatcherClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", NetworkWatcherResource.ResourceType.Namespace, Diagnostics); @@ -275,7 +279,7 @@ public virtual ApplicationGatewayWafDynamicManifestCollection GetApplicationGate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -304,7 +308,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -340,7 +344,7 @@ public virtual AzureWebCategoryCollection GetAzureWebCategories() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -372,7 +376,7 @@ public virtual async Task> GetAzureWebCategor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -411,7 +415,7 @@ public virtual ExpressRouteProviderPortCollection GetExpressRouteProviderPorts() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -442,7 +446,7 @@ public virtual async Task> GetExpress /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -480,7 +484,7 @@ public virtual ExpressRoutePortsLocationCollection GetExpressRoutePortsLocations /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -511,7 +515,7 @@ public virtual async Task> GetExpres /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -549,7 +553,7 @@ public virtual SubscriptionNetworkManagerConnectionCollection GetSubscriptionNet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -580,7 +584,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -618,7 +622,7 @@ public virtual NetworkVirtualApplianceSkuCollection GetNetworkVirtualApplianceSk /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +653,7 @@ public virtual async Task> GetNetwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -680,7 +684,7 @@ public virtual Response GetNetworkVirtualApp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -710,7 +714,7 @@ public virtual AsyncPageable GetApplicationGatewaysA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -740,7 +744,7 @@ public virtual Pageable GetApplicationGateways(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -769,7 +773,7 @@ public virtual AsyncPageable GetAvailableServerVariablesApplicationGatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -798,7 +802,7 @@ public virtual Pageable GetAvailableServerVariablesApplicationGateways(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -827,7 +831,7 @@ public virtual AsyncPageable GetAvailableRequestHeadersApplicationGatewa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -856,7 +860,7 @@ public virtual Pageable GetAvailableRequestHeadersApplicationGateways(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -885,7 +889,7 @@ public virtual AsyncPageable GetAvailableResponseHeadersApplicationGatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -914,7 +918,7 @@ public virtual Pageable GetAvailableResponseHeadersApplicationGateways(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -943,7 +947,7 @@ public virtual AsyncPageable GetAppGatewayAva /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -972,7 +976,7 @@ public virtual Pageable GetAppGatewayAvailabl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1010,7 +1014,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1048,7 +1052,7 @@ public virtual Response GetApplicatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1078,7 +1082,7 @@ public virtual AsyncPageable GetApplicati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1108,7 +1112,7 @@ public virtual Pageable GetApplicationGat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1151,7 +1155,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1194,7 +1198,7 @@ public virtual Response GetApplicationGat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1224,7 +1228,7 @@ public virtual AsyncPageable GetApplicationSec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1254,7 +1258,7 @@ public virtual Pageable GetApplicationSecurity /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1281,7 +1285,7 @@ public virtual AsyncPageable GetAvailableDelegationsAsync(A /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1308,7 +1312,7 @@ public virtual Pageable GetAvailableDelegations(AzureLocati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1335,7 +1339,7 @@ public virtual AsyncPageable GetAvailableServiceAliasesAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1362,7 +1366,7 @@ public virtual Pageable GetAvailableServiceAliases(AzureL /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1392,7 +1396,7 @@ public virtual AsyncPageable GetAzureFirewallsAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1422,7 +1426,7 @@ public virtual Pageable GetAzureFirewalls(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1448,7 +1452,7 @@ public virtual AsyncPageable GetAzureFirewallFqdnTagsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1474,7 +1478,7 @@ public virtual Pageable GetAzureFirewallFqdnTags(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1504,7 +1508,7 @@ public virtual AsyncPageable GetBastionHostsAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1534,7 +1538,7 @@ public virtual Pageable GetBastionHosts(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1577,7 +1581,7 @@ public virtual async Task> CheckDnsNameAvail /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1620,7 +1624,7 @@ public virtual Response CheckDnsNameAvailability(Azur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1650,7 +1654,7 @@ public virtual AsyncPageable GetCustomIPPrefixesAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1680,7 +1684,7 @@ public virtual Pageable GetCustomIPPrefixes(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1710,7 +1714,7 @@ public virtual AsyncPageable GetDdosProtectionPlansA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1740,7 +1744,7 @@ public virtual Pageable GetDdosProtectionPlans(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1770,7 +1774,7 @@ public virtual AsyncPageable GetDscpConfigurationsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1800,7 +1804,7 @@ public virtual Pageable GetDscpConfigurations(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1827,7 +1831,7 @@ public virtual AsyncPageable GetAvailableEndpointServices /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1854,7 +1858,7 @@ public virtual Pageable GetAvailableEndpointServices(Azur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1884,7 +1888,7 @@ public virtual AsyncPageable GetExpressRouteCircuit /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1914,7 +1918,7 @@ public virtual Pageable GetExpressRouteCircuits(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1940,7 +1944,7 @@ public virtual AsyncPageable GetExpressRouteService /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1966,7 +1970,7 @@ public virtual Pageable GetExpressRouteServiceProvi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1997,7 +2001,7 @@ public virtual AsyncPageable GetExpressRout /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2028,7 +2032,7 @@ public virtual Pageable GetExpressRouteCros /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2058,7 +2062,7 @@ public virtual AsyncPageable GetExpressRoutePortsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2088,7 +2092,7 @@ public virtual Pageable GetExpressRoutePorts(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2118,7 +2122,7 @@ public virtual AsyncPageable GetFirewallPoliciesAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2148,7 +2152,7 @@ public virtual Pageable GetFirewallPolicies(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2178,7 +2182,7 @@ public virtual AsyncPageable GetIPAllocationsAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2208,7 +2212,7 @@ public virtual Pageable GetIPAllocations(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2238,7 +2242,7 @@ public virtual AsyncPageable GetIPGroupsAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2268,7 +2272,7 @@ public virtual Pageable GetIPGroups(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2298,7 +2302,7 @@ public virtual AsyncPageable GetLoadBalancersAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2328,7 +2332,7 @@ public virtual Pageable GetLoadBalancers(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2375,7 +2379,7 @@ public virtual async Task SwapPublicIPAddressesLoadBalancerAsync(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2422,7 +2426,7 @@ public virtual ArmOperation SwapPublicIPAddressesLoadBalancer(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2452,7 +2456,7 @@ public virtual AsyncPageable GetNatGatewaysAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2482,7 +2486,7 @@ public virtual Pageable GetNatGateways(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2512,7 +2516,7 @@ public virtual AsyncPageable GetNetworkInterfacesAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2542,7 +2546,7 @@ public virtual Pageable GetNetworkInterfaces(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2574,7 +2578,7 @@ public virtual AsyncPageable GetNetworkManagersAsync(int /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2606,7 +2610,7 @@ public virtual Pageable GetNetworkManagers(int? top = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2636,7 +2640,7 @@ public virtual AsyncPageable GetNetworkProfilesAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2666,7 +2670,7 @@ public virtual Pageable GetNetworkProfiles(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2696,7 +2700,7 @@ public virtual AsyncPageable GetNetworkSecurityGro /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2726,7 +2730,7 @@ public virtual Pageable GetNetworkSecurityGroups(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2758,7 +2762,7 @@ public virtual AsyncPageable GetNetworkSecurit /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2790,7 +2794,7 @@ public virtual Pageable GetNetworkSecurityPeri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -2817,7 +2821,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -2831,6 +2835,60 @@ public virtual Pageable GetNetwo return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NetworkSecurityPerimeterAssociableResourceType.DeserializeNetworkSecurityPerimeterAssociableResourceType(e), NetworkSecurityPerimeterAssociableResourceTypesClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetNetworkSecurityPerimeterAssociableResourceTypes", "value", "nextLink", cancellationToken); } + /// + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/nspServiceTags + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterServiceTags_List + /// + /// + /// Default Api Version + /// 2024-10-01 + /// + /// + /// + /// The location of network security perimeter. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkSecurityPerimeterServiceTagsAsync(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkSecurityPerimeterServiceTagsRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkSecurityPerimeterServiceTagsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NetworkSecurityPerimeterServiceTags.DeserializeNetworkSecurityPerimeterServiceTags(e), NetworkSecurityPerimeterServiceTagsClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetNetworkSecurityPerimeterServiceTags", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/nspServiceTags + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterServiceTags_List + /// + /// + /// Default Api Version + /// 2024-10-01 + /// + /// + /// + /// The location of network security perimeter. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkSecurityPerimeterServiceTags(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkSecurityPerimeterServiceTagsRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkSecurityPerimeterServiceTagsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NetworkSecurityPerimeterServiceTags.DeserializeNetworkSecurityPerimeterServiceTags(e), NetworkSecurityPerimeterServiceTagsClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetNetworkSecurityPerimeterServiceTags", "value", "nextLink", cancellationToken); + } + /// /// Gets all Network Virtual Appliances in a subscription. /// @@ -2844,7 +2902,7 @@ public virtual Pageable GetNetwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2874,7 +2932,7 @@ public virtual AsyncPageable GetNetworkVirtualA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2904,7 +2962,7 @@ public virtual Pageable GetNetworkVirtualApplia /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2933,7 +2991,7 @@ public virtual AsyncPageable GetNetworkWatchersAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2962,7 +3020,7 @@ public virtual Pageable GetNetworkWatchers(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2992,7 +3050,7 @@ public virtual AsyncPageable GetPrivateEndpointsAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3022,7 +3080,7 @@ public virtual Pageable GetPrivateEndpoints(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3049,7 +3107,7 @@ public virtual AsyncPageable GetAvailablePrivateEn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3076,7 +3134,7 @@ public virtual Pageable GetAvailablePrivateEndpoin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3106,7 +3164,7 @@ public virtual AsyncPageable GetPrivateLinkServicesA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3136,7 +3194,7 @@ public virtual Pageable GetPrivateLinkServices(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3179,7 +3237,7 @@ public virtual async Task> CheckPriva /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3222,7 +3280,7 @@ public virtual ArmOperation CheckPrivateLinkServic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3249,7 +3307,7 @@ public virtual AsyncPageable GetAutoApprovedPriv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3276,7 +3334,7 @@ public virtual Pageable GetAutoApprovedPrivateLi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3306,7 +3364,7 @@ public virtual AsyncPageable GetPublicIPAddressesAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3336,7 +3394,7 @@ public virtual Pageable GetPublicIPAddresses(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3366,7 +3424,7 @@ public virtual AsyncPageable GetPublicIPPrefixesAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3396,7 +3454,7 @@ public virtual Pageable GetPublicIPPrefixes(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3426,7 +3484,7 @@ public virtual AsyncPageable GetRouteFiltersAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3456,7 +3514,7 @@ public virtual Pageable GetRouteFilters(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3486,7 +3544,7 @@ public virtual AsyncPageable GetRouteTablesAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3516,7 +3574,7 @@ public virtual Pageable GetRouteTables(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3546,7 +3604,7 @@ public virtual AsyncPageable GetSecurityPartner /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3576,7 +3634,7 @@ public virtual Pageable GetSecurityPartnerProvi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3602,7 +3660,7 @@ public virtual AsyncPageable GetBgpServiceCommunitiesAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3628,7 +3686,7 @@ public virtual Pageable GetBgpServiceCommunities(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3658,7 +3716,7 @@ public virtual AsyncPageable GetServiceEndpointPo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3688,7 +3746,7 @@ public virtual Pageable GetServiceEndpointPolicie /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3723,7 +3781,7 @@ public virtual async Task> GetServiceTagAsync(Az /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3758,7 +3816,7 @@ public virtual Response GetServiceTag(AzureLocation locat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3787,7 +3845,7 @@ public virtual AsyncPageable GetAllServiceTagInformationA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3816,7 +3874,7 @@ public virtual Pageable GetAllServiceTagInformation(Azure /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3843,7 +3901,7 @@ public virtual AsyncPageable GetUsagesAsync(AzureLocation location /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -3870,7 +3928,7 @@ public virtual Pageable GetUsages(AzureLocation location, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3900,7 +3958,7 @@ public virtual AsyncPageable GetVirtualNetworksAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3930,7 +3988,7 @@ public virtual Pageable GetVirtualNetworks(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3960,7 +4018,7 @@ public virtual AsyncPageable GetVirtualNetworkTapsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3990,7 +4048,7 @@ public virtual Pageable GetVirtualNetworkTaps(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4020,7 +4078,7 @@ public virtual AsyncPageable GetVirtualRoutersAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4050,7 +4108,7 @@ public virtual Pageable GetVirtualRouters(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4080,7 +4138,7 @@ public virtual AsyncPageable GetVirtualWansAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4110,7 +4168,7 @@ public virtual Pageable GetVirtualWans(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4140,7 +4198,7 @@ public virtual AsyncPageable GetVpnSitesAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4170,7 +4228,7 @@ public virtual Pageable GetVpnSites(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4200,7 +4258,7 @@ public virtual AsyncPageable GetVpnServerConfigu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4230,7 +4288,7 @@ public virtual Pageable GetVpnServerConfiguratio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4260,7 +4318,7 @@ public virtual AsyncPageable GetVirtualHubsAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4290,7 +4348,7 @@ public virtual Pageable GetVirtualHubs(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4320,7 +4378,7 @@ public virtual AsyncPageable GetVpnGatewaysAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4350,7 +4408,7 @@ public virtual Pageable GetVpnGateways(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4380,7 +4438,7 @@ public virtual AsyncPageable GetP2SVpnGatewaysAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4410,7 +4468,7 @@ public virtual Pageable GetP2SVpnGateways(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4439,7 +4497,7 @@ public virtual AsyncPageable GetExpressRouteGateway /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4468,7 +4526,7 @@ public virtual Pageable GetExpressRouteGateways(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4498,7 +4556,7 @@ public virtual AsyncPageable GetWebApplica /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs index 214941c082a6..f03d3807d765 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs @@ -2539,7 +2539,7 @@ public static ManagementGroupNetworkManagerConnectionCollection GetManagementGro /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2577,7 +2577,7 @@ public static async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2632,7 +2632,7 @@ public static ApplicationGatewayCollection GetApplicationGateways(this ResourceG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2670,7 +2670,7 @@ public static async Task> GetApplicationGat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2725,7 +2725,7 @@ public static ApplicationSecurityGroupCollection GetApplicationSecurityGroups(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2763,7 +2763,7 @@ public static async Task> GetApplicat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2818,7 +2818,7 @@ public static AzureFirewallCollection GetAzureFirewalls(this ResourceGroupResour /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2856,7 +2856,7 @@ public static async Task> GetAzureFirewallAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2911,7 +2911,7 @@ public static BastionHostCollection GetBastionHosts(this ResourceGroupResource r /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2949,7 +2949,7 @@ public static async Task> GetBastionHostAsync(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3006,7 +3006,7 @@ public static CloudServiceSwapCollection GetCloudServiceSwaps(this ResourceGroup /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3044,7 +3044,7 @@ public static async Task> GetCloudServiceSwap /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3099,7 +3099,7 @@ public static CustomIPPrefixCollection GetCustomIPPrefixes(this ResourceGroupRes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3138,7 +3138,7 @@ public static async Task> GetCustomIPPrefixAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3194,7 +3194,7 @@ public static DdosCustomPolicyCollection GetDdosCustomPolicies(this ResourceGrou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3232,7 +3232,7 @@ public static async Task> GetDdosCustomPolicy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3287,7 +3287,7 @@ public static DdosProtectionPlanCollection GetDdosProtectionPlans(this ResourceG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3325,7 +3325,7 @@ public static async Task> GetDdosProtection /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3380,7 +3380,7 @@ public static DscpConfigurationCollection GetDscpConfigurations(this ResourceGro /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3418,7 +3418,7 @@ public static async Task> GetDscpConfigurati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3473,7 +3473,7 @@ public static ExpressRouteCircuitCollection GetExpressRouteCircuits(this Resourc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3511,7 +3511,7 @@ public static async Task> GetExpressRouteC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3566,7 +3566,7 @@ public static ExpressRouteCrossConnectionCollection GetExpressRouteCrossConnecti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3604,7 +3604,7 @@ public static async Task> GetExpre /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3659,7 +3659,7 @@ public static ExpressRoutePortCollection GetExpressRoutePorts(this ResourceGroup /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3697,7 +3697,7 @@ public static async Task> GetExpressRoutePort /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3752,7 +3752,7 @@ public static FirewallPolicyCollection GetFirewallPolicies(this ResourceGroupRes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3791,7 +3791,7 @@ public static async Task> GetFirewallPolicyAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3847,7 +3847,7 @@ public static IPAllocationCollection GetIPAllocations(this ResourceGroupResource /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3886,7 +3886,7 @@ public static async Task> GetIPAllocationAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3942,7 +3942,7 @@ public static IPGroupCollection GetIPGroups(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -3981,7 +3981,7 @@ public static async Task> GetIPGroupAsync(this Resourc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4037,7 +4037,7 @@ public static LoadBalancerCollection GetLoadBalancers(this ResourceGroupResource /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4076,7 +4076,7 @@ public static async Task> GetLoadBalancerAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4132,7 +4132,7 @@ public static NatGatewayCollection GetNatGateways(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4171,7 +4171,7 @@ public static async Task> GetNatGatewayAsync(this R /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4227,7 +4227,7 @@ public static NetworkInterfaceCollection GetNetworkInterfaces(this ResourceGroup /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4266,7 +4266,7 @@ public static async Task> GetNetworkInterface /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4322,7 +4322,7 @@ public static NetworkManagerCollection GetNetworkManagers(this ResourceGroupReso /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4360,7 +4360,7 @@ public static async Task> GetNetworkManagerAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4415,7 +4415,7 @@ public static NetworkProfileCollection GetNetworkProfiles(this ResourceGroupReso /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4454,7 +4454,7 @@ public static async Task> GetNetworkProfileAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4510,7 +4510,7 @@ public static NetworkSecurityGroupCollection GetNetworkSecurityGroups(this Resou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4549,7 +4549,7 @@ public static async Task> GetNetworkSecur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4605,7 +4605,7 @@ public static NetworkSecurityPerimeterCollection GetNetworkSecurityPerimeters(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4643,7 +4643,7 @@ public static async Task> GetNetworkS /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4698,7 +4698,7 @@ public static NetworkVirtualApplianceCollection GetNetworkVirtualAppliances(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4737,7 +4737,7 @@ public static async Task> GetNetworkVi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4793,7 +4793,7 @@ public static NetworkWatcherCollection GetNetworkWatchers(this ResourceGroupReso /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4831,7 +4831,7 @@ public static async Task> GetNetworkWatcherAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4886,7 +4886,7 @@ public static PrivateEndpointCollection GetPrivateEndpoints(this ResourceGroupRe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4925,7 +4925,7 @@ public static async Task> GetPrivateEndpointAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -4981,7 +4981,7 @@ public static PrivateLinkServiceCollection GetPrivateLinkServices(this ResourceG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5020,7 +5020,7 @@ public static async Task> GetPrivateLinkSer /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5076,7 +5076,7 @@ public static PublicIPAddressCollection GetPublicIPAddresses(this ResourceGroupR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5115,7 +5115,7 @@ public static async Task> GetPublicIPAddressAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5171,7 +5171,7 @@ public static PublicIPPrefixCollection GetPublicIPPrefixes(this ResourceGroupRes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5210,7 +5210,7 @@ public static async Task> GetPublicIPPrefixAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5266,7 +5266,7 @@ public static RouteFilterCollection GetRouteFilters(this ResourceGroupResource r /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5305,7 +5305,7 @@ public static async Task> GetRouteFilterAsync(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5361,7 +5361,7 @@ public static RouteTableCollection GetRouteTables(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5400,7 +5400,7 @@ public static async Task> GetRouteTableAsync(this R /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5456,7 +5456,7 @@ public static SecurityPartnerProviderCollection GetSecurityPartnerProviders(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5494,7 +5494,7 @@ public static async Task> GetSecurityP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5549,7 +5549,7 @@ public static ServiceEndpointPolicyCollection GetServiceEndpointPolicies(this Re /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5588,7 +5588,7 @@ public static async Task> GetServiceEndp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5644,7 +5644,7 @@ public static VirtualNetworkCollection GetVirtualNetworks(this ResourceGroupReso /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5683,7 +5683,7 @@ public static async Task> GetVirtualNetworkAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5739,7 +5739,7 @@ public static VirtualNetworkGatewayCollection GetVirtualNetworkGateways(this Res /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5777,7 +5777,7 @@ public static async Task> GetVirtualNetw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5832,7 +5832,7 @@ public static VirtualNetworkGatewayConnectionCollection GetVirtualNetworkGateway /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5870,7 +5870,7 @@ public static async Task> GetV /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5925,7 +5925,7 @@ public static LocalNetworkGatewayCollection GetLocalNetworkGateways(this Resourc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -5963,7 +5963,7 @@ public static async Task> GetLocalNetworkG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6018,7 +6018,7 @@ public static VirtualNetworkTapCollection GetVirtualNetworkTaps(this ResourceGro /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6056,7 +6056,7 @@ public static async Task> GetVirtualNetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6111,7 +6111,7 @@ public static VirtualRouterCollection GetVirtualRouters(this ResourceGroupResour /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6150,7 +6150,7 @@ public static async Task> GetVirtualRouterAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6206,7 +6206,7 @@ public static VirtualWanCollection GetVirtualWans(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6244,7 +6244,7 @@ public static async Task> GetVirtualWanAsync(this R /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6299,7 +6299,7 @@ public static VpnSiteCollection GetVpnSites(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6337,7 +6337,7 @@ public static async Task> GetVpnSiteAsync(this Resourc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6392,7 +6392,7 @@ public static VpnServerConfigurationCollection GetVpnServerConfigurations(this R /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6430,7 +6430,7 @@ public static async Task> GetVpnServerC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6485,7 +6485,7 @@ public static VirtualHubCollection GetVirtualHubs(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6523,7 +6523,7 @@ public static async Task> GetVirtualHubAsync(this R /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6578,7 +6578,7 @@ public static VpnGatewayCollection GetVpnGateways(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6616,7 +6616,7 @@ public static async Task> GetVpnGatewayAsync(this R /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6671,7 +6671,7 @@ public static P2SVpnGatewayCollection GetP2SVpnGateways(this ResourceGroupResour /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6709,7 +6709,7 @@ public static async Task> GetP2SVpnGatewayAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6764,7 +6764,7 @@ public static ExpressRouteGatewayCollection GetExpressRouteGateways(this Resourc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6802,7 +6802,7 @@ public static async Task> GetExpressRouteG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6857,7 +6857,7 @@ public static WebApplicationFirewallPolicyCollection GetWebApplicationFirewallPo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6895,7 +6895,7 @@ public static async Task> GetWebA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -6933,7 +6933,7 @@ public static Response GetWebApplicationFi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -6966,7 +6966,7 @@ public static AsyncPageable GetAvailableResourceGroupDelega /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -6999,7 +6999,7 @@ public static Pageable GetAvailableResourceGroupDelegations /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7032,7 +7032,7 @@ public static AsyncPageable GetAvailableServiceAliasesByR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7065,7 +7065,7 @@ public static Pageable GetAvailableServiceAliasesByResour /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7098,7 +7098,7 @@ public static AsyncPageable GetAvailablePrivateEnd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7131,7 +7131,7 @@ public static Pageable GetAvailablePrivateEndpoint /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7165,7 +7165,7 @@ public static async Task> CheckPrivat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7199,7 +7199,7 @@ public static ArmOperation CheckPrivateLinkService /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7232,7 +7232,7 @@ public static AsyncPageable GetAutoApprovedPriva /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -7283,7 +7283,7 @@ public static ApplicationGatewayWafDynamicManifestCollection GetApplicationGatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7320,7 +7320,7 @@ public static async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7374,7 +7374,7 @@ public static AzureWebCategoryCollection GetAzureWebCategories(this Subscription /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7413,7 +7413,7 @@ public static async Task> GetAzureWebCategory /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7469,7 +7469,7 @@ public static ExpressRouteProviderPortCollection GetExpressRouteProviderPorts(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7507,7 +7507,7 @@ public static async Task> GetExpressR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7562,7 +7562,7 @@ public static ExpressRoutePortsLocationCollection GetExpressRoutePortsLocations( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7600,7 +7600,7 @@ public static async Task> GetExpress /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7655,7 +7655,7 @@ public static SubscriptionNetworkManagerConnectionCollection GetSubscriptionNetw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7693,7 +7693,7 @@ public static async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7748,7 +7748,7 @@ public static NetworkVirtualApplianceSkuCollection GetNetworkVirtualApplianceSku /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7786,7 +7786,7 @@ public static async Task> GetNetwor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7824,7 +7824,7 @@ public static Response GetNetworkVirtualAppl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7860,7 +7860,7 @@ public static AsyncPageable GetApplicationGatewaysAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7896,7 +7896,7 @@ public static Pageable GetApplicationGateways(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7932,7 +7932,7 @@ public static AsyncPageable GetAvailableServerVariablesApplicationGatewa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -7968,7 +7968,7 @@ public static Pageable GetAvailableServerVariablesApplicationGateways(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8004,7 +8004,7 @@ public static AsyncPageable GetAvailableRequestHeadersApplicationGateway /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8040,7 +8040,7 @@ public static Pageable GetAvailableRequestHeadersApplicationGateways(thi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8076,7 +8076,7 @@ public static AsyncPageable GetAvailableResponseHeadersApplicationGatewa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8112,7 +8112,7 @@ public static Pageable GetAvailableResponseHeadersApplicationGateways(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8148,7 +8148,7 @@ public static AsyncPageable GetAppGatewayAvai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8184,7 +8184,7 @@ public static Pageable GetAppGatewayAvailable /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8219,7 +8219,7 @@ public static async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8254,7 +8254,7 @@ public static Response GetApplication /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8290,7 +8290,7 @@ public static AsyncPageable GetApplicatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8326,7 +8326,7 @@ public static Pageable GetApplicationGate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8363,7 +8363,7 @@ public static async Task> GetApp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8400,7 +8400,7 @@ public static Response GetApplicationGate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8436,7 +8436,7 @@ public static AsyncPageable GetApplicationSecu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8472,7 +8472,7 @@ public static Pageable GetApplicationSecurityG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -8505,7 +8505,7 @@ public static AsyncPageable GetAvailableDelegationsAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -8538,7 +8538,7 @@ public static Pageable GetAvailableDelegations(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -8571,7 +8571,7 @@ public static AsyncPageable GetAvailableServiceAliasesAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -8604,7 +8604,7 @@ public static Pageable GetAvailableServiceAliases(this Su /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8640,7 +8640,7 @@ public static AsyncPageable GetAzureFirewallsAsync(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8676,7 +8676,7 @@ public static Pageable GetAzureFirewalls(this Subscriptio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -8708,7 +8708,7 @@ public static AsyncPageable GetAzureFirewallFqdnTagsAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -8740,7 +8740,7 @@ public static Pageable GetAzureFirewallFqdnTags(this Subsc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8776,7 +8776,7 @@ public static AsyncPageable GetBastionHostsAsync(this Subsc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8812,7 +8812,7 @@ public static Pageable GetBastionHosts(this SubscriptionRes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8849,7 +8849,7 @@ public static async Task> CheckDnsNameAvaila /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8886,7 +8886,7 @@ public static Response CheckDnsNameAvailability(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8922,7 +8922,7 @@ public static AsyncPageable GetCustomIPPrefixesAsync(thi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8958,7 +8958,7 @@ public static Pageable GetCustomIPPrefixes(this Subscrip /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -8994,7 +8994,7 @@ public static AsyncPageable GetDdosProtectionPlansAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9030,7 +9030,7 @@ public static Pageable GetDdosProtectionPlans(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9066,7 +9066,7 @@ public static AsyncPageable GetDscpConfigurationsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9102,7 +9102,7 @@ public static Pageable GetDscpConfigurations(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -9135,7 +9135,7 @@ public static AsyncPageable GetAvailableEndpointServicesA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -9168,7 +9168,7 @@ public static Pageable GetAvailableEndpointServices(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9204,7 +9204,7 @@ public static AsyncPageable GetExpressRouteCircuits /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9240,7 +9240,7 @@ public static Pageable GetExpressRouteCircuits(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -9272,7 +9272,7 @@ public static AsyncPageable GetExpressRouteServiceP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -9304,7 +9304,7 @@ public static Pageable GetExpressRouteServiceProvid /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9341,7 +9341,7 @@ public static AsyncPageable GetExpressRoute /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9378,7 +9378,7 @@ public static Pageable GetExpressRouteCross /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9414,7 +9414,7 @@ public static AsyncPageable GetExpressRoutePortsAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9450,7 +9450,7 @@ public static Pageable GetExpressRoutePorts(this Subsc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9486,7 +9486,7 @@ public static AsyncPageable GetFirewallPoliciesAsync(thi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9522,7 +9522,7 @@ public static Pageable GetFirewallPolicies(this Subscrip /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9558,7 +9558,7 @@ public static AsyncPageable GetIPAllocationsAsync(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9594,7 +9594,7 @@ public static Pageable GetIPAllocations(this SubscriptionR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9630,7 +9630,7 @@ public static AsyncPageable GetIPGroupsAsync(this SubscriptionR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9666,7 +9666,7 @@ public static Pageable GetIPGroups(this SubscriptionResource su /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9702,7 +9702,7 @@ public static AsyncPageable GetLoadBalancersAsync(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9738,7 +9738,7 @@ public static Pageable GetLoadBalancers(this SubscriptionR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9776,7 +9776,7 @@ public static async Task SwapPublicIPAddressesLoadBalancerAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9814,7 +9814,7 @@ public static ArmOperation SwapPublicIPAddressesLoadBalancer(this SubscriptionRe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9850,7 +9850,7 @@ public static AsyncPageable GetNatGatewaysAsync(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9886,7 +9886,7 @@ public static Pageable GetNatGateways(this SubscriptionResou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9922,7 +9922,7 @@ public static AsyncPageable GetNetworkInterfacesAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9958,7 +9958,7 @@ public static Pageable GetNetworkInterfaces(this Subsc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -9996,7 +9996,7 @@ public static AsyncPageable GetNetworkManagersAsync(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10034,7 +10034,7 @@ public static Pageable GetNetworkManagers(this Subscript /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10070,7 +10070,7 @@ public static AsyncPageable GetNetworkProfilesAsync(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10106,7 +10106,7 @@ public static Pageable GetNetworkProfiles(this Subscript /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10142,7 +10142,7 @@ public static AsyncPageable GetNetworkSecurityGrou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10178,7 +10178,7 @@ public static Pageable GetNetworkSecurityGroups(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10216,7 +10216,7 @@ public static AsyncPageable GetNetworkSecurity /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10254,7 +10254,7 @@ public static Pageable GetNetworkSecurityPerim /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10287,7 +10287,7 @@ public static AsyncPageable GetN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10307,6 +10307,72 @@ public static Pageable GetNetwor return GetMockableNetworkSubscriptionResource(subscriptionResource).GetNetworkSecurityPerimeterAssociableResourceTypes(location, cancellationToken); } + /// + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/nspServiceTags + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterServiceTags_List + /// + /// + /// Default Api Version + /// 2024-10-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location of network security perimeter. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkSecurityPerimeterServiceTagsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetworkSubscriptionResource(subscriptionResource).GetNetworkSecurityPerimeterServiceTagsAsync(location, cancellationToken); + } + + /// + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/nspServiceTags + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterServiceTags_List + /// + /// + /// Default Api Version + /// 2024-10-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location of network security perimeter. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkSecurityPerimeterServiceTags(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetworkSubscriptionResource(subscriptionResource).GetNetworkSecurityPerimeterServiceTags(location, cancellationToken); + } + /// /// Gets all Network Virtual Appliances in a subscription. /// @@ -10320,7 +10386,7 @@ public static Pageable GetNetwor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10356,7 +10422,7 @@ public static AsyncPageable GetNetworkVirtualAp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10392,7 +10458,7 @@ public static Pageable GetNetworkVirtualApplian /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10428,7 +10494,7 @@ public static AsyncPageable GetNetworkWatchersAsync(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10464,7 +10530,7 @@ public static Pageable GetNetworkWatchers(this Subscript /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10500,7 +10566,7 @@ public static AsyncPageable GetPrivateEndpointsAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10536,7 +10602,7 @@ public static Pageable GetPrivateEndpoints(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10569,7 +10635,7 @@ public static AsyncPageable GetAvailablePrivateEnd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10602,7 +10668,7 @@ public static Pageable GetAvailablePrivateEndpoint /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10638,7 +10704,7 @@ public static AsyncPageable GetPrivateLinkServicesAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10674,7 +10740,7 @@ public static Pageable GetPrivateLinkServices(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10708,7 +10774,7 @@ public static async Task> CheckPrivat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10742,7 +10808,7 @@ public static ArmOperation CheckPrivateLinkService /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10775,7 +10841,7 @@ public static AsyncPageable GetAutoApprovedPriva /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -10808,7 +10874,7 @@ public static Pageable GetAutoApprovedPrivateLin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10844,7 +10910,7 @@ public static AsyncPageable GetPublicIPAddressesAsync(t /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10880,7 +10946,7 @@ public static Pageable GetPublicIPAddresses(this Subscr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10916,7 +10982,7 @@ public static AsyncPageable GetPublicIPPrefixesAsync(thi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10952,7 +11018,7 @@ public static Pageable GetPublicIPPrefixes(this Subscrip /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -10988,7 +11054,7 @@ public static AsyncPageable GetRouteFiltersAsync(this Subsc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11024,7 +11090,7 @@ public static Pageable GetRouteFilters(this SubscriptionRes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11060,7 +11126,7 @@ public static AsyncPageable GetRouteTablesAsync(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11096,7 +11162,7 @@ public static Pageable GetRouteTables(this SubscriptionResou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11132,7 +11198,7 @@ public static AsyncPageable GetSecurityPartnerP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11168,7 +11234,7 @@ public static Pageable GetSecurityPartnerProvid /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11200,7 +11266,7 @@ public static AsyncPageable GetBgpServiceCommunitiesAsync(t /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11232,7 +11298,7 @@ public static Pageable GetBgpServiceCommunities(this Subscr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11268,7 +11334,7 @@ public static AsyncPageable GetServiceEndpointPol /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11304,7 +11370,7 @@ public static Pageable GetServiceEndpointPolicies /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11336,7 +11402,7 @@ public static async Task> GetServiceTagAsync(thi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11368,7 +11434,7 @@ public static Response GetServiceTag(this SubscriptionRes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11403,7 +11469,7 @@ public static AsyncPageable GetAllServiceTagInformationAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11438,7 +11504,7 @@ public static Pageable GetAllServiceTagInformation(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11471,7 +11537,7 @@ public static AsyncPageable GetUsagesAsync(this SubscriptionResour /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -11504,7 +11570,7 @@ public static Pageable GetUsages(this SubscriptionResource subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11540,7 +11606,7 @@ public static AsyncPageable GetVirtualNetworksAsync(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11576,7 +11642,7 @@ public static Pageable GetVirtualNetworks(this Subscript /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11612,7 +11678,7 @@ public static AsyncPageable GetVirtualNetworkTapsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11648,7 +11714,7 @@ public static Pageable GetVirtualNetworkTaps(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11684,7 +11750,7 @@ public static AsyncPageable GetVirtualRoutersAsync(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11720,7 +11786,7 @@ public static Pageable GetVirtualRouters(this Subscriptio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11756,7 +11822,7 @@ public static AsyncPageable GetVirtualWansAsync(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11792,7 +11858,7 @@ public static Pageable GetVirtualWans(this SubscriptionResou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11828,7 +11894,7 @@ public static AsyncPageable GetVpnSitesAsync(this SubscriptionR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11864,7 +11930,7 @@ public static Pageable GetVpnSites(this SubscriptionResource su /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11900,7 +11966,7 @@ public static AsyncPageable GetVpnServerConfigur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11936,7 +12002,7 @@ public static Pageable GetVpnServerConfiguration /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -11972,7 +12038,7 @@ public static AsyncPageable GetVirtualHubsAsync(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12008,7 +12074,7 @@ public static Pageable GetVirtualHubs(this SubscriptionResou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12044,7 +12110,7 @@ public static AsyncPageable GetVpnGatewaysAsync(this Subscri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12080,7 +12146,7 @@ public static Pageable GetVpnGateways(this SubscriptionResou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12116,7 +12182,7 @@ public static AsyncPageable GetP2SVpnGatewaysAsync(this S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12152,7 +12218,7 @@ public static Pageable GetP2SVpnGateways(this Subscriptio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12188,7 +12254,7 @@ public static AsyncPageable GetExpressRouteGateways /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12224,7 +12290,7 @@ public static Pageable GetExpressRouteGateways(this /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -12260,7 +12326,7 @@ public static AsyncPageable GetWebApplicat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs index dedee7ebca3e..45fab9237939 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string fire /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string firewallPolicyName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string firewallPolicyName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string firewallPolicyName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs index 0cd6dd214b2f..a3b37b2010df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -535,7 +535,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -646,7 +646,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs index c6f6eb058c6a..1afdf5abe9b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs @@ -122,7 +122,7 @@ public virtual FirewallPolicyRuleCollectionGroupCollection GetFirewallPolicyRule /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual FirewallPolicyDraftResource GetFirewallPolicyDraft() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -486,7 +486,7 @@ public virtual async Task> GetFirewallPolicyId /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -524,7 +524,7 @@ public virtual Response GetFirewallPolicyIdpsSignature( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -562,7 +562,7 @@ public virtual async Task> GetFir /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -600,7 +600,7 @@ public virtual Response GetFirewallPolicyI /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -638,7 +638,7 @@ public virtual async Task DeployFirewallPolicyDeploymentAsync(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -676,7 +676,7 @@ public virtual ArmOperation DeployFirewallPolicyDeployment(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -738,7 +738,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -800,7 +800,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -857,7 +857,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -914,7 +914,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -974,7 +974,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs index 64cf45556876..14a5c24a7f43 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ru /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionGroup /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleCollectionGroupName, Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs index ca9c71a272d8..e92f8293e8d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs index 67f7f3e55c07..644d6b4f6914 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs @@ -108,7 +108,7 @@ public virtual FirewallPolicyRuleCollectionGroupDraftResource GetFirewallPolicyR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs index 41abc834e9ca..4a62276a0fc6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string flowLogName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string flowLogName, CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string flowLogName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string flowLogName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs index 76c6275f6b4e..c5c2497db7fc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(NetworkTagsObje /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject networkTagsObj /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs index d0b37a071cbf..9a311169f9ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string frontendIPCo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string frontendIPConfigura /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string frontendIPConfigurationName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs index 6a72cce99a63..cb12cc554b09 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs index 83ed62eaf27a..d2dc4780a191 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ipConfigName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ipConfigName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ipConfigName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs index 3178e309826a..621d3fabe64a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs index 260576f9989a..6eed98a11c3c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string route /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeTableName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeTableName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeTableName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs index 74c55e4dc2e8..3ff7493b901a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs index a096d2a9e9bc..7924cc084cf9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connecti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs index c8930f9e10b5..546d16638882 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs index 457db6f09050..ad9177cc49be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string ipAllo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string ipAllocationName, strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string ipAllocationName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string ipAllocationName, string expand = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs index e15dec3912d5..c622979d825d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkTag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networkTa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs index cfe34f8d2eeb..9d1d86e3b31f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string ipGroupsNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string ipGroupsName, string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string ipGroupsName, strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string ipGroupsName, string expand = null, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs index 278bea09ef91..b07a69bc068d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expand = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkTagsObje /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networkTagsObj /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs index e9719714ab4f..b0f11cec2eff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string inbo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string inboundNatRuleName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string inboundNatRuleName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string inboundNatRuleName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs index 9f6030a114fd..3c235a9071f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs index 0526eebe82b2..af32d4c60d24 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(string ruleCollectionNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual Response Exists(string ruleCollectionName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs index 49ff4a935e34..5bf890002be1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolCollection.cs index 2f4adcf4b190..5f2fb7afaee7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string poolName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string poolName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string skipToken = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string skipToken = null, int? s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.cs index d23622fc0535..1050d10be31c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.cs @@ -111,7 +111,7 @@ public virtual StaticCidrCollection GetStaticCidrs() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetStaticCidrAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetStaticCidr(string staticCidrName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync(IpamPoolPatch /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual Response Update(IpamPoolPatch patch, string ifM /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -463,7 +463,7 @@ public virtual async Task> GetPoolUsageAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual Response GetPoolUsage(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -531,7 +531,7 @@ public virtual AsyncPageable GetAssociatedResourcesAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual Pageable GetAssociatedResources(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -623,7 +623,7 @@ public virtual async Task> AddTagAsync(string key, st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -685,7 +685,7 @@ public virtual Response AddTag(string key, string value, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -742,7 +742,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -799,7 +799,7 @@ public virtual Response SetTags(IDictionary ta /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -859,7 +859,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs index a93ded107342..6ba79b988be9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string loadBa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string loadBalancerName, strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string loadBalancerName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string loadBalancerName, string expand = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs index 9fedd4bbb4fc..c313040874db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs @@ -115,7 +115,7 @@ public virtual BackendAddressPoolCollection GetBackendAddressPools() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetBackendAddres /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual FrontendIPConfigurationCollection GetFrontendIPConfigurations() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetFrontend /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual InboundNatRuleCollection GetInboundNatRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetInboundNatRuleAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual LoadBalancingRuleCollection GetLoadBalancingRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> GetLoadBalancingR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -393,7 +393,7 @@ public virtual OutboundRuleCollection GetOutboundRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> GetOutboundRuleAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual ProbeCollection GetProbes() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -493,7 +493,7 @@ public virtual async Task> GetProbeAsync(string probeNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -524,7 +524,7 @@ public virtual Response GetProbe(string probeName, CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -606,7 +606,7 @@ public virtual Response Get(string expand = null, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -648,7 +648,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -690,7 +690,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -732,7 +732,7 @@ public virtual async Task> UpdateAsync(NetworkTag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -774,7 +774,7 @@ public virtual Response Update(NetworkTagsObject networkTa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -813,7 +813,7 @@ public virtual async Task> MigrateT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -852,7 +852,7 @@ public virtual Response MigrateToIPBased(Mig /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -878,7 +878,7 @@ public virtual AsyncPageable GetLoadBalancerNetworkInt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -904,7 +904,7 @@ public virtual Pageable GetLoadBalancerNetworkInterfac /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -966,7 +966,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1028,7 +1028,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1085,7 +1085,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1142,7 +1142,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1202,7 +1202,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs index b3d642956309..064e4f893588 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string l /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string loadBalancingRuleN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string loadBalancingRuleNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string loadBalancingRuleName, CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs index 6a91056070c7..2f2466342f6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> HealthAsync(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs index 93ec17909ccd..26a52718f091 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string localNetworkGate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string localNetworkGateway /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string localNetworkGatewayName, Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs index 73dd63daf3aa..fa0e4cf86408 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Net /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject ne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/AzureFirewallPacketCaptureResultOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/AzureFirewallPacketCaptureResultOperationSource.cs new file mode 100644 index 000000000000..41a596b4a555 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/AzureFirewallPacketCaptureResultOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network +{ + internal class AzureFirewallPacketCaptureResultOperationSource : IOperationSource + { + AzureFirewallPacketCaptureResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return AzureFirewallPacketCaptureResult.DeserializeAzureFirewallPacketCaptureResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return AzureFirewallPacketCaptureResult.DeserializeAzureFirewallPacketCaptureResult(document.RootElement); + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs index 634f587abf87..ef44425c6958 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkManagerConne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkManagerConnectionName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs index eb8d9c7c5394..cf5890687a9b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs index 938aa59ba4a1..6b6f794d19c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs @@ -120,6 +120,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("path"u8); writer.WriteStringValue(Path); } + if (Optional.IsDefined(IsDedicatedBackendConnectionEnabled)) + { + writer.WritePropertyName("dedicatedBackendConnection"u8); + writer.WriteBooleanValue(IsDedicatedBackendConnectionEnabled.Value); + } + if (Optional.IsDefined(IsValidateCertChainAndExpiryEnabled)) + { + writer.WritePropertyName("validateCertChainAndExpiry"u8); + writer.WriteBooleanValue(IsValidateCertChainAndExpiryEnabled.Value); + } + if (Optional.IsDefined(IsValidateSniEnabled)) + { + writer.WritePropertyName("validateSNI"u8); + writer.WriteBooleanValue(IsValidateSniEnabled.Value); + } + if (Optional.IsDefined(SniName)) + { + writer.WritePropertyName("sniName"u8); + writer.WriteStringValue(SniName); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -165,6 +185,10 @@ internal static ApplicationGatewayBackendHttpSettings DeserializeApplicationGate string affinityCookieName = default; bool? probeEnabled = default; string path = default; + bool? dedicatedBackendConnection = default; + bool? validateCertChainAndExpiry = default; + bool? validateSNI = default; + string sniName = default; NetworkProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -326,6 +350,38 @@ internal static ApplicationGatewayBackendHttpSettings DeserializeApplicationGate path = property0.Value.GetString(); continue; } + if (property0.NameEquals("dedicatedBackendConnection"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dedicatedBackendConnection = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("validateCertChainAndExpiry"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validateCertChainAndExpiry = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("validateSNI"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + validateSNI = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("sniName"u8)) + { + sniName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -363,6 +419,10 @@ internal static ApplicationGatewayBackendHttpSettings DeserializeApplicationGate affinityCookieName, probeEnabled, path, + dedicatedBackendConnection, + validateCertChainAndExpiry, + validateSNI, + sniName, provisioningState); } @@ -674,6 +734,77 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDedicatedBackendConnectionEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dedicatedBackendConnection: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDedicatedBackendConnectionEnabled)) + { + builder.Append(" dedicatedBackendConnection: "); + var boolValue = IsDedicatedBackendConnectionEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsValidateCertChainAndExpiryEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validateCertChainAndExpiry: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsValidateCertChainAndExpiryEnabled)) + { + builder.Append(" validateCertChainAndExpiry: "); + var boolValue = IsValidateCertChainAndExpiryEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsValidateSniEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validateSNI: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsValidateSniEnabled)) + { + builder.Append(" validateSNI: "); + var boolValue = IsValidateSniEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SniName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sniName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SniName)) + { + builder.Append(" sniName: "); + if (SniName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SniName}'''"); + } + else + { + builder.AppendLine($"'{SniName}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.cs index 18d93306d745..756dedf482bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.cs @@ -41,8 +41,12 @@ public ApplicationGatewayBackendHttpSettings() /// Cookie name to use for the affinity cookie. /// Whether the probe is enabled. Default value is false. /// Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + /// Enable or disable dedicated connection per backend server. Default is set to false. + /// Verify or skip both chain and expiry validations of the certificate on the backend server. Default is set to true. + /// When enabled, verifies if the Common Name of the certificate provided by the backend server matches the Server Name Indication (SNI) value. Default value is true. + /// Specify an SNI value to match the common name of the certificate on the backend. By default, the application gateway uses the incoming request’s host header as the SNI. Default value is null. /// The provisioning state of the backend HTTP settings resource. - internal ApplicationGatewayBackendHttpSettings(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, int? port, ApplicationGatewayProtocol? protocol, ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity, int? requestTimeoutInSeconds, WritableSubResource probe, IList authenticationCertificates, IList trustedRootCertificates, ApplicationGatewayConnectionDraining connectionDraining, string hostName, bool? pickHostNameFromBackendAddress, string affinityCookieName, bool? probeEnabled, string path, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) + internal ApplicationGatewayBackendHttpSettings(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, int? port, ApplicationGatewayProtocol? protocol, ApplicationGatewayCookieBasedAffinity? cookieBasedAffinity, int? requestTimeoutInSeconds, WritableSubResource probe, IList authenticationCertificates, IList trustedRootCertificates, ApplicationGatewayConnectionDraining connectionDraining, string hostName, bool? pickHostNameFromBackendAddress, string affinityCookieName, bool? probeEnabled, string path, bool? isDedicatedBackendConnectionEnabled, bool? isValidateCertChainAndExpiryEnabled, bool? isValidateSniEnabled, string sniName, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) { ETag = etag; Port = port; @@ -58,6 +62,10 @@ internal ApplicationGatewayBackendHttpSettings(ResourceIdentifier id, string nam AffinityCookieName = affinityCookieName; ProbeEnabled = probeEnabled; Path = path; + IsDedicatedBackendConnectionEnabled = isDedicatedBackendConnectionEnabled; + IsValidateCertChainAndExpiryEnabled = isValidateCertChainAndExpiryEnabled; + IsValidateSniEnabled = isValidateSniEnabled; + SniName = sniName; ProvisioningState = provisioningState; } @@ -115,6 +123,18 @@ public ResourceIdentifier ProbeId /// Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. [WirePath("properties.path")] public string Path { get; set; } + /// Enable or disable dedicated connection per backend server. Default is set to false. + [WirePath("properties.dedicatedBackendConnection")] + public bool? IsDedicatedBackendConnectionEnabled { get; set; } + /// Verify or skip both chain and expiry validations of the certificate on the backend server. Default is set to true. + [WirePath("properties.validateCertChainAndExpiry")] + public bool? IsValidateCertChainAndExpiryEnabled { get; set; } + /// When enabled, verifies if the Common Name of the certificate provided by the backend server matches the Server Name Indication (SNI) value. Default value is true. + [WirePath("properties.validateSNI")] + public bool? IsValidateSniEnabled { get; set; } + /// Specify an SNI value to match the common name of the certificate on the backend. By default, the application gateway uses the incoming request’s host header as the SNI. Default value is null. + [WirePath("properties.sniName")] + public string SniName { get; set; } /// The provisioning state of the backend HTTP settings resource. [WirePath("properties.provisioningState")] public NetworkProvisioningState? ProvisioningState { get; } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureOperationType.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureOperationType.cs new file mode 100644 index 000000000000..fb7465268cd4 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureOperationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Network.Models +{ + /// The packet capture operation to perform. If the Start operation is selected, please provide all the fields in the firewallPacketCaptureParameters to successfully initiate the packet capture. If the Status or Stop operation is selected, only the operation field is required; all other fields in the firewallPacketCaptureParameters can be omitted to successfully retrieve the capture status or stop the capture. + public readonly partial struct AzureFirewallPacketCaptureOperationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureFirewallPacketCaptureOperationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartValue = "Start"; + private const string StatusValue = "Status"; + private const string StopValue = "Stop"; + + /// Start. + public static AzureFirewallPacketCaptureOperationType Start { get; } = new AzureFirewallPacketCaptureOperationType(StartValue); + /// Status. + public static AzureFirewallPacketCaptureOperationType Status { get; } = new AzureFirewallPacketCaptureOperationType(StatusValue); + /// Stop. + public static AzureFirewallPacketCaptureOperationType Stop { get; } = new AzureFirewallPacketCaptureOperationType(StopValue); + /// Determines if two values are the same. + public static bool operator ==(AzureFirewallPacketCaptureOperationType left, AzureFirewallPacketCaptureOperationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureFirewallPacketCaptureOperationType left, AzureFirewallPacketCaptureOperationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureFirewallPacketCaptureOperationType(string value) => new AzureFirewallPacketCaptureOperationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureFirewallPacketCaptureOperationType other && Equals(other); + /// + public bool Equals(AzureFirewallPacketCaptureOperationType 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/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResult.Serialization.cs new file mode 100644 index 000000000000..367dd743a75b --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResult.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.Network.Models +{ + public partial class AzureFirewallPacketCaptureResult : 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(AzureFirewallPacketCaptureResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StatusCode)) + { + writer.WritePropertyName("statusCode"u8); + writer.WriteStringValue(StatusCode.Value.ToString()); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + 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 + } + } + } + + AzureFirewallPacketCaptureResult 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(AzureFirewallPacketCaptureResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureFirewallPacketCaptureResult(document.RootElement, options); + } + + internal static AzureFirewallPacketCaptureResult DeserializeAzureFirewallPacketCaptureResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureFirewallPacketCaptureResultCode? statusCode = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("statusCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statusCode = new AzureFirewallPacketCaptureResultCode(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureFirewallPacketCaptureResult(statusCode, message, 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(StatusCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StatusCode)) + { + builder.Append(" statusCode: "); + builder.AppendLine($"'{StatusCode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + 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, AzureResourceManagerNetworkContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureResult)} does not support writing '{options.Format}' format."); + } + } + + AzureFirewallPacketCaptureResult 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 DeserializeAzureFirewallPacketCaptureResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResult.cs new file mode 100644 index 000000000000..2aa68cb81c75 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Network.Models +{ + /// Response of an Azure Firewall Packet Capture Operation. + public partial class AzureFirewallPacketCaptureResult + { + /// + /// 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 . + internal AzureFirewallPacketCaptureResult() + { + } + + /// Initializes a new instance of . + /// The response code of the performed packet capture operation. + /// Localized Message String of The Result Of The Azure Firewall Packet Capture Operation. + /// Keeps track of any properties unknown to the library. + internal AzureFirewallPacketCaptureResult(AzureFirewallPacketCaptureResultCode? statusCode, string message, IDictionary serializedAdditionalRawData) + { + StatusCode = statusCode; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The response code of the performed packet capture operation. + [WirePath("statusCode")] + public AzureFirewallPacketCaptureResultCode? StatusCode { get; } + /// Localized Message String of The Result Of The Azure Firewall Packet Capture Operation. + [WirePath("message")] + public string Message { get; } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResultCode.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResultCode.cs new file mode 100644 index 000000000000..a032d9cb6a8e --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureResultCode.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Network.Models +{ + /// The packet capture operation response codes. + public readonly partial struct AzureFirewallPacketCaptureResultCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureFirewallPacketCaptureResultCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotImplementedValue = "NotImplemented"; + private const string AzureFirewallPacketCaptureStartSucceededValue = "AzureFirewallPacketCaptureStartSucceeded"; + private const string AzureFirewallPacketCaptureStartFailedValue = "AzureFirewallPacketCaptureStartFailed"; + private const string AzureFirewallPacketCaptureStartFailedToUploadValue = "AzureFirewallPacketCaptureStartFailedToUpload"; + private const string AzureFirewallPacketCaptureStartFailureValue = "AzureFirewallPacketCaptureStartFailure"; + private const string AzureFirewallPacketCaptureInProgressValue = "AzureFirewallPacketCaptureInProgress"; + private const string AzureFirewallPacketCaptureNotInProgressValue = "AzureFirewallPacketCaptureNotInProgress"; + private const string AzureFirewallPacketCaptureStopSucceededValue = "AzureFirewallPacketCaptureStopSucceeded"; + private const string AzureFirewallPacketCaptureFailedValue = "AzureFirewallPacketCaptureFailed"; + private const string AzureFirewallPacketCaptureCompletedValue = "AzureFirewallPacketCaptureCompleted"; + + /// NotImplemented. + public static AzureFirewallPacketCaptureResultCode NotImplemented { get; } = new AzureFirewallPacketCaptureResultCode(NotImplementedValue); + /// AzureFirewallPacketCaptureStartSucceeded. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartSucceeded { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureStartSucceededValue); + /// AzureFirewallPacketCaptureStartFailed. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailed { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureStartFailedValue); + /// AzureFirewallPacketCaptureStartFailedToUpload. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailedToUpload { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureStartFailedToUploadValue); + /// AzureFirewallPacketCaptureStartFailure. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStartFailure { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureStartFailureValue); + /// AzureFirewallPacketCaptureInProgress. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureInProgress { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureInProgressValue); + /// AzureFirewallPacketCaptureNotInProgress. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureNotInProgress { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureNotInProgressValue); + /// AzureFirewallPacketCaptureStopSucceeded. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureStopSucceeded { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureStopSucceededValue); + /// AzureFirewallPacketCaptureFailed. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureFailed { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureFailedValue); + /// AzureFirewallPacketCaptureCompleted. + public static AzureFirewallPacketCaptureResultCode AzureFirewallPacketCaptureCompleted { get; } = new AzureFirewallPacketCaptureResultCode(AzureFirewallPacketCaptureCompletedValue); + /// Determines if two values are the same. + public static bool operator ==(AzureFirewallPacketCaptureResultCode left, AzureFirewallPacketCaptureResultCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureFirewallPacketCaptureResultCode left, AzureFirewallPacketCaptureResultCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureFirewallPacketCaptureResultCode(string value) => new AzureFirewallPacketCaptureResultCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureFirewallPacketCaptureResultCode other && Equals(other); + /// + public bool Equals(AzureFirewallPacketCaptureResultCode 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/network/Azure.ResourceManager.Network/src/Generated/Models/AzureResourceManagerNetworkContext.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureResourceManagerNetworkContext.cs index 09d194e425c9..1988e5bbf8e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureResourceManagerNetworkContext.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureResourceManagerNetworkContext.cs @@ -131,6 +131,7 @@ namespace Azure.ResourceManager.Network [ModelReaderWriterBuildable(typeof(AzureFirewallNetworkRule))] [ModelReaderWriterBuildable(typeof(AzureFirewallNetworkRuleCollectionData))] [ModelReaderWriterBuildable(typeof(AzureFirewallPacketCaptureFlags))] + [ModelReaderWriterBuildable(typeof(AzureFirewallPacketCaptureResult))] [ModelReaderWriterBuildable(typeof(AzureFirewallPacketCaptureRule))] [ModelReaderWriterBuildable(typeof(AzureFirewallPublicIPAddress))] [ModelReaderWriterBuildable(typeof(AzureFirewallRCAction))] @@ -573,6 +574,8 @@ namespace Azure.ResourceManager.Network [ModelReaderWriterBuildable(typeof(NetworkSecurityPerimeterProfileListResult))] [ModelReaderWriterBuildable(typeof(NetworkSecurityPerimeterProfileResource))] [ModelReaderWriterBuildable(typeof(NetworkSecurityPerimeterResource))] + [ModelReaderWriterBuildable(typeof(NetworkSecurityPerimeterServiceTags))] + [ModelReaderWriterBuildable(typeof(NetworkSecurityPerimeterServiceTagsListResult))] [ModelReaderWriterBuildable(typeof(NetworkSecurityRulesEvaluationResult))] [ModelReaderWriterBuildable(typeof(NetworkSku))] [ModelReaderWriterBuildable(typeof(NetworkSubResource))] @@ -609,6 +612,7 @@ namespace Azure.ResourceManager.Network [ModelReaderWriterBuildable(typeof(NetworkWritableResourceData))] [ModelReaderWriterBuildable(typeof(NextHopContent))] [ModelReaderWriterBuildable(typeof(NextHopResult))] + [ModelReaderWriterBuildable(typeof(NvaInterfaceConfigurationsProperties))] [ModelReaderWriterBuildable(typeof(O365BreakOutCategoryPolicies))] [ModelReaderWriterBuildable(typeof(O365PolicyProperties))] [ModelReaderWriterBuildable(typeof(Office365PolicyProperties))] diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs index d7b83596a842..bd237357436c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs @@ -79,6 +79,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(Operation)) + { + writer.WritePropertyName("operation"u8); + writer.WriteStringValue(Operation.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -123,6 +128,7 @@ internal static FirewallPacketCaptureRequestContent DeserializeFirewallPacketCap AzureFirewallNetworkRuleProtocol? protocol = default; IList flags = default; IList filters = default; + AzureFirewallPacketCaptureOperationType? operation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -196,6 +202,15 @@ internal static FirewallPacketCaptureRequestContent DeserializeFirewallPacketCap filters = array; continue; } + if (property.NameEquals("operation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operation = new AzureFirewallPacketCaptureOperationType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -210,6 +225,7 @@ internal static FirewallPacketCaptureRequestContent DeserializeFirewallPacketCap protocol, flags ?? new ChangeTrackingList(), filters ?? new ChangeTrackingList(), + operation, serializedAdditionalRawData); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs index 1db41decc844..d86e8797064a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs @@ -53,15 +53,16 @@ public FirewallPacketCaptureRequestContent() } /// Initializes a new instance of . - /// Duration of packet capture in seconds. - /// Number of packets to be captured. + /// Duration of packet capture in seconds. If the field is not provided, the default value is 60. + /// Number of packets to be captured. If the field is not provided, the default value is 1000. /// Upload capture location. /// Name of file to be uploaded to sasURL. /// The protocol of packets to capture. /// The tcp-flag type to be captured. Used with protocol TCP. /// Rules to filter packet captures. + /// The Azure Firewall packet capture operation to perform. /// Keeps track of any properties unknown to the library. - internal FirewallPacketCaptureRequestContent(int? durationInSeconds, int? numberOfPacketsToCapture, Uri sasUri, string fileName, AzureFirewallNetworkRuleProtocol? protocol, IList flags, IList filters, IDictionary serializedAdditionalRawData) + internal FirewallPacketCaptureRequestContent(int? durationInSeconds, int? numberOfPacketsToCapture, Uri sasUri, string fileName, AzureFirewallNetworkRuleProtocol? protocol, IList flags, IList filters, AzureFirewallPacketCaptureOperationType? operation, IDictionary serializedAdditionalRawData) { DurationInSeconds = durationInSeconds; NumberOfPacketsToCapture = numberOfPacketsToCapture; @@ -70,13 +71,14 @@ internal FirewallPacketCaptureRequestContent(int? durationInSeconds, int? number Protocol = protocol; Flags = flags; Filters = filters; + Operation = operation; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Duration of packet capture in seconds. + /// Duration of packet capture in seconds. If the field is not provided, the default value is 60. [WirePath("durationInSeconds")] public int? DurationInSeconds { get; set; } - /// Number of packets to be captured. + /// Number of packets to be captured. If the field is not provided, the default value is 1000. [WirePath("numberOfPacketsToCapture")] public int? NumberOfPacketsToCapture { get; set; } /// Upload capture location. @@ -94,5 +96,8 @@ internal FirewallPacketCaptureRequestContent(int? durationInSeconds, int? number /// Rules to filter packet captures. [WirePath("filters")] public IList Filters { get; } + /// The Azure Firewall packet capture operation to perform. + [WirePath("operation")] + public AzureFirewallPacketCaptureOperationType? Operation { get; set; } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancingTransportProtocol.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancingTransportProtocol.cs index f331862b8a74..8f8d27362955 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancingTransportProtocol.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancingTransportProtocol.cs @@ -25,6 +25,7 @@ public LoadBalancingTransportProtocol(string value) private const string UdpValue = "Udp"; private const string TcpValue = "Tcp"; private const string AllValue = "All"; + private const string QuicValue = "Quic"; /// Udp. public static LoadBalancingTransportProtocol Udp { get; } = new LoadBalancingTransportProtocol(UdpValue); @@ -32,6 +33,8 @@ public LoadBalancingTransportProtocol(string value) public static LoadBalancingTransportProtocol Tcp { get; } = new LoadBalancingTransportProtocol(TcpValue); /// All. public static LoadBalancingTransportProtocol All { get; } = new LoadBalancingTransportProtocol(AllValue); + /// Quic. + public static LoadBalancingTransportProtocol Quic { get; } = new LoadBalancingTransportProtocol(QuicValue); /// Determines if two values are the same. public static bool operator ==(LoadBalancingTransportProtocol left, LoadBalancingTransportProtocol right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTags.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTags.Serialization.cs new file mode 100644 index 000000000000..c832f8c4890d --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTags.Serialization.cs @@ -0,0 +1,198 @@ +// 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.Network.Models +{ + public partial class NetworkSecurityPerimeterServiceTags : 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(NetworkSecurityPerimeterServiceTags)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(ServiceTags)) + { + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartArray(); + foreach (var item in ServiceTags) + { + writer.WriteStringValue(item); + } + 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 + } + } + } + + NetworkSecurityPerimeterServiceTags 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(NetworkSecurityPerimeterServiceTags)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterServiceTags(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterServiceTags DeserializeNetworkSecurityPerimeterServiceTags(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList serviceTags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + serviceTags = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterServiceTags(serviceTags ?? 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(ServiceTags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServiceTags)) + { + if (ServiceTags.Any()) + { + builder.Append(" serviceTags: "); + builder.AppendLine("["); + foreach (var item in ServiceTags) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + 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, AzureResourceManagerNetworkContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterServiceTags)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterServiceTags 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 DeserializeNetworkSecurityPerimeterServiceTags(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterServiceTags)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTags.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTags.cs new file mode 100644 index 000000000000..f81efe2bc0d9 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTags.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Network.Models +{ + /// Resource containing list of NSP service tags. + public partial class NetworkSecurityPerimeterServiceTags + { + /// + /// 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 . + internal NetworkSecurityPerimeterServiceTags() + { + ServiceTags = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// NSP service tags. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterServiceTags(IReadOnlyList serviceTags, IDictionary serializedAdditionalRawData) + { + ServiceTags = serviceTags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// NSP service tags. + [WirePath("serviceTags")] + public IReadOnlyList ServiceTags { get; } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTagsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTagsListResult.Serialization.cs new file mode 100644 index 000000000000..2b02f15a91c9 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTagsListResult.Serialization.cs @@ -0,0 +1,219 @@ +// 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.Network.Models +{ + internal partial class NetworkSecurityPerimeterServiceTagsListResult : 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(NetworkSecurityPerimeterServiceTagsListResult)} 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 (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + 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 + } + } + } + + NetworkSecurityPerimeterServiceTagsListResult 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(NetworkSecurityPerimeterServiceTagsListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterServiceTagsListResult(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterServiceTagsListResult DeserializeNetworkSecurityPerimeterServiceTagsListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = 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(NetworkSecurityPerimeterServiceTags.DeserializeNetworkSecurityPerimeterServiceTags(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterServiceTagsListResult(value ?? new ChangeTrackingList(), nextLink, 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(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + 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, AzureResourceManagerNetworkContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterServiceTagsListResult)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterServiceTagsListResult 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 DeserializeNetworkSecurityPerimeterServiceTagsListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterServiceTagsListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTagsListResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTagsListResult.cs new file mode 100644 index 000000000000..d86e7ee091eb --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterServiceTagsListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Network.Models +{ + /// Result of the request to list NSP service tags. + internal partial class NetworkSecurityPerimeterServiceTagsListResult + { + /// + /// 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 . + internal NetworkSecurityPerimeterServiceTagsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets paged list of NSP service tags. + /// Gets the URL to get the next page of results. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterServiceTagsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets paged list of NSP service tags. + public IReadOnlyList Value { get; } + /// Gets the URL to get the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NicTypeInResponse.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NicTypeInResponse.cs index c55c82d856b4..24668c6a5036 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NicTypeInResponse.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NicTypeInResponse.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Network.Models { - /// NIC type - PublicNic, PrivateNic, or AdditionalNic. + /// NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. public readonly partial struct NicTypeInResponse : IEquatable { private readonly string _value; diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaInterfaceConfigurationsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaInterfaceConfigurationsProperties.Serialization.cs new file mode 100644 index 000000000000..d1fb9c29e5d6 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaInterfaceConfigurationsProperties.Serialization.cs @@ -0,0 +1,253 @@ +// 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; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Network.Models +{ + public partial class NvaInterfaceConfigurationsProperties : 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(NvaInterfaceConfigurationsProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + ((IJsonModel)Subnet).Write(writer, options); + } + if (Optional.IsCollectionDefined(PropertiesType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStartArray(); + foreach (var item in PropertiesType) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + 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 + } + } + } + + NvaInterfaceConfigurationsProperties 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(NvaInterfaceConfigurationsProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNvaInterfaceConfigurationsProperties(document.RootElement, options); + } + + internal static NvaInterfaceConfigurationsProperties DeserializeNvaInterfaceConfigurationsProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WritableSubResource subnet = default; + IList type = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnet = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerNetworkContext.Default); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new NvaNicType(item.GetString())); + } + type = array; + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NvaInterfaceConfigurationsProperties(subnet, type ?? new ChangeTrackingList(), name, 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("SubnetId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subnet: "); + builder.AppendLine("{"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Subnet)) + { + builder.Append(" subnet: "); + BicepSerializationHelpers.AppendChildObject(builder, Subnet, options, 2, false, " subnet: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PropertiesType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PropertiesType)) + { + if (PropertiesType.Any()) + { + builder.Append(" type: "); + builder.AppendLine("["); + foreach (var item in PropertiesType) + { + builder.AppendLine($" '{item.ToString()}'"); + } + 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}'"); + } + } + } + + 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, AzureResourceManagerNetworkContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NvaInterfaceConfigurationsProperties)} does not support writing '{options.Format}' format."); + } + } + + NvaInterfaceConfigurationsProperties 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 DeserializeNvaInterfaceConfigurationsProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NvaInterfaceConfigurationsProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaInterfaceConfigurationsProperties.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaInterfaceConfigurationsProperties.cs new file mode 100644 index 000000000000..e26c6d59cf1f --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaInterfaceConfigurationsProperties.cs @@ -0,0 +1,91 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.Network.Models +{ + /// Specifies input parameters required NVA in VNet interface configuration. + public partial class NvaInterfaceConfigurationsProperties + { + /// + /// 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 NvaInterfaceConfigurationsProperties() + { + PropertiesType = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A subnet resource id where the NIC will be deployed. Each subnet resource uri should be unique. + /// Specifies the NIC types for the NVA interface configuration. Allowed values: PrivateNic, PublicNic, AdditionalPrivateNic, AdditionalPublicNic. Only the combination of PrivateNic and PublicNic is currently supported. + /// Specifies the name of the interface. Maximum length is 70 characters. + /// Keeps track of any properties unknown to the library. + internal NvaInterfaceConfigurationsProperties(WritableSubResource subnet, IList propertiesType, string name, IDictionary serializedAdditionalRawData) + { + Subnet = subnet; + PropertiesType = propertiesType; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A subnet resource id where the NIC will be deployed. Each subnet resource uri should be unique. + internal WritableSubResource Subnet { get; set; } + /// Gets or sets Id. + [WirePath("subnet.id")] + public ResourceIdentifier SubnetId + { + get => Subnet is null ? default : Subnet.Id; + set + { + if (Subnet is null) + Subnet = new WritableSubResource(); + Subnet.Id = value; + } + } + + /// Specifies the NIC types for the NVA interface configuration. Allowed values: PrivateNic, PublicNic, AdditionalPrivateNic, AdditionalPublicNic. Only the combination of PrivateNic and PublicNic is currently supported. + [WirePath("type")] + public IList PropertiesType { get; } + /// Specifies the name of the interface. Maximum length is 70 characters. + [WirePath("name")] + public string Name { get; set; } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaNicType.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaNicType.cs new file mode 100644 index 000000000000..41713708f383 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NvaNicType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Network.Models +{ + /// The NvaNicType. + public readonly partial struct NvaNicType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NvaNicType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrivateNicValue = "PrivateNic"; + private const string PublicNicValue = "PublicNic"; + private const string AdditionalPrivateNicValue = "AdditionalPrivateNic"; + private const string AdditionalPublicNicValue = "AdditionalPublicNic"; + + /// The private NIC type. + public static NvaNicType PrivateNic { get; } = new NvaNicType(PrivateNicValue); + /// The public NIC type. + public static NvaNicType PublicNic { get; } = new NvaNicType(PublicNicValue); + /// An additional private NIC type. + public static NvaNicType AdditionalPrivateNic { get; } = new NvaNicType(AdditionalPrivateNicValue); + /// An additional public NIC type. + public static NvaNicType AdditionalPublicNic { get; } = new NvaNicType(AdditionalPublicNicValue); + /// Determines if two values are the same. + public static bool operator ==(NvaNicType left, NvaNicType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NvaNicType left, NvaNicType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NvaNicType(string value) => new NvaNicType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NvaNicType other && Equals(other); + /// + public bool Equals(NvaNicType 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/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.cs index 1e18995b3aea..242dc0b1d8fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Network.Models { - /// Properties of the partner managed resource. + /// Properties of the partner managed resource. Only appliable for SaaS NVA. public partial class PartnerManagedResourceProperties { /// diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.cs index be732f7a1772..d1ebc459a1c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.cs @@ -51,7 +51,7 @@ public VirtualApplianceIPConfiguration() } /// Initializes a new instance of . - /// Name of the IP configuration. + /// For hub NVAs, primary IP configs must be named 'privatenicipconfig' and 'publicnicipconfig', with non-primary configs using these prefixes; no naming restrictions apply for NVAs in VNets. Maximum 80 character are allowed. /// Represents a single IP configuration properties. /// Keeps track of any properties unknown to the library. internal VirtualApplianceIPConfiguration(string name, VirtualApplianceIPConfigurationProperties properties, IDictionary serializedAdditionalRawData) @@ -61,7 +61,7 @@ internal VirtualApplianceIPConfiguration(string name, VirtualApplianceIPConfigur _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Name of the IP configuration. + /// For hub NVAs, primary IP configs must be named 'privatenicipconfig' and 'publicnicipconfig', with non-primary configs using these prefixes; no naming restrictions apply for NVAs in VNets. Maximum 80 character are allowed. [WirePath("name")] public string Name { get; set; } /// Represents a single IP configuration properties. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.cs index 0d0916b17023..24b2b2483758 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.cs @@ -51,7 +51,7 @@ internal VirtualApplianceNicProperties() } /// Initializes a new instance of . - /// NIC type - PublicNic, PrivateNic, or AdditionalNic. + /// NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. /// NIC name. /// Public IP address. /// Private IP address. @@ -67,7 +67,7 @@ internal VirtualApplianceNicProperties(NicTypeInResponse? nicType, string name, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// NIC type - PublicNic, PrivateNic, or AdditionalNic. + /// NIC type - PublicNic, PrivateNic, or AdditionalNic; AdditionalPrivateNic and AdditionalPublicNic are only supported for NVAs deployed in VNets. [WirePath("nicType")] public NicTypeInResponse? NicType { get; } /// NIC name. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs index ea0ee1e25e63..6a8e1d76ab54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string natGatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string natGatewayName, string ex /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string natGatewayName, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string natGatewayName, string expand = null /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs index 7c96b22de914..a4d9583b9327 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networkTags /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs index 2957b1dcc2e1..9e0df1ca8438 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string networ /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string networkGroupName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, string ski /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string networkGroupName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string networkGroupName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs index ac1b69572a2e..2a34ea6268ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs @@ -108,7 +108,7 @@ public virtual NetworkGroupStaticMemberCollection GetNetworkGroupStaticMembers() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetNetworkGroupStaticM /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs index 951ace3b59bf..ebf14aa8e058 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string staticMembe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string staticMemberName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string staticMemberName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs index 5ff184808715..bc00560b11d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs index c7ab0ce91953..8213ef1ee0d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string ne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string networkInterfaceNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string networkInterfaceNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string networkInterfaceName, string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs index 472cd7d479cf..2de6ed089691 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string ipCo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string ipConfigurationName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string ipConfigurationName, CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs index 01892ff34471..dfffbdbc219c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs index bd151a103631..7c1caa852b5e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs @@ -115,7 +115,7 @@ public virtual NetworkInterfaceIPConfigurationCollection GetNetworkInterfaceIPCo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual NetworkInterfaceTapConfigurationCollection GetNetworkInterfaceTap /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetNetworkInte /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual async Task> GetAsync(string ex /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Response Get(string expand = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(Networ /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -496,7 +496,7 @@ public virtual Response Update(NetworkTagsObject netwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual async Task> GetEffectiveRo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual ArmOperation GetEffectiveRouteTable(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -622,7 +622,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -664,7 +664,7 @@ public virtual ArmOperation GetEffectiv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -690,7 +690,7 @@ public virtual AsyncPageable GetNetworkInterfaceLoadBalanc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -716,7 +716,7 @@ public virtual Pageable GetNetworkInterfaceLoadBalancers(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -778,7 +778,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -840,7 +840,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -897,7 +897,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -954,7 +954,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1014,7 +1014,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs index 612cf6a3a1b9..9b2915677434 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tap /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string tapConfigurationNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string tapConfigurationName, CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs index cd259de5a4e8..938dcf5001ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs index 2141b71ec56d..a7e6d5318d80 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string networkManagerName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(int? top = null, string s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkManagerName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkManagerName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs index 968534dd0fa1..b319ce320580 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs @@ -124,7 +124,7 @@ public virtual IpamPoolCollection GetIpamPools() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual async Task> GetIpamPoolAsync(string po /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -193,7 +193,7 @@ public virtual ConnectivityConfigurationCollection GetConnectivityConfigurations /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetConnec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual NetworkGroupCollection GetNetworkGroups() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> GetNetworkGroupAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -331,7 +331,7 @@ public virtual NetworkManagerRoutingConfigurationCollection GetNetworkManagerRou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual ScopeConnectionCollection GetScopeConnections() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> GetScopeConnectionA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -469,7 +469,7 @@ public virtual SecurityAdminConfigurationCollection GetSecurityAdminConfiguratio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -500,7 +500,7 @@ public virtual async Task> GetSecur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual NetworkManagerSecurityUserConfigurationCollection GetNetworkManag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -569,7 +569,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -607,7 +607,7 @@ public virtual NetworkVerifierWorkspaceCollection GetNetworkVerifierWorkspaces() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -638,7 +638,7 @@ public virtual async Task> GetNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -669,7 +669,7 @@ public virtual Response GetNetworkVerifierWork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -709,7 +709,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -749,7 +749,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -792,7 +792,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -835,7 +835,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -877,7 +877,7 @@ public virtual async Task> UpdateAsync(NetworkM /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -919,7 +919,7 @@ public virtual Response Update(NetworkManagerPatch patch /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -953,7 +953,7 @@ public virtual AsyncPageable GetActiveConnectiv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -987,7 +987,7 @@ public virtual Pageable GetActiveConnectivityCo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1021,7 +1021,7 @@ public virtual AsyncPageable GetActiveSecurityAdmin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1055,7 +1055,7 @@ public virtual Pageable GetActiveSecurityAdminRules /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1097,7 +1097,7 @@ public virtual async Task> PostNetworkManager /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1139,7 +1139,7 @@ public virtual ArmOperation PostNetworkManagerCommit(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1169,7 +1169,7 @@ public virtual AsyncPageable GetNetworkManagerDe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -1199,7 +1199,7 @@ public virtual Pageable GetNetworkManagerDeploym /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1261,7 +1261,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1323,7 +1323,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1380,7 +1380,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1437,7 +1437,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1497,7 +1497,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationCollection.cs index 8c316334220c..ab358cfb2c5b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.cs index 9b54b63fdcd5..33f2903bdacb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.cs @@ -108,7 +108,7 @@ public virtual NetworkManagerRoutingRulesCollection GetAllNetworkManagerRoutingR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetNetwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetNetworkManagerRou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleCollection.cs index 33358fc35196..81ceb3747f0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.cs index 918c3c4589fa..a30de18e8ada 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesCollection.cs index 6a860a6eb760..9d07e6e94529 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleColle /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleCollectionName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.cs index ccaa79f9d358..dd13223b4a32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.cs @@ -109,7 +109,7 @@ public virtual NetworkManagerRoutingRuleCollection GetNetworkManagerRoutingRules /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetNetwor /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetNetworkManagerRout /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationCollection.cs index 99f70b8f22e2..3358d909b22d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.cs index 570d8ab963e1..a84d353750c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.cs @@ -108,7 +108,7 @@ public virtual NetworkManagerSecurityUserRulesCollection GetAllNetworkManagerSec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetNetworkManag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleCollection.cs index ad82053dbae9..2d74865efec2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.cs index d653fe55d08d..6dc03656f539 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesCollection.cs index ad0983c593a0..52adf20f49f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string rule /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleCollectionName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.cs index 3a95ea8054cc..b854c100f0ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.cs @@ -109,7 +109,7 @@ public virtual NetworkManagerSecurityUserRuleCollection GetNetworkManagerSecurit /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetNetworkManage /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs index cddd593360a4..017bcd968e62 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string peC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string peConnectionName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string peConnectionName, string expand = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs index d5ab2b5b59b8..1516709827e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(string exp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs index ad5bd70fa6fd..8a0561d8504d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string networkProfileName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string networkProfileName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkProfileName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs index 50ede2040c6d..7253b7ff2897 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs index c8629498dd94..377d5a4dc2bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string networkSecurity /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string networkSecurityGrou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string networkSecurityGroupName, string exp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs index ad0df060ab4a..e93896d99bff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs @@ -110,7 +110,7 @@ public virtual SecurityRuleCollection GetSecurityRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetSecurityRuleAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DefaultSecurityRuleCollection GetDefaultSecurityRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetDefaultSecur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDefaultSecurityRule(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(string expand = null, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> UpdateAsync(Ne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -491,7 +491,7 @@ public virtual Response Update(NetworkTagsObject n /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -553,7 +553,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -615,7 +615,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -672,7 +672,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -729,7 +729,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -789,7 +789,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleCollection.cs index 36fcd6742ea4..6009405d5b33 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string a /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string accessRuleName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string accessRuleName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.cs index a1c138ed656c..ed8f9002b329 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationCollection.cs index 1f57305fcf1d..4f98fb0d1a61 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string associationName, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string associationName, CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.cs index 68784f3df636..dddd0fb964f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterCollection.cs index 48cb45198f3c..4d0be053611b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string networkSecu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(int? top = null /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkSecurityPeri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkSecurityPerimeterName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkCollection.cs index 69734cbbf910..1f2e3cee3bdb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string linkNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(i /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string linkName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string linkName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceCollection.cs index 553c83f6cd34..fb0c89c55ccd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(in /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string linkReferenceName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string linkReferenceName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.cs index 1d9002c06a0c..f2addee254eb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.cs index 21793dd245bc..ff52bb9f41ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationCollection.cs index 668824e327e8..049afb3ac6f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string loggingConfiguratio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string loggingConfigurationName, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.cs index 3cbae25cb32c..0cd3263f9dac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileCollection.cs index db1470d5c5f0..6ae27b8c46be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string prof /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string profileName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string profileName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.cs index 58507a59f110..4acf51da92af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.cs @@ -108,7 +108,7 @@ public virtual NetworkSecurityPerimeterAccessRuleCollection GetNetworkSecurityPe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetNetworkSe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.cs index 673f03e28ad1..105f61b7d560 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.cs @@ -110,7 +110,7 @@ public virtual NetworkSecurityPerimeterProfileCollection GetNetworkSecurityPerim /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual NetworkSecurityPerimeterAssociationCollection GetNetworkSecurityP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual NetworkSecurityPerimeterLinkCollection GetNetworkSecurityPerimete /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetNet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual NetworkSecurityPerimeterLinkReferenceCollection GetNetworkSecurit /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual NetworkSecurityPerimeterLoggingConfigurationCollection GetNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -488,7 +488,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -528,7 +528,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -571,7 +571,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -614,7 +614,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDeletion = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -656,7 +656,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -698,7 +698,7 @@ public virtual Response Update(NetworkSecurity /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -760,7 +760,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -822,7 +822,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -879,7 +879,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -936,7 +936,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -996,7 +996,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceCollection.cs index dac63e9bf12e..63664c2cee8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string workspaceNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string skipToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task> ExistsAsync(string workspaceName, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response Exists(string workspaceName, CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.cs index 289a82614689..89e622a6d833 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.cs @@ -110,7 +110,7 @@ public virtual ReachabilityAnalysisIntentCollection GetReachabilityAnalysisInten /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetReach /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ReachabilityAnalysisRunCollection GetReachabilityAnalysisRuns() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetReachabi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetReachabilityAnalysis /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -493,7 +493,7 @@ public virtual Response Update(NetworkVerifier /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -555,7 +555,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -617,7 +617,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -674,7 +674,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -731,7 +731,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -791,7 +791,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs index 246a53c5d4f1..771a54871a5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string networkVirtu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string networkVirtualAppli /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string networkVirtualApplianceName, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs index 826d281b9de0..04469766889b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs index a06a0daccd40..6bc96f676a6e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs index 4bbf763e9ef3..42f0f8347385 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs @@ -9,6 +9,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Text; using System.Text.Json; using Azure.Core; @@ -187,6 +188,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partnerManagedResource"u8); writer.WriteObjectValue(PartnerManagedResource, options); } + if (Optional.IsCollectionDefined(NvaInterfaceConfigurations)) + { + writer.WritePropertyName("nvaInterfaceConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in NvaInterfaceConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(PrivateIPAddress)) + { + writer.WritePropertyName("privateIpAddress"u8); + writer.WriteStringValue(PrivateIPAddress.ToString()); + } writer.WriteEndObject(); } @@ -236,6 +252,8 @@ internal static NetworkVirtualApplianceData DeserializeNetworkVirtualApplianceDa string deploymentType = default; VirtualApplianceDelegationProperties delegation = default; PartnerManagedResourceProperties partnerManagedResource = default; + IList nvaInterfaceConfigurations = default; + IPAddress privateIPAddress = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -508,6 +526,29 @@ internal static NetworkVirtualApplianceData DeserializeNetworkVirtualApplianceDa partnerManagedResource = PartnerManagedResourceProperties.DeserializePartnerManagedResourceProperties(property0.Value, options); continue; } + if (property0.NameEquals("nvaInterfaceConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(NvaInterfaceConfigurationsProperties.DeserializeNvaInterfaceConfigurationsProperties(item, options)); + } + nvaInterfaceConfigurations = array; + continue; + } + if (property0.NameEquals("privateIpAddress"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateIPAddress = IPAddress.Parse(property0.Value.GetString()); + continue; + } } continue; } @@ -544,7 +585,9 @@ internal static NetworkVirtualApplianceData DeserializeNetworkVirtualApplianceDa provisioningState, deploymentType, delegation, - partnerManagedResource); + partnerManagedResource, + nvaInterfaceConfigurations ?? new ChangeTrackingList(), + privateIPAddress); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -1097,6 +1140,44 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NvaInterfaceConfigurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nvaInterfaceConfigurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(NvaInterfaceConfigurations)) + { + if (NvaInterfaceConfigurations.Any()) + { + builder.Append(" nvaInterfaceConfigurations: "); + builder.AppendLine("["); + foreach (var item in NvaInterfaceConfigurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " nvaInterfaceConfigurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIpAddress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateIPAddress)) + { + builder.Append(" privateIpAddress: "); + builder.AppendLine($"'{PrivateIPAddress.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.cs index 589ba7b76267..20e0c26f6c14 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Net; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; @@ -31,6 +32,7 @@ public NetworkVirtualApplianceData() VirtualApplianceSites = new ChangeTrackingList(); VirtualApplianceConnections = new ChangeTrackingList(); InboundSecurityRules = new ChangeTrackingList(); + NvaInterfaceConfigurations = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -52,16 +54,18 @@ public NetworkVirtualApplianceData() /// Public key for SSH login. /// List of Virtual Appliance Network Interfaces. /// Network Profile containing configurations for Public and Private NIC. - /// Details required for Additional Network Interface. + /// Details required for Additional Network Interface. This property is not compatible with the NVA deployed in VNets. /// List of Resource Uri of Public IPs for Internet Ingress Scenario. /// List of references to VirtualApplianceSite. /// List of references to VirtualApplianceConnections. /// List of references to InboundSecurityRules. /// The provisioning state of the resource. /// The deployment type. PartnerManaged for the SaaS NVA. - /// The delegation for the Virtual Appliance. + /// The delegation for the Virtual Appliance. Only appliable for SaaS NVA. /// The delegation for the Virtual Appliance. - internal NetworkVirtualApplianceData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ManagedServiceIdentity identity, ETag? etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IList bootStrapConfigurationBlobs, WritableSubResource virtualHub, IList cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, IReadOnlyList virtualApplianceNics, NetworkVirtualAppliancePropertiesFormatNetworkProfile networkProfile, IList additionalNics, IList internetIngressPublicIPs, IReadOnlyList virtualApplianceSites, IReadOnlyList virtualApplianceConnections, IReadOnlyList inboundSecurityRules, NetworkProvisioningState? provisioningState, string deploymentType, VirtualApplianceDelegationProperties delegation, PartnerManagedResourceProperties partnerManagedResource) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) + /// The NVA in VNet interface configurations. + /// A Internal Load Balancer's HA port frontend IP address. Can be used to set routes & UDR to load balance traffic between NVA instances. + internal NetworkVirtualApplianceData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ManagedServiceIdentity identity, ETag? etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IList bootStrapConfigurationBlobs, WritableSubResource virtualHub, IList cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, IReadOnlyList virtualApplianceNics, NetworkVirtualAppliancePropertiesFormatNetworkProfile networkProfile, IList additionalNics, IList internetIngressPublicIPs, IReadOnlyList virtualApplianceSites, IReadOnlyList virtualApplianceConnections, IReadOnlyList inboundSecurityRules, NetworkProvisioningState? provisioningState, string deploymentType, VirtualApplianceDelegationProperties delegation, PartnerManagedResourceProperties partnerManagedResource, IList nvaInterfaceConfigurations, IPAddress privateIPAddress) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) { Identity = identity; ETag = etag; @@ -84,6 +88,8 @@ internal NetworkVirtualApplianceData(ResourceIdentifier id, string name, Resourc DeploymentType = deploymentType; Delegation = delegation; PartnerManagedResource = partnerManagedResource; + NvaInterfaceConfigurations = nvaInterfaceConfigurations; + PrivateIPAddress = privateIPAddress; } /// The service principal that has read access to cloud-init and config blob. @@ -145,7 +151,7 @@ public IList NetworkInterfaceConf } } - /// Details required for Additional Network Interface. + /// Details required for Additional Network Interface. This property is not compatible with the NVA deployed in VNets. [WirePath("properties.additionalNics")] public IList AdditionalNics { get; } /// List of Resource Uri of Public IPs for Internet Ingress Scenario. @@ -166,11 +172,17 @@ public IList NetworkInterfaceConf /// The deployment type. PartnerManaged for the SaaS NVA. [WirePath("properties.deploymentType")] public string DeploymentType { get; } - /// The delegation for the Virtual Appliance. + /// The delegation for the Virtual Appliance. Only appliable for SaaS NVA. [WirePath("properties.delegation")] public VirtualApplianceDelegationProperties Delegation { get; set; } /// The delegation for the Virtual Appliance. [WirePath("properties.partnerManagedResource")] public PartnerManagedResourceProperties PartnerManagedResource { get; set; } + /// The NVA in VNet interface configurations. + [WirePath("properties.nvaInterfaceConfigurations")] + public IList NvaInterfaceConfigurations { get; } + /// A Internal Load Balancer's HA port frontend IP address. Can be used to set routes & UDR to load balance traffic between NVA instances. + [WirePath("properties.privateIpAddress")] + public IPAddress PrivateIPAddress { get; } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs index 4a9058ea1ca1..767f0281217f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs @@ -110,7 +110,7 @@ public virtual VirtualApplianceSiteCollection GetVirtualApplianceSites() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetVirtualAppl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual InboundSecurityRuleCollection GetInboundSecurityRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetInboundSecur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual NetworkVirtualApplianceConnectionCollection GetNetworkVirtualAppl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetNetworkVir /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -392,7 +392,7 @@ public virtual Response Get(string expand = nul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -476,7 +476,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -518,7 +518,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual Response Update(NetworkTagsObjec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> Rest /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -646,7 +646,7 @@ public virtual ArmOperation Restart(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -689,7 +689,7 @@ public virtual async Task> Reim /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -732,7 +732,7 @@ public virtual ArmOperation Reimage(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -778,7 +778,7 @@ public virtual async Task> GetBo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -824,7 +824,7 @@ public virtual ArmOperation GetBootDiagnostic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -886,7 +886,7 @@ public virtual async Task> AddTagAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -948,7 +948,7 @@ public virtual Response AddTag(string key, stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1005,7 +1005,7 @@ public virtual async Task> SetTagsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1062,7 +1062,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1122,7 +1122,7 @@ public virtual async Task> RemoveTagAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs index 8395a01c0bc9..09d1188dfc32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string skuName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string skuName, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string skuName, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs index c56f58bf70fa..c280ade300a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs index ad41b3775c94..c788847cae92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string networkWatcherName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string networkWatcherName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string networkWatcherName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs index 1d492fc5937a..0b2fccebf269 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs @@ -110,7 +110,7 @@ public virtual PacketCaptureCollection GetPacketCaptures() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetPacketCaptureAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ConnectionMonitorCollection GetConnectionMonitors() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetConnectionMoni /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual FlowLogCollection GetFlowLogs() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetFlowLogAsync(string flow /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetFlowLog(string flowLogName, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -558,7 +558,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -600,7 +600,7 @@ public virtual async Task> GetTopologyAsync(TopologyCo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -642,7 +642,7 @@ public virtual Response GetTopology(TopologyContent content, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -688,7 +688,7 @@ public virtual async Task> VerifyIPFlowAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -734,7 +734,7 @@ public virtual ArmOperation VerifyIPFlow(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -780,7 +780,7 @@ public virtual async Task> GetNextHopAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -826,7 +826,7 @@ public virtual ArmOperation GetNextHop(WaitUntil waitUntil, NextH /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -872,7 +872,7 @@ public virtual async Task> GetVmSecurityRu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -918,7 +918,7 @@ public virtual ArmOperation GetVmSecurityRules(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -964,7 +964,7 @@ public virtual async Task> GetTroubleshootin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1010,7 +1010,7 @@ public virtual ArmOperation GetTroubleshooting(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1056,7 +1056,7 @@ public virtual async Task> GetTroubleshootin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1102,7 +1102,7 @@ public virtual ArmOperation GetTroubleshootingResult(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1148,7 +1148,7 @@ public virtual async Task> SetFlowLogConfigurat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1194,7 +1194,7 @@ public virtual ArmOperation SetFlowLogConfiguration(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1240,7 +1240,7 @@ public virtual async Task> GetFlowLogStatusAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1286,7 +1286,7 @@ public virtual ArmOperation GetFlowLogStatus(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1332,7 +1332,7 @@ public virtual async Task> CheckConnectivi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1378,7 +1378,7 @@ public virtual ArmOperation CheckConnectivity(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1424,7 +1424,7 @@ public virtual async Task> GetAzureReachab /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1470,7 +1470,7 @@ public virtual ArmOperation GetAzureReachabilityReport( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1516,7 +1516,7 @@ public virtual async Task> GetAvailableProv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1562,7 +1562,7 @@ public virtual ArmOperation GetAvailableProviders(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1608,7 +1608,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1654,7 +1654,7 @@ public virtual ArmOperation GetNetworkCo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1716,7 +1716,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1778,7 +1778,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1835,7 +1835,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1892,7 +1892,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1952,7 +1952,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs index 7ccc97cb0537..f47c861c34f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string outbou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string outboundRuleName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string outboundRuleName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string outboundRuleName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs index 7f23b307f5f0..2d1d8a41516c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs index 4200e6010a80..4d698c0c47db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string gatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string gatewayName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs index 8c37631b94a6..9ada603a1e8e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> ResetAsync(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation Reset(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual async Task> GenerateVpnProfileAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -535,7 +535,7 @@ public virtual ArmOperation GenerateVpnProfile(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -577,7 +577,7 @@ public virtual async Task> GetP2SVpnConnecti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -619,7 +619,7 @@ public virtual ArmOperation GetP2SVpnConnectionHealth(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -665,7 +665,7 @@ public virtual async Task> GetP2SVpnConnect /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -711,7 +711,7 @@ public virtual ArmOperation GetP2SVpnConnectionHealthDet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -757,7 +757,7 @@ public virtual async Task DisconnectP2SVpnConnectionsAsync(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -803,7 +803,7 @@ public virtual ArmOperation DisconnectP2SVpnConnections(WaitUntil waitUntil, P2S /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -865,7 +865,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -927,7 +927,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -984,7 +984,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1041,7 +1041,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1101,7 +1101,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs index fa0558617006..47b83ce11e7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string packe /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string packetCaptureName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string packetCaptureName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string packetCaptureName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs index 4dfbc82150f2..6b38023ec9a1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, P /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GetStatu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs index cbbbbdaa490b..98454e10a362 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs index 157853fcfa22..00e2a52fd7a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs index 861a74388798..a87928af27f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Update(PolicyS /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs index abbb59d1d899..e7787ab4332b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string privateDnsZoneGr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateDnsZoneGroup /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateDnsZoneGroupName, Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs index 34ac93bfe62e..f3f3232fcf1d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs index 599e0648b967..fd6784c8b69d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string pri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string privateEndpointName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string privateEndpointName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string privateEndpointName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs index 35c7126cee94..08b878cc33e8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs @@ -109,7 +109,7 @@ public virtual PrivateDnsZoneGroupCollection GetPrivateDnsZoneGroups() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetPrivateDnsZo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetPrivateDnsZoneGroup(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string exp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expand = null, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -543,7 +543,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -710,7 +710,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs index 2858ac6b96e6..9513a5c78e75 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string serviceName, stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string serviceName, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string serviceName, string expand = null, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs index 025dc80c5ebd..d42031d6165f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs @@ -109,7 +109,7 @@ public virtual NetworkPrivateEndpointConnectionCollection GetNetworkPrivateEndpo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetNetworkPriv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string expand = null, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -488,7 +488,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -545,7 +545,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -712,7 +712,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs index 52fde46ed0fb..334ae9b13ad3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string probeName, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string probeName, CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string probeName, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string probeName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs index 979040c00753..88fa4daec67f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs index 7282289ab753..6023c8c8435d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string pub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string publicIPAddressName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicIPAddressName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string publicIPAddressName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs index 1d17625679e7..f6aa27bdb60a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string exp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networ /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task> Ddos /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -437,7 +437,7 @@ public virtual ArmOperation DdosProtectionSt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -618,7 +618,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -675,7 +675,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -735,7 +735,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs index 480e30455fbd..67f422c4724c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string publ /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string publicIPPrefixName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicIPPrefixName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string publicIPPrefixName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs index f6fda1848c2c..236c2cea8ceb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentCollection.cs index 5a3e0c116540..c68d548f33aa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string reachabil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string skipTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string reachabilityAnalysi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string reachabilityAnalysisIntentName, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.cs index aff631ef81f7..6cdda1af6fcb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunCollection.cs index 275e6f90c9a1..8d86a07e72af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string reachability /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string skipToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string reachabilityAnalysi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string reachabilityAnalysisRunName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.cs index 80bc617bf247..b0c7dcebc2fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs index 80aebbb710ed..b4da9112a6c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs @@ -32,7 +32,7 @@ public AdminRuleCollectionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs index 31d2c9e447d3..9ff870411ffe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs @@ -32,7 +32,7 @@ public AdminRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs index cba51f7eae5b..c479948c7910 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationGatewayPrivateEndpointConnectionsRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs index d1f64ce6445b..45516f10754c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationGatewayPrivateLinkResourcesRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs index 51c40a8428a0..a68065096065 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs @@ -31,7 +31,7 @@ public ApplicationGatewayWafDynamicManifestsDefaultRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs index 0b8b3f1711ac..f5a16195e776 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationGatewayWafDynamicManifestsRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs index 185a9ceec28e..93490224ad2f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs @@ -33,7 +33,7 @@ public ApplicationGatewaysRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs index c48b662587a0..9248d629e7fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationSecurityGroupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs index dd101083ff6c..162e88c6cf9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs @@ -32,7 +32,7 @@ public AvailableDelegationsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs index 8babe4ad5c8e..caca1e6eb8cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs @@ -32,7 +32,7 @@ public AvailableEndpointServicesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs index 972ba6fbef81..2566d3c5a116 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs @@ -32,7 +32,7 @@ public AvailablePrivateEndpointTypesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs index d39c5e1af89c..d61384eb3ddf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs @@ -32,7 +32,7 @@ public AvailableResourceGroupDelegationsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs index faaaafdd3abe..b93371b27c6d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs @@ -32,7 +32,7 @@ public AvailableServiceAliasesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs index ca0d802d497e..62e44e6bcbf8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs @@ -32,7 +32,7 @@ public AzureFirewallFqdnTagsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs index a764b1caa349..13b6ab94971c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs @@ -32,7 +32,7 @@ public AzureFirewallsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -744,6 +744,100 @@ public Response PacketCapture(string subscriptionId, string resourceGroupName, s } } + internal RequestUriBuilder CreatePacketCaptureOperationRequestUri(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent 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.Network/azureFirewalls/", false); + uri.AppendPath(azureFirewallName, true); + uri.AppendPath("/packetCaptureOperation", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePacketCaptureOperationRequest(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent 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.Network/azureFirewalls/", false); + uri.AppendPath(azureFirewallName, true); + uri.AppendPath("/packetCaptureOperation", 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; + } + + /// Runs a packet capture operation on AzureFirewall. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the azure firewall. + /// Parameters supplied to run packet capture on azure firewall. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task PacketCaptureOperationAsync(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureFirewallName, nameof(azureFirewallName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePacketCaptureOperationRequest(subscriptionId, resourceGroupName, azureFirewallName, 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); + } + } + + /// Runs a packet capture operation on AzureFirewall. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the azure firewall. + /// Parameters supplied to run packet capture on azure firewall. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response PacketCaptureOperation(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureFirewallName, nameof(azureFirewallName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePacketCaptureOperationRequest(subscriptionId, resourceGroupName, azureFirewallName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs index 5078b5e39fea..188e4d17b6f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs @@ -32,7 +32,7 @@ public BastionHostsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs index ea253fd5f702..1009838368de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs @@ -32,7 +32,7 @@ public BgpServiceCommunitiesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs index a41083670d74..f1597cc687f3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs @@ -32,7 +32,7 @@ public ConfigurationPolicyGroupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs index c9329a7d7e06..1182179012f3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs @@ -32,7 +32,7 @@ public ConnectionMonitorsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs index aa57eafdebb3..266cab8e0875 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public ConnectivityConfigurationsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs index a494fe93921c..dbeb48d77cad 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs @@ -32,7 +32,7 @@ public CustomIPPrefixesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs index 23a5f1c189a2..34c079be64ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DdosCustomPoliciesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs index 614d9a96e18a..fcd8c02c76d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs @@ -32,7 +32,7 @@ public DdosProtectionPlansRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs index 9d23151c4312..cf9a80b9c2e8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs @@ -32,7 +32,7 @@ public DefaultSecurityRulesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs index f4803e9fb4bd..707ac9ece358 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public DscpConfigurationRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs index c37b3ae35a8c..161c54e48ab4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitAuthorizationsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs index 47e255a69da9..dbde58e525d1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitConnectionsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs index 86f3233ae221..886d4f3e3704 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitPeeringsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs index 169f87bcdce2..c968b1fa510e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs index 3eeeacad967c..051cacb19fd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteConnectionsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs index f4dfcf7d2a12..60883c604046 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCrossConnectionPeeringsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs index 597c8f08abfa..2cb5fd782ce5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCrossConnectionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs index ee4611c55902..bd1de6d8375b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteGatewaysRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs index 374109ac158c..8e0ab08e85fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteLinksRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs index 5db18c0693ca..328b862ea514 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRoutePortAuthorizationsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs index 730ebfa6366c..48d15f07dc34 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRoutePortsLocationsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs index 964c835301fb..cac744b6d2e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRoutePortsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs index 599dc1d96fb6..8c7060478647 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteProviderPortsLocationRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs index 796d432e5c40..802811a00861 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteServiceProvidersRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs index d8dfa2e8dfbe..ad88c235565e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPoliciesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs index a52a6ff54b86..abe3d6b30ab9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs @@ -30,7 +30,7 @@ public FirewallPolicyDeploymentsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs index 16e0455cb844..52acc26c6cfb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs @@ -31,7 +31,7 @@ public FirewallPolicyDraftsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs index 3d34c01e0702..84a1ef5d7c7e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyIdpsSignaturesFilterValuesRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs index de83ef6e1d40..9c1b2690b8dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyIdpsSignaturesOverridesRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs index 419b096f7a93..3bad17810613 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyIdpsSignaturesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs index 070e688e2c5c..5cb477f713cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs @@ -31,7 +31,7 @@ public FirewallPolicyRuleCollectionGroupDraftsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs index ebcf44d7e36f..15420fc0e1d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyRuleCollectionGroupsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs index a07ea2eed08c..10a545e795bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs @@ -32,7 +32,7 @@ public FlowLogsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs index 8d94b182f5a2..9368eb416dbb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs @@ -32,7 +32,7 @@ public HubRouteTablesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs index 3df1486f4f3f..15d5bacae0cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public HubVirtualNetworkConnectionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs index aad3bbcf7c5e..9a806f7518ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs @@ -32,7 +32,7 @@ public InboundNatRulesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs index 42cdc1de68c3..dfcf2df37cc9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs @@ -31,7 +31,7 @@ public InboundSecurityRuleRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs index ae0e9b485a1a..954854a98dd3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs @@ -32,7 +32,7 @@ public IpAllocationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs index 0d97c61a5896..6c9764520bbf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs @@ -32,7 +32,7 @@ public IpGroupsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpamPoolsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpamPoolsRestOperations.cs index 053b06ae792e..60c12559cb74 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpamPoolsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpamPoolsRestOperations.cs @@ -27,12 +27,12 @@ internal partial class IpamPoolsRestOperations /// The application id to use for user agent. /// server parameter. /// Api Version. - /// , or is null. - public IpamPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint, string apiVersion = default) + /// or is null. + public IpamPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? "2024-07-01"; + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs index 74c1862bb955..e4cb2cf5d731 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerBackendAddressPoolsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs index adaed0665401..686157998eed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerFrontendIPConfigurationsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs index c6740af4f890..f25bd875823e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerLoadBalancingRulesRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs index a0408a2287a9..e099804d118f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerNetworkInterfacesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs index 0be69b15d972..fdb29795e1e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerOutboundRulesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs index 30215cbe01a2..bf5208b3b0d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerProbesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs index af4531131cf6..39cd9171203e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs index bc465a1e287d..51ae0d47b081 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public LocalNetworkGatewaysRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs index eaa1ebcbf004..9ce36d94f960 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ManagementGroupNetworkManagerConnectionsRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs index 158f49a2c783..556cb16cb842 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public NatGatewaysRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs index b536d123eba5..8e79a50a7765 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs @@ -32,7 +32,7 @@ public NatRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs index a7c6ebf6507c..d3fe258de168 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs index d4198ef824b4..a67d339c39ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfaceIPConfigurationsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs index 01987bb3bf6e..acc35310163b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfaceLoadBalancersRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs index 2bf0ca09b208..d2bec4701115 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfaceTapConfigurationsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs index 90d67e07823f..1b21271d2caf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfacesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs index 69ca29fc857f..4f5500b25efd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagementRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs index 1987eeea153a..5bb3905ed5f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs @@ -31,7 +31,7 @@ public NetworkManagerCommitsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs index e1c992917eee..c3131dadcb51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagerDeploymentStatusRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerRoutingConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerRoutingConfigurationsRestOperations.cs index 35f9b4509ace..9ec2a87d357c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerRoutingConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerRoutingConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagerRoutingConfigurationsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs index e6d06055044a..7c2b35833ced 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs index 0d8ed9da094e..6ddc25234e30 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkProfilesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs index 20bcacc05d2c..1fabeee74fe1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityGroupsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAccessRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAccessRulesRestOperations.cs index 297e78bf1cb9..700db368dab5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAccessRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAccessRulesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterAccessRulesRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociableResourceTypesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociableResourceTypesRestOperations.cs index 5d73c7735760..6cbe069633b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociableResourceTypesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociableResourceTypesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterAssociableResourceTypesRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociationsRestOperations.cs index 983a618aae85..914ca2a0393c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterAssociationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterAssociationsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinkReferencesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinkReferencesRestOperations.cs index d5dc296dd1f4..326324088934 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinkReferencesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinkReferencesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterLinkReferencesRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinksRestOperations.cs index bb69d79aa294..407160a22076 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLinksRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterLinksRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLoggingConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLoggingConfigurationsRestOperations.cs index 0f213b7a0b85..3662f0319357 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLoggingConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterLoggingConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterLoggingConfigurationsRestOperations(HttpPipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterProfilesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterProfilesRestOperations.cs index 92c027e1cbcb..a802247e13a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterProfilesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterProfilesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterProfilesRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterServiceTagsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterServiceTagsRestOperations.cs new file mode 100644 index 000000000000..bcbb270410b9 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimeterServiceTagsRestOperations.cs @@ -0,0 +1,201 @@ +// 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.Network.Models; + +namespace Azure.ResourceManager.Network +{ + internal partial class NetworkSecurityPerimeterServiceTagsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NetworkSecurityPerimeterServiceTagsRestOperations. + /// 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 NetworkSecurityPerimeterServiceTagsRestOperations(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-10-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Network/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/nspServiceTags", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + { + 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.Network/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/nspServiceTags", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The location of network security perimeter. + /// 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 location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterServiceTagsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterServiceTagsListResult.DeserializeNetworkSecurityPerimeterServiceTagsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The location of network security perimeter. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterServiceTagsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetworkSecurityPerimeterServiceTagsListResult.DeserializeNetworkSecurityPerimeterServiceTagsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + 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; + } + + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// The URL to the next page of results. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The location of network security perimeter. + /// 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, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterServiceTagsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterServiceTagsListResult.DeserializeNetworkSecurityPerimeterServiceTagsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of service tags supported by NSP. These service tags can be used to create access rules in NSP. + /// The URL to the next page of results. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The location of network security perimeter. + /// 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, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterServiceTagsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetworkSecurityPerimeterServiceTagsListResult.DeserializeNetworkSecurityPerimeterServiceTagsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimetersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimetersRestOperations.cs index 563323dd40d4..625dd1b94db8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimetersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityPerimetersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimetersRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs index 6c6faf289408..ca67e452713a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkVirtualApplianceConnectionsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs index bc4fbcefd1f6..861b93d2d871 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkVirtualAppliancesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs index 55e695820b67..78b6e62a54f0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkWatchersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs index 6d2b2459bdc4..c2b3ddaa5744 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public P2SVpnGatewaysRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs index 1fc57d9c8df5..ed71a42410d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs @@ -32,7 +32,7 @@ public PacketCapturesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs index be6edc13edf3..fbf420deb044 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PeerExpressRouteCircuitConnectionsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs index fc4c30b87817..ed53c5cb9b60 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateDnsZoneGroupsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs index c6d4596d46a7..fcf8291df35b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs index fc1c14e5230c..68d5573c15fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkServicesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs index 96638297dc0d..ae35590afcbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs @@ -32,7 +32,7 @@ public PublicIPAddressesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs index d734d35c860c..eb9c3dec1d02 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs @@ -32,7 +32,7 @@ public PublicIPPrefixesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisIntentsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisIntentsRestOperations.cs index ba5430bfb378..82fa4314e101 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisIntentsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisIntentsRestOperations.cs @@ -27,12 +27,12 @@ internal partial class ReachabilityAnalysisIntentsRestOperations /// The application id to use for user agent. /// server parameter. /// Api Version. - /// , or is null. - public ReachabilityAnalysisIntentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint, string apiVersion = default) + /// or is null. + public ReachabilityAnalysisIntentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? "2024-07-01"; + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisRunsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisRunsRestOperations.cs index 855cca9c269c..c3d57bb5cfca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisRunsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ReachabilityAnalysisRunsRestOperations.cs @@ -27,12 +27,12 @@ internal partial class ReachabilityAnalysisRunsRestOperations /// The application id to use for user agent. /// server parameter. /// Api Version. - /// , or is null. - public ReachabilityAnalysisRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint, string apiVersion = default) + /// or is null. + public ReachabilityAnalysisRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? "2024-07-01"; + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs index b861b8275726..3687cbb16d30 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs @@ -32,7 +32,7 @@ public ResourceNavigationLinksRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs index 527b3e538ff7..5ecb45a0057d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs @@ -32,7 +32,7 @@ public RouteFilterRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs index 4f68d8c7639c..585a4bca61cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs @@ -32,7 +32,7 @@ public RouteFiltersRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs index 3f2a46ea63a6..48fc91fb4496 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs @@ -32,7 +32,7 @@ public RouteMapsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs index 938c5fbd8159..0f9cda0a61c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs @@ -32,7 +32,7 @@ public RouteTablesRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs index 97cfe32eb6d8..8d5a844a8b6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs @@ -32,7 +32,7 @@ public RoutesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs index ed75e644e53c..6389047d860f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs @@ -32,7 +32,7 @@ public RoutingIntentRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRuleCollectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRuleCollectionsRestOperations.cs index 079f7ce50be8..b84ecc887b45 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRuleCollectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRuleCollectionsRestOperations.cs @@ -32,7 +32,7 @@ public RoutingRuleCollectionsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRulesRestOperations.cs index fc4239bd05df..e2da39e5c468 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingRulesRestOperations.cs @@ -32,7 +32,7 @@ public RoutingRulesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs index 2cd68277eeb5..d44523721163 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ScopeConnectionsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs index 7d875be1d560..bc2a6b518e13 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public SecurityAdminConfigurationsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs index e4921be7c7bb..d2fda24e7877 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs @@ -32,7 +32,7 @@ public SecurityPartnerProvidersRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs index 26296f87ff7d..092d89523bf8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs @@ -32,7 +32,7 @@ public SecurityRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserConfigurationsRestOperations.cs index a5a67dcfddbb..2ada696e3018 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public SecurityUserConfigurationsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRuleCollectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRuleCollectionsRestOperations.cs index 9fa19e4c5e0e..578aea6912c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRuleCollectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRuleCollectionsRestOperations.cs @@ -32,7 +32,7 @@ public SecurityUserRuleCollectionsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRulesRestOperations.cs index a8559b88cb24..a80ec4db709b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityUserRulesRestOperations.cs @@ -32,7 +32,7 @@ public SecurityUserRulesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs index df906f7552a8..0ac7ffb4f93d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs @@ -32,7 +32,7 @@ public ServiceAssociationLinksRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs index 549777a10bd4..3382b8d9f1ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ServiceEndpointPoliciesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs index 2386983a88b6..92ea64755cd1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs @@ -32,7 +32,7 @@ public ServiceEndpointPolicyDefinitionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs index ae7c0b04938d..57ae83408b46 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs @@ -32,7 +32,7 @@ public ServiceTagInformationRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs index bdcaedfea166..e17834d7fa08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs @@ -32,7 +32,7 @@ public ServiceTagsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticCidrsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticCidrsRestOperations.cs index 1e01c4607fd7..2da7ee0cfac6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticCidrsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticCidrsRestOperations.cs @@ -27,12 +27,12 @@ internal partial class StaticCidrsRestOperations /// The application id to use for user agent. /// server parameter. /// Api Version. - /// , or is null. - public StaticCidrsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint, string apiVersion = default) + /// or is null. + public StaticCidrsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? "2024-07-01"; + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs index efefe69a8ff2..f1c05e91b208 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs @@ -32,7 +32,7 @@ public StaticMembersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs index 47d1144fa9d3..c6c3c51acbc7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs @@ -32,7 +32,7 @@ public SubnetsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs index 4e70a5c5d538..35c6d28ce6f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionNetworkManagerConnectionsRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs index 032c80d340f0..acb009d59965 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs @@ -32,7 +32,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VerifierWorkspacesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VerifierWorkspacesRestOperations.cs index c66d8b3b0052..24e5fa74c96c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VerifierWorkspacesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VerifierWorkspacesRestOperations.cs @@ -27,12 +27,12 @@ internal partial class VerifierWorkspacesRestOperations /// The application id to use for user agent. /// server parameter. /// Api Version. - /// , or is null. - public VerifierWorkspacesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint, string apiVersion = default) + /// or is null. + public VerifierWorkspacesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? "2024-07-01"; + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs index 6c6a1b68975e..85edc8c43434 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs @@ -32,7 +32,7 @@ public VipSwapRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs index 959f446cec9f..fbf1418b9c19 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualApplianceSitesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs index 2674e8ebed9e..e7a2acc7d00e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs @@ -32,7 +32,7 @@ public VirtualApplianceSkusRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs index 2321720d8228..5accd910c718 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs @@ -31,7 +31,7 @@ public VirtualHubBgpConnectionRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs index f49b73139254..e09c6ae5b364 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubBgpConnectionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs index 93c381e3ff21..2e0fbd3eafaf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubIpConfigurationRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs index 67f97faf38ca..5cdc0d0b7a39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubRouteTableV2SRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs index c85d1f9023fa..6ce91f9d9f68 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs index 1b120195c0b9..32917508fa63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkGatewayConnectionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs index 87e4e7b89460..fe519cac3041 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkGatewayNatRulesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs index a187908f9871..b7a229a6ff57 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkGatewaysRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs index 3a5d0ee29609..93f99f1f9dc9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkPeeringsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs index 545a790d2db9..4760b29ad84a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkTapsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs index 626acbb99e33..15beab65c36b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworksRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs index 57e319f710de..21554a45f00c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualRouterPeeringsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs index 4f9d99a647ff..49d21958be77 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs @@ -32,7 +32,7 @@ public VirtualRoutersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs index 862c48bde3cc..30bc7b7af799 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs @@ -32,7 +32,7 @@ public VirtualWansRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs index 0508a5108a4f..63b04f5e9790 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VpnConnectionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs index f790bc6d7d42..f5e9f6a0f202 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public VpnGatewaysRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs index d8386a635f8b..11f4895a7f32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VpnLinkConnectionsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs index de8ac264d134..14f4d167fe3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs @@ -30,7 +30,7 @@ public VpnServerConfigurationsAssociatedWithVirtualWanRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs index 2035dd15f9d2..06db37361d2b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public VpnServerConfigurationsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs index cee456a3d21d..46e15677b20c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs @@ -31,7 +31,7 @@ public VpnSiteLinkConnectionsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs index e64605041038..6591dad53635 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs @@ -32,7 +32,7 @@ public VpnSiteLinksRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs index 882bb10a8387..4cbb5f20914c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs @@ -31,7 +31,7 @@ public VpnSitesConfigurationRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs index 1dcb5f2de4b2..67588d05a284 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs @@ -32,7 +32,7 @@ public VpnSitesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs index 5a6b8a476459..cc1972aec669 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public WebApplicationFirewallPoliciesRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs index a0323bb55561..81dc01731d52 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs @@ -32,7 +32,7 @@ public WebCategoriesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs index aba9d3c6e3ef..e0c2a565a9f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string routeName, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeName, CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeName, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs index 0279f3fde945..6fa961669645 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string routeFi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string routeFilterName, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string routeFilterName, st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string routeFilterName, string expand = nul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs index bc29f0cadf61..d58071e77edd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs @@ -110,7 +110,7 @@ public virtual RouteFilterRuleCollection GetRouteFilterRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetRouteFilterRuleA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetRouteFilterRule(string ruleN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string expand = null, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(NetworkTags /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual Response Update(NetworkTagsObject networkTag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -546,7 +546,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs index 11a8d858d9d3..989b7e1f54e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string rul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ruleName, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs index 87f0999e75bc..9bf477cb5bc7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs index bd558802a647..f12e8b8840ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string routeMapNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeMapName, CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeMapName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeMapName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs index 44110413853f..8b30672b4b2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs index c3cfcabd94e0..cb579b289910 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs index 4f398a53b192..cafc27ec8d39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string routeTab /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string routeTableName, string ex /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string routeTableName, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string routeTableName, string expand = null /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs index 6dfe3c9bcc5b..baad39a8cec3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs @@ -110,7 +110,7 @@ public virtual RouteCollection GetRoutes() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetRouteAsync(string routeNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetRoute(string routeName, CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string expand = null, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual Response Update(NetworkTagsObject networkTags /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -546,7 +546,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs index 0b9611bda59f..3b0004ea318d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string routi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routingIntentName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routingIntentName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routingIntentName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs index 1b3d5f8f057a..700c4cc4c509 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs index d5261fba2d2f..cbb176113e33 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string sco /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string scopeConnectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string scopeConnectionName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string scopeConnectionName, CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs index 8000760919fc..f1c6e4ff41a6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs index cd32baf2b899..f59bd793cd8c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string configura /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs index 1545087c709b..989aced1690c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs @@ -108,7 +108,7 @@ public virtual AdminRuleGroupCollection GetAdminRuleGroups() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAdminRuleGroupAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetAdminRuleGroup(string ruleCol /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs index a32cd1c3fede..f326b971d65b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string securityPart /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string securityPartnerProv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string securityPartnerProviderName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs index c416e971ccee..5dcb218db227 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObjec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs index 48b6b1034b6d..a54f9b2fabee 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string securi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string securityRuleName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string securityRuleName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string securityRuleName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs index 6bcd1fb6ae6f..f9955b650792 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs index 25d995762328..4e93b14ca905 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string serviceEndpoin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string serviceEndpointPoli /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string serviceEndpointPolicyName, string ex /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs index be9cfd722349..cfbf87ccb337 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string serv /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string serviceEndpointPoli /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string serviceEndpointPolicyDefinitionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs index 4db10856c455..baef5b040cb2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs index 732fb7f4c73e..37fb5cdef2e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs @@ -110,7 +110,7 @@ public virtual ServiceEndpointPolicyDefinitionCollection GetServiceEndpointPolic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetServiceEndpo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string expand = null, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(N /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual Response Update(NetworkTagsObject /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -546,7 +546,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrCollection.cs index 1468e5c8c0e4..59d680b10388 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string staticCi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string staticCidrName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string skipToken = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string skipToken = null, int? /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string staticCidrName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string staticCidrName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.cs index b6eb61df49b6..535afb1b2609 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs index a06c0f2be1e2..b08c3bde0bc3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string subnetName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string subnetName, string expand = n /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string subnetName, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string subnetName, string expand = null, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs index ab5007722259..fe797612d9de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetAsync(string expand = nul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -193,7 +193,7 @@ public virtual Response Get(string expand = null, CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -235,7 +235,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SubnetDa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task PrepareNetworkPoliciesAsync(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -461,7 +461,7 @@ public virtual ArmOperation PrepareNetworkPolicies(WaitUntil waitUntil, PrepareN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -507,7 +507,7 @@ public virtual async Task UnprepareNetworkPoliciesAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -553,7 +553,7 @@ public virtual ArmOperation UnprepareNetworkPolicies(WaitUntil waitUntil, Unprep /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -578,7 +578,7 @@ public virtual AsyncPageable GetResourceNavigationLinksA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -603,7 +603,7 @@ public virtual Pageable GetResourceNavigationLinks(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -628,7 +628,7 @@ public virtual AsyncPageable GetServiceAssociationLinksA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs index e2137359f325..fa8d3ed8b8a0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(int /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkManagerConne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkManagerConnectionName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs index 5c241a83391e..7accfc4c1305 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs index 0d805a947276..7083486317e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string siteName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string siteName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string siteName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs index dfe047b99437..77989a15ac4f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs index 44222a85a44e..93e151a134aa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string virtualH /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualHubName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualHubName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualHubName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs index 9fed662161d9..fd5c179b5983 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs @@ -110,7 +110,7 @@ public virtual RouteMapCollection GetRouteMaps() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetRouteMapAsync(string ro /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual HubVirtualNetworkConnectionCollection GetHubVirtualNetworkConnect /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetHubV /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual VirtualHubRouteTableV2Collection GetVirtualHubRouteTableV2s() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetVirtualHu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual BgpConnectionCollection GetBgpConnections() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> GetBgpConnectionAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual HubIPConfigurationCollection GetHubIPConfigurations() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> GetHubIPConfigur /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual HubRouteTableCollection GetHubRouteTables() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> GetHubRouteTableAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -524,7 +524,7 @@ public virtual RoutingIntentCollection GetRoutingIntents() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -555,7 +555,7 @@ public virtual async Task> GetRoutingIntentAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -586,7 +586,7 @@ public virtual Response GetRoutingIntent(string routingIn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -626,7 +626,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -708,7 +708,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -750,7 +750,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -792,7 +792,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -834,7 +834,7 @@ public virtual Response Update(NetworkTagsObject virtualHubP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -877,7 +877,7 @@ public virtual async Task> GetVirtual /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -920,7 +920,7 @@ public virtual ArmOperation GetVirtualHubEffective /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -966,7 +966,7 @@ public virtual async Task> GetVirtualHu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1012,7 +1012,7 @@ public virtual ArmOperation GetVirtualHubInboundRout /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1058,7 +1058,7 @@ public virtual async Task> GetVirtualHu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1104,7 +1104,7 @@ public virtual ArmOperation GetVirtualHubOutboundRou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1166,7 +1166,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1228,7 +1228,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1285,7 +1285,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1342,7 +1342,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1402,7 +1402,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs index 13f761bc8cca..430d6dcd2189 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeTableNam /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeTableName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeTableName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs index 7f3f28a56b2d..854289905a2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs index 045653df7ff5..ac79a97ffa9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string virt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string virtualNetworkName, s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string virtualNetworkName, string expand = /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs index fdfc693a4319..0add8ffeab84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkGatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualNetworkGatewayName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs index 6a47ba1330d7..bd364f3f246f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkGatew /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualNetworkGatewayConnectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs index 2693ab13747f..afe6f40b1733 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> VpnDeviceConfigurationScriptAsync(Vp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual Response VpnDeviceConfigurationScript(VpnDeviceScriptCont /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -494,7 +494,7 @@ public virtual async Task> SetSharedKeyAsync(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual ArmOperation SetSharedKey(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -578,7 +578,7 @@ public virtual async Task> GetSharedKeyAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -616,7 +616,7 @@ public virtual Response GetSharedKey(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -662,7 +662,7 @@ public virtual async Task> ResetSharedKey /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -708,7 +708,7 @@ public virtual ArmOperation ResetSharedKey(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -751,7 +751,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -794,7 +794,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -840,7 +840,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -886,7 +886,7 @@ public virtual ArmOperation StopPacketCapture(WaitUntil waitUntil, VpnPa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -928,7 +928,7 @@ public virtual async Task> GetIkeSasAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -970,7 +970,7 @@ public virtual ArmOperation GetIkeSas(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1012,7 +1012,7 @@ public virtual async Task ResetConnectionAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1054,7 +1054,7 @@ public virtual ArmOperation ResetConnection(WaitUntil waitUntil, CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1116,7 +1116,7 @@ public virtual async Task> Add /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1178,7 +1178,7 @@ public virtual Response AddTag(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1235,7 +1235,7 @@ public virtual async Task> Set /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1292,7 +1292,7 @@ public virtual Response SetTags(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1352,7 +1352,7 @@ public virtual async Task> Rem /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs index 94ff4c114c70..860e3b64688c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string natRule /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string natRuleName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string natRuleName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs index 85e352501090..9a0092b964e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs index 7f5161375ab4..f4855027e00a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs @@ -111,7 +111,7 @@ public virtual VirtualNetworkGatewayNatRuleCollection GetVirtualNetworkGatewayNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetVir /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetVirtualNetworkG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual AsyncPageable GetConne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual Pageable GetConnection /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> ResetAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -575,7 +575,7 @@ public virtual ArmOperation Reset(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -617,7 +617,7 @@ public virtual async Task ResetVpnClientSharedKeyAsync(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -659,7 +659,7 @@ public virtual ArmOperation ResetVpnClientSharedKey(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task> GenerateVpnClientPackageAsync(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -751,7 +751,7 @@ public virtual ArmOperation GenerateVpnClientPackage(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -797,7 +797,7 @@ public virtual async Task> GenerateVpnProfileAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -843,7 +843,7 @@ public virtual ArmOperation GenerateVpnProfile(WaitUntil waitUntil, VpnC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -885,7 +885,7 @@ public virtual async Task> GetVpnProfilePackageUrlAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -927,7 +927,7 @@ public virtual ArmOperation GetVpnProfilePackageUrl(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -970,7 +970,7 @@ public virtual async Task> GetBgpPeerStatu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1013,7 +1013,7 @@ public virtual ArmOperation GetBgpPeerStatus(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1051,7 +1051,7 @@ public virtual async Task> SupportedVpnDevicesAsync(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1089,7 +1089,7 @@ public virtual Response SupportedVpnDevices(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1131,7 +1131,7 @@ public virtual async Task> GetLearnedRoutes /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1173,7 +1173,7 @@ public virtual ArmOperation GetLearnedRoutes(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task> GetAdvertisedRou /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1265,7 +1265,7 @@ public virtual ArmOperation GetAdvertisedRoutes(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1308,7 +1308,7 @@ public virtual async Task> GetResilie /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1351,7 +1351,7 @@ public virtual ArmOperation GetResiliencyInformati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1394,7 +1394,7 @@ public virtual async Task> GetRoutesIn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1437,7 +1437,7 @@ public virtual ArmOperation GetRoutesInformation(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1483,7 +1483,7 @@ public virtual async Task> SetVpnclientIP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1529,7 +1529,7 @@ public virtual ArmOperation SetVpnclientIPsecParameter /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1571,7 +1571,7 @@ public virtual async Task> GetVpnclientIP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1613,7 +1613,7 @@ public virtual ArmOperation GetVpnclientIPsecParameter /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1656,7 +1656,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1699,7 +1699,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1745,7 +1745,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1791,7 +1791,7 @@ public virtual ArmOperation StopPacketCapture(WaitUntil waitUntil, VpnPa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1837,7 +1837,7 @@ public virtual async Task> StartExpressRouteSiteFailoverSim /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1883,7 +1883,7 @@ public virtual ArmOperation StartExpressRouteSiteFailoverSimulation(Wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1929,7 +1929,7 @@ public virtual async Task> StopExpressRouteSiteFailoverSimu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1975,7 +1975,7 @@ public virtual ArmOperation StopExpressRouteSiteFailoverSimulation(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2017,7 +2017,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2059,7 +2059,7 @@ public virtual ArmOperation GetVpncli /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2105,7 +2105,7 @@ public virtual async Task DisconnectVirtualNetworkGatewayVpnConnec /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2151,7 +2151,7 @@ public virtual ArmOperation DisconnectVirtualNetworkGatewayVpnConnections(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2197,7 +2197,7 @@ public virtual async Task InvokePrepareMigrationAsync(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2243,7 +2243,7 @@ public virtual ArmOperation InvokePrepareMigration(WaitUntil waitUntil, VirtualN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2285,7 +2285,7 @@ public virtual async Task InvokeExecuteMigrationAsync(WaitUntil wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2327,7 +2327,7 @@ public virtual ArmOperation InvokeExecuteMigration(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2369,7 +2369,7 @@ public virtual async Task InvokeCommitMigrationAsync(WaitUntil wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2411,7 +2411,7 @@ public virtual ArmOperation InvokeCommitMigration(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2453,7 +2453,7 @@ public virtual async Task InvokeAbortMigrationAsync(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2495,7 +2495,7 @@ public virtual ArmOperation InvokeAbortMigration(WaitUntil waitUntil, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2557,7 +2557,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2619,7 +2619,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2676,7 +2676,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2733,7 +2733,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -2793,7 +2793,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs index 1136969fcc6c..08b84451cd64 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string virtualNetwork /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkPeeri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string virtualNetworkPeeringName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs index 68ac0057c637..8ebde3799fa3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs index 8809bab6e08a..4b63359dae9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs @@ -116,7 +116,7 @@ public virtual SubnetCollection GetSubnets() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetSubnetAsync(string subnet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual VirtualNetworkPeeringCollection GetVirtualNetworkPeerings() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual async Task> GetVirtualNet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response GetVirtualNetworkPeering( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -331,7 +331,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual AsyncPageable GetNetworkManag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -567,7 +567,7 @@ public virtual Pageable GetNetworkManagerEff /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual AsyncPageable GetNetworkManagerEf /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -635,7 +635,7 @@ public virtual Pageable GetNetworkManagerEffecti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -677,7 +677,7 @@ public virtual async Task> CheckIPAddressA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -719,7 +719,7 @@ public virtual Response CheckIPAddressAvailability( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -749,7 +749,7 @@ public virtual AsyncPageable GetUsageAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -779,7 +779,7 @@ public virtual Pageable GetUsage(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -841,7 +841,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -903,7 +903,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -960,7 +960,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1017,7 +1017,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1077,7 +1077,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs index c3552f26eda9..c2e3fec47cb2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string t /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string tapName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string tapName, Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string tapName, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs index 493ca8cfa287..fc546ebc2eb7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Netwo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject tapP /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs index dacf8c3f7fb5..8f12fd8877f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string virtu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string virtualRouterName, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string virtualRouterName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string virtualRouterName, string expand = n /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs index 229f25b16a04..0393247befa3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string peeringName, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string peeringName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string peeringName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs index 22753e8424b8..1b0ff5f7f3be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs index 60bded8de1f7..473cbbda4cec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs @@ -109,7 +109,7 @@ public virtual VirtualRouterPeeringCollection GetVirtualRouterPeerings() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetVirtualRout /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetVirtualRouterPeering(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string expan /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expand = null, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, V /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -543,7 +543,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -710,7 +710,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs index 0061dc2cb3e9..e8f6d43763dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string virtualW /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualWanName, Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualWanName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualWanName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs index 8ee6cadc84e1..121672d4beca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs @@ -116,7 +116,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -156,7 +156,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -196,7 +196,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -238,7 +238,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual Response Update(NetworkTagsObject wanParamete /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> SupportedSecuri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -440,7 +440,7 @@ public virtual Response SupportedSecurityProviders( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> GenerateVirtualWanVp /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual ArmOperation GenerateVirtualWanVpnServerConfi /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -574,7 +574,7 @@ public virtual async Task DownloadVpnSitesConfigurationAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -616,7 +616,7 @@ public virtual ArmOperation DownloadVpnSitesConfiguration(WaitUntil waitUntil, G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -654,7 +654,7 @@ public virtual async Task> GetVpnS /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// @@ -692,7 +692,7 @@ public virtual ArmOperation GetVpnServerConfigu /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -754,7 +754,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -816,7 +816,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -873,7 +873,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -930,7 +930,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -990,7 +990,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs index cf6020a62ceb..14582842f6cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string conne /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectionName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs index 79988b5e56dd..34bc738ff5f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs @@ -109,7 +109,7 @@ public virtual VpnSiteLinkConnectionCollection GetVpnSiteLinkConnections() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetVpnSiteLin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetVpnSiteLinkConnection( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, V /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -470,7 +470,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -513,7 +513,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -556,7 +556,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs index bc8b6b03fffb..0b7f77f21649 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string gatewayN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string gatewayName, Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs index 1ee1647edc86..64ae7f7cd5bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string n /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string natRuleName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string natRuleName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string natRuleName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs index b68cb0c8bb14..7bb3d88b17c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs index 54dfbae4df0f..1ced72ab53e8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs @@ -110,7 +110,7 @@ public virtual VpnConnectionCollection GetVpnConnections() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetVpnConnectionAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual VpnGatewayNatRuleCollection GetVpnGatewayNatRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetVpnGatewayNatR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetVpnGatewayNatRule(string n /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -497,7 +497,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Netw /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> ResetAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -583,7 +583,7 @@ public virtual ArmOperation Reset(WaitUntil waitUntil, strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -626,7 +626,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -669,7 +669,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnG /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -712,7 +712,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -755,7 +755,7 @@ public virtual ArmOperation StopPacketCapture(WaitUntil waitUntil, VpnGa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -817,7 +817,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -879,7 +879,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -936,7 +936,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -993,7 +993,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -1053,7 +1053,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.cs index 09bf358246bf..9b4d6a873485 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetDefau /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs index cbc1f533bbbb..b2de8f799e49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string vpnServerConf /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string vpnServerConfigurat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string vpnServerConfigurationName, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs index 673bd3b09e37..3a0baa08ba5d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string configurationPolicy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string configurationPolicyGroupName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs index 201e3be45ac8..56522021c4b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs index 37668f2b95e9..c1838e7ce562 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs @@ -110,7 +110,7 @@ public virtual VpnServerConfigurationPolicyGroupCollection GetVpnServerConfigura /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetVpnServerC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(NetworkTagsObject /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -482,7 +482,7 @@ public virtual async Task> AddTagAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual Response AddTag(string key, strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -718,7 +718,7 @@ public virtual async Task> RemoveTagAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs index 585a0687f412..38deac73ac91 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string vpnSiteName /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string vpnSiteName, CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string vpnSiteName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string vpnSiteName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs index 103f4614756a..f44443ca8bcc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string vpnSite /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string vpnSiteLinkName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string vpnSiteLinkName, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string vpnSiteLinkName, CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs index d0df40a8e3ff..cf651ef877c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual Response Get(string linkConnection /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string linkConnectionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string linkConnectionName, CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs index 8e2d7ec7bf7c..84f6626ba210 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs @@ -114,7 +114,7 @@ public virtual VpnLinkConnectionSharedKeyResource GetVpnLinkConnectionSharedKey( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task ResetConnectionVpnLinkConnectionAsync(Wa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual ArmOperation ResetConnectionVpnLinkConnection(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> GetIkeSasVpnLinkConnectionAsync( /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs index 338b040a2d5d..173b3c6aff90 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs index b79141379c0c..f53137db3b63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs @@ -110,7 +110,7 @@ public virtual VpnSiteLinkCollection GetVpnSiteLinks() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetVpnSiteLinkAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetVpnSiteLink(string vpnSiteLinkNa /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> UpdateAsync(NetworkTagsObje /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(NetworkTagsObject vpnSiteParamet /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -482,7 +482,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -718,7 +718,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs index f09c7ea16385..bee4b820f5f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string policyN /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string policyName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs index c340d7fdce0c..b2a4984fee6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -476,7 +476,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource @@ -643,7 +643,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/autorest.md b/sdk/network/Azure.ResourceManager.Network/src/autorest.md index ae40e87dd3cd..fca6c5b178f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/autorest.md +++ b/sdk/network/Azure.ResourceManager.Network/src/autorest.md @@ -7,8 +7,8 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Network namespace: Azure.ResourceManager.Network -require: https://github.com/Azure/azure-rest-api-specs/blob/e09cd33f2f497a30aff4d6ca706e4fd01cbb384d/specification/network/resource-manager/readme.md -#tag: package-2024-07-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/cbfe154470792d8aea255885a4a96609603982cc/specification/network/resource-manager/readme.md +#tag: package-2024-10-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -54,7 +54,10 @@ rename-mapping: AdminState: ExpressRouteGatewayAdminState ApplicationGateway.zones: AvailabilityZones ApplicationGatewayAvailableSslOptions: ApplicationGatewayAvailableSslOptionsInfo + ApplicationGatewayBackendHttpSettings.properties.dedicatedBackendConnection: IsDedicatedBackendConnectionEnabled ApplicationGatewayBackendHttpSettings.properties.requestTimeout: RequestTimeoutInSeconds + ApplicationGatewayBackendHttpSettings.properties.validateCertChainAndExpiry: IsValidateCertChainAndExpiryEnabled + ApplicationGatewayBackendHttpSettings.properties.validateSNI: IsValidateSniEnabled ApplicationGatewayBackendSettings.properties.timeout: TimeoutInSeconds ApplicationGatewayConnectionDraining.drainTimeoutInSec: DrainTimeoutInSeconds ApplicationGatewayPrivateEndpointConnection.properties.privateLinkServiceConnectionState: connectionState @@ -69,6 +72,8 @@ rename-mapping: AzureFirewallApplicationRuleCollection: AzureFirewallApplicationRuleCollectionData AzureFirewallNatRuleCollection: AzureFirewallNatRuleCollectionData AzureFirewallNetworkRuleCollection: AzureFirewallNetworkRuleCollectionData + AzureFirewallPacketCaptureResponse: AzureFirewallPacketCaptureResult + AzureFirewallPacketCaptureResponseCode: AzureFirewallPacketCaptureResultCode ConfigurationGroup: NetworkConfigurationGroup ConfigurationType: NetworkConfigurationDeploymentType ConnectionMonitor: ConnectionMonitorInput @@ -99,7 +104,7 @@ rename-mapping: ExplicitProxy: FirewallPolicyExplicitProxy ExpressRouteGateway.properties.expressRouteConnections: ExpressRouteConnectionList FilterItems: IdpsQueryFilterItems - FirewallPacketCaptureParameters: FirewallPacketCaptureRequestParameters # To workaround breaking change in FirewallPacketCaptureParameters, we have to keep the old codes and rename it + FirewallPacketCaptureParameters: FirewallPacketCaptureRequestContent FirewallPolicyFilterRuleCollection: FirewallPolicyFilterRuleCollectionInfo FirewallPolicyNatRuleCollection: FirewallPolicyNatRuleCollectionInfo FirewallPolicyRuleCollection: FirewallPolicyRuleCollectionInfo @@ -138,10 +143,12 @@ rename-mapping: LoadBalancerHealthPerRulePerBackendAddress.networkInterfaceIPConfigurationId: NetworkInterfaceIPConfigurationResourceId|arm-id LoadBalancingRulePropertiesFormat: LoadBalancingRuleProperties MigratedPools: MigrateLoadBalancerToIPBasedResult + NspServiceTagsResource: NetworkSecurityPerimeterServiceTags NetworkManagerConnection.properties.networkManagerId: -|arm-id NetworkManagerDeploymentStatus.deploymentStatus: DeploymentState NetworkManagerDeploymentStatusParameter: NetworkManagerDeploymentStatusContent NetworkManagerSecurityGroupItem.networkGroupId: -|arm-id + NetworkVirtualAppliance.properties.privateIpAddress: -|ip-address NetworkVirtualApplianceConnection.properties.routingConfiguration: ConnectionRoutingConfiguration NextStep: RouteMapNextStepBehavior OrderBy: IdpsQueryOrderBy diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupCollection.cs index 78e6d88e19c3..9e1485b0ff84 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AdminRuleGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAnAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionPut.json // this example is just showing the usage of "AdminRuleCollections_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAnAdminRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_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 @@ -96,7 +96,7 @@ public async Task Get_GetsSecurityAdminRuleCollection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSecurityAdminRuleCollections() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionList.json // this example is just showing the usage of "AdminRuleCollections_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_ListSecurityAdminRuleCollections() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_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 +164,7 @@ public async Task Exists_GetsSecurityAdminRuleCollection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupResource.cs index a1797183cc69..737877ac61c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AdminRuleGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AdminRuleGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_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_GetsSecurityAdminRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAnAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionDelete.json // this example is just showing the usage of "AdminRuleCollections_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 @@ -81,7 +81,7 @@ public async Task Delete_DeletesAnAdminRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAnAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleCollectionPut.json // this example is just showing the usage of "AdminRuleCollections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayCollection.cs index 2dbd8ca77769..2e64370f3842 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ApplicationGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayCreate.json // this example is just showing the usage of "ApplicationGateways_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 @@ -229,7 +229,7 @@ public async Task CreateOrUpdate_CreateApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_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 @@ -262,7 +262,7 @@ public async Task Get_GetApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAllApplicationGatewaysInAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayList.json // this example is just showing the usage of "ApplicationGateways_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 @@ -297,7 +297,7 @@ public async Task GetAll_ListsAllApplicationGatewaysInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_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 @@ -326,7 +326,7 @@ public async Task Exists_GetApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs index 6073ecd853d5..4b287f70c019 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayPrivateEndpointConnectionCollectio [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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 @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_UpdateApplicationGatewayPrivateEndpointConnecti [Ignore("Only validating compilation of examples")] public async Task Get_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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 @@ -98,7 +98,7 @@ public async Task Get_GetApplicationGatewayPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAllPrivateEndpointConnectionsOnApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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 @@ -134,7 +134,7 @@ public async Task GetAll_ListsAllPrivateEndpointConnectionsOnApplicationGateway( [Ignore("Only validating compilation of examples")] public async Task Exists_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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 +164,7 @@ public async Task Exists_GetApplicationGatewayPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs index 9990ef43df4f..3137c56203df 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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_GetApplicationGatewayPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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_DeleteApplicationGatewayPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayResource.cs index fcea57801b19..39fea9e6262b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_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_GetApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayDelete.json // this example is just showing the usage of "ApplicationGateways_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_DeleteApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateApplicationGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayUpdateTags.json // this example is just showing the usage of "ApplicationGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateApplicationGatewayTags() [Ignore("Only validating compilation of examples")] public async Task Start_StartApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayStart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayStart.json // this example is just showing the usage of "ApplicationGateways_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 @@ -140,7 +140,7 @@ public async Task Start_StartApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task Stop_StopApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayStop.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayStop.json // this example is just showing the usage of "ApplicationGateways_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 @@ -166,7 +166,7 @@ public async Task Stop_StopApplicationGateway() [Ignore("Only validating compilation of examples")] public async Task BackendHealth_GetBackendHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayBackendHealthGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayBackendHealthGet.json // this example is just showing the usage of "ApplicationGateways_BackendHealth" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -193,7 +193,7 @@ public async Task BackendHealth_GetBackendHealth() [Ignore("Only validating compilation of examples")] public async Task BackendHealthOnDemand_TestBackendHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayBackendHealthTest.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayBackendHealthTest.json // this example is just showing the usage of "ApplicationGateways_BackendHealthOnDemand" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -229,7 +229,7 @@ public async Task BackendHealthOnDemand_TestBackendHealth() [Ignore("Only validating compilation of examples")] public async Task GetApplicationGatewayPrivateLinkResources_ListsAllPrivateLinkResourcesOnApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayPrivateLinkResourceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayPrivateLinkResourceList.json // this example is just showing the usage of "ApplicationGatewayPrivateLinkResources_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs index 115b0606bbd3..26e4d366dbd1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayWafDynamicManifestCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_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_GetsWAFDefaultManifest() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsWAFManifests() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetApplicationGatewayWafDynamicManifests.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetApplicationGatewayWafDynamicManifests.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifests_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 @@ -87,7 +87,7 @@ public async Task GetAll_GetsWAFManifests() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_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 @@ -115,7 +115,7 @@ public async Task Exists_GetsWAFDefaultManifest() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs index a7c4a29102d7..1ecd934ee7d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApplicationGatewayWafDynamicManifestResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs index f0ad1c3b8d2f..15af88559578 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationSecurityGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupCreate.json // this example is just showing the usage of "ApplicationSecurityGroups_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateApplicationSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_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 @@ -91,7 +91,7 @@ public async Task Get_GetApplicationSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListLoadBalancersInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupList.json // this example is just showing the usage of "ApplicationSecurityGroups_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 @@ -126,7 +126,7 @@ public async Task GetAll_ListLoadBalancersInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_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 @@ -155,7 +155,7 @@ public async Task Exists_GetApplicationSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs index 46e12c340fef..b9c3feaf77df 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationSecurityGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_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_GetApplicationSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupDelete.json // this example is just showing the usage of "ApplicationSecurityGroups_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_DeleteApplicationSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateApplicationSecurityGroupTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupUpdateTags.json // this example is just showing the usage of "ApplicationSecurityGroups_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallCollection.cs index 88190edf4b8b..c2862dafb5f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_AzureFirewallCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPut.json // this example is just showing the usage of "AzureFirewalls_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 @@ -147,7 +147,7 @@ public async Task CreateOrUpdate_CreateAzureFirewall() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPutWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPutWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_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 @@ -278,7 +278,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithAdditionalProperties() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPutWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPutWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_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 @@ -404,7 +404,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPutWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPutWithZones.json // this example is just showing the usage of "AzureFirewalls_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 @@ -530,7 +530,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithZones() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPutWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPutWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_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 @@ -662,7 +662,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithManagementSubnet() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAzureFirewallInVirtualHub() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPutInHub.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPutInHub.json // this example is just showing the usage of "AzureFirewalls_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 @@ -721,7 +721,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallInVirtualHub() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_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 @@ -754,7 +754,7 @@ public async Task Get_GetAzureFirewall() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_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 @@ -787,7 +787,7 @@ public async Task Get_GetAzureFirewallWithAdditionalProperties() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_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 @@ -820,7 +820,7 @@ public async Task Get_GetAzureFirewallWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_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 @@ -853,7 +853,7 @@ public async Task Get_GetAzureFirewallWithZones() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_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 @@ -886,7 +886,7 @@ public async Task Get_GetAzureFirewallWithManagementSubnet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllAzureFirewallsForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallListByResourceGroup.json // this example is just showing the usage of "AzureFirewalls_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 @@ -921,7 +921,7 @@ public async Task GetAll_ListAllAzureFirewallsForAGivenResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_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 @@ -950,7 +950,7 @@ public async Task Exists_GetAzureFirewall() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_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 @@ -979,7 +979,7 @@ public async Task Exists_GetAzureFirewallWithAdditionalProperties() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1008,7 +1008,7 @@ public async Task Exists_GetAzureFirewallWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1037,7 +1037,7 @@ public async Task Exists_GetAzureFirewallWithZones() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1066,7 +1066,7 @@ public async Task Exists_GetAzureFirewallWithManagementSubnet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1107,7 +1107,7 @@ public async Task GetIfExists_GetAzureFirewall() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1148,7 +1148,7 @@ public async Task GetIfExists_GetAzureFirewallWithAdditionalProperties() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1189,7 +1189,7 @@ public async Task GetIfExists_GetAzureFirewallWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_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 @@ -1230,7 +1230,7 @@ public async Task GetIfExists_GetAzureFirewallWithZones() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallResource.cs index 5a021ee4ddfb..ac32f20c0fd7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureFirewallResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AzureFirewallResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_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_GetAzureFirewall() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_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 @@ -80,7 +80,7 @@ public async Task Get_GetAzureFirewallWithAdditionalProperties() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_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 @@ -110,7 +110,7 @@ public async Task Get_GetAzureFirewallWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_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_GetAzureFirewallWithZones() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_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 Get_GetAzureFirewallWithManagementSubnet() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallDelete.json // this example is just showing the usage of "AzureFirewalls_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 @@ -196,7 +196,7 @@ public async Task Delete_DeleteAzureFirewall() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAzureFirewallTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallUpdateTags.json // this example is just showing the usage of "AzureFirewalls_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +235,7 @@ public async Task Update_UpdateAzureFirewallTags() [Ignore("Only validating compilation of examples")] public async Task GetLearnedPrefixes_AzureFirewallListLearnedPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallListLearnedIPPrefixes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallListLearnedIPPrefixes.json // this example is just showing the usage of "AzureFirewalls_ListLearnedPrefixes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +262,7 @@ public async Task GetLearnedPrefixes_AzureFirewallListLearnedPrefixes() [Ignore("Only validating compilation of examples")] public async Task PacketCapture_AzureFirewallPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPacketCapture.json // this example is just showing the usage of "AzureFirewalls_PacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -309,5 +309,59 @@ public async Task PacketCapture_AzureFirewallPacketCapture() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PacketCaptureOperation_AzureFirewallPacketCaptureOperation() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallPacketCaptureOperation.json + // this example is just showing the usage of "AzureFirewalls_PacketCaptureOperation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 AzureFirewallResource created on azure + // for more information of creating AzureFirewallResource, please refer to the document of AzureFirewallResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string azureFirewallName = "azureFirewall1"; + ResourceIdentifier azureFirewallResourceId = AzureFirewallResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, azureFirewallName); + AzureFirewallResource azureFirewall = client.GetAzureFirewallResource(azureFirewallResourceId); + + // invoke the operation + FirewallPacketCaptureRequestContent content = new FirewallPacketCaptureRequestContent + { + DurationInSeconds = 300, + NumberOfPacketsToCapture = 5000, + SasUri = new Uri("someSASURL"), + FileName = "azureFirewallPacketCapture", + Protocol = AzureFirewallNetworkRuleProtocol.Any, + Flags = {new AzureFirewallPacketCaptureFlags +{ +FlagsType = AzureFirewallPacketCaptureFlagsType.Syn, +}, new AzureFirewallPacketCaptureFlags +{ +FlagsType = AzureFirewallPacketCaptureFlagsType.Fin, +}}, + Filters = {new AzureFirewallPacketCaptureRule +{ +Sources = {"20.1.1.0"}, +Destinations = {"20.1.2.0"}, +DestinationPorts = {"4500"}, +}, new AzureFirewallPacketCaptureRule +{ +Sources = {"10.1.1.0", "10.1.1.1"}, +Destinations = {"10.1.2.0"}, +DestinationPorts = {"123", "80"}, +}}, + Operation = AzureFirewallPacketCaptureOperationType.Status, + }; + ArmOperation lro = await azureFirewall.PacketCaptureOperationAsync(WaitUntil.Completed, content); + AzureFirewallPacketCaptureResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryCollection.cs index a75a108251cf..8e87760cbca5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AzureWebCategoryCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_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_GetAzureWebCategoryByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllAzureWebCategoriesForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureWebCategoriesListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureWebCategoriesListBySubscription.json // this example is just showing the usage of "WebCategories_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 @@ -86,7 +86,7 @@ public async Task GetAll_ListAllAzureWebCategoriesForAGivenSubscription() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_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 @@ -114,7 +114,7 @@ public async Task Exists_GetAzureWebCategoryByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryResource.cs index 9503f48a6715..eaf5739b0ade 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_AzureWebCategoryResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AzureWebCategoryResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolCollection.cs index 10ad976980de..7718a6180667 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BackendAddressPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_UpdateLoadBalancerBackendPoolWithBackendAddress [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -103,7 +103,7 @@ public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -137,7 +137,7 @@ public async Task Get_LoadBalancerBackendAddressPoolGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_LoadBalancerWithBackendAddressPoolContainingBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -173,7 +173,7 @@ public async Task GetAll_LoadBalancerWithBackendAddressPoolContainingBackendAddr [Ignore("Only validating compilation of examples")] public async Task GetAll_LoadBalancerBackendAddressPoolList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerBackendAddressPoolList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerBackendAddressPoolList.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -209,7 +209,7 @@ public async Task GetAll_LoadBalancerBackendAddressPoolList() [Ignore("Only validating compilation of examples")] public async Task Exists_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -239,7 +239,7 @@ public async Task Exists_LoadBalancerWithBackendAddressPoolWithBackendAddresses( [Ignore("Only validating compilation of examples")] public async Task Exists_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -269,7 +269,7 @@ public async Task Exists_LoadBalancerBackendAddressPoolGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -311,7 +311,7 @@ public async Task GetIfExists_LoadBalancerWithBackendAddressPoolWithBackendAddre [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolResource.cs index 016535f9a801..6a8487c35e6e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BackendAddressPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackendAddressPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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_LoadBalancerWithBackendAddressPoolWithBackendAddresses() [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -82,7 +82,7 @@ public async Task Get_LoadBalancerBackendAddressPoolGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BackendAddressPoolDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerBackendAddressPoolDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerBackendAddressPoolDelete.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -109,7 +109,7 @@ public async Task Delete_BackendAddressPoolDelete() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_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 @@ -155,7 +155,7 @@ public async Task Update_UpdateLoadBalancerBackendPoolWithBackendAddressesContai [Ignore("Only validating compilation of examples")] public async Task GetInboundNatRulePortMappingsLoadBalancer_QueryInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/QueryInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/QueryInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_ListInboundNatRulePortMappings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleCollection.cs index fcd067e8ace8..2eea7b94ad4f 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BaseAdminRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAAdminRuleWithNetworkGroupAsSourceOrDestination() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json // this example is just showing the usage of "AdminRules_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 @@ -77,7 +77,7 @@ public async Task CreateOrUpdate_CreateAAdminRuleWithNetworkGroupAsSourceOrDesti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRulePut.json // this example is just showing the usage of "AdminRules_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 @@ -134,7 +134,7 @@ public async Task CreateOrUpdate_CreateAnAdminRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_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 Get_GetsSecurityAdminRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_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 Get_GetsSecurityDefaultAdminRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSecurityAdminRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleList.json // this example is just showing the usage of "AdminRules_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 @@ -244,7 +244,7 @@ public async Task GetAll_ListSecurityAdminRules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_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 @@ -276,7 +276,7 @@ public async Task Exists_GetsSecurityAdminRule() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_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 @@ -308,7 +308,7 @@ public async Task Exists_GetsSecurityDefaultAdminRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_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 @@ -352,7 +352,7 @@ public async Task GetIfExists_GetsSecurityAdminRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleResource.cs index 79c8f343019e..dbef725f659f 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BaseAdminRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BaseAdminRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_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_GetsSecurityAdminRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_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 @@ -86,7 +86,7 @@ public async Task Get_GetsSecurityDefaultAdminRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAnAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRuleDelete.json // this example is just showing the usage of "AdminRules_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 @@ -116,7 +116,7 @@ public async Task Delete_DeletesAnAdminRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAAdminRuleWithNetworkGroupAsSourceOrDestination() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRulePut_NetworkGroupSource.json // this example is just showing the usage of "AdminRules_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 @@ -170,7 +170,7 @@ public async Task Update_CreateAAdminRuleWithNetworkGroupAsSourceOrDestination() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAnAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerAdminRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerAdminRulePut.json // this example is just showing the usage of "AdminRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostCollection.cs index 397c982ca1bb..2b21cce15cb5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BastionHostCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostPut.json // this example is just showing the usage of "BastionHosts_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 @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_CreateBastionHost() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBastionHostWithPrivateOnly() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostPutWithPrivateOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostPutWithPrivateOnly.json // this example is just showing the usage of "BastionHosts_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 @@ -107,7 +107,7 @@ public async Task CreateOrUpdate_CreateBastionHostWithPrivateOnly() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostPutWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostPutWithZones.json // this example is just showing the usage of "BastionHosts_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 @@ -150,7 +150,7 @@ public async Task CreateOrUpdate_CreateBastionHostWithZones() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDeveloperPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDeveloperPut.json // this example is just showing the usage of "BastionHosts_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 @@ -193,7 +193,7 @@ public async Task CreateOrUpdate_CreateDeveloperBastionHost() [Ignore("Only validating compilation of examples")] public async Task Get_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_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 @@ -226,7 +226,7 @@ public async Task Get_GetBastionHost() [Ignore("Only validating compilation of examples")] public async Task Get_GetBastionHostWithPrivateOnly() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithPrivateOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithPrivateOnly.json // this example is just showing the usage of "BastionHosts_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 @@ -259,7 +259,7 @@ public async Task Get_GetBastionHostWithPrivateOnly() [Ignore("Only validating compilation of examples")] public async Task Get_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_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 @@ -292,7 +292,7 @@ public async Task Get_GetBastionHostWithZones() [Ignore("Only validating compilation of examples")] public async Task Get_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_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 @@ -325,7 +325,7 @@ public async Task Get_GetDeveloperBastionHost() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllBastionHostsForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostListByResourceGroup.json // this example is just showing the usage of "BastionHosts_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 @@ -360,7 +360,7 @@ public async Task GetAll_ListAllBastionHostsForAGivenResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_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 @@ -389,7 +389,7 @@ public async Task Exists_GetBastionHost() [Ignore("Only validating compilation of examples")] public async Task Exists_GetBastionHostWithPrivateOnly() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithPrivateOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithPrivateOnly.json // this example is just showing the usage of "BastionHosts_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 @@ -418,7 +418,7 @@ public async Task Exists_GetBastionHostWithPrivateOnly() [Ignore("Only validating compilation of examples")] public async Task Exists_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_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 @@ -447,7 +447,7 @@ public async Task Exists_GetBastionHostWithZones() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_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 @@ -476,7 +476,7 @@ public async Task Exists_GetDeveloperBastionHost() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_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 @@ -517,7 +517,7 @@ public async Task GetIfExists_GetBastionHost() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetBastionHostWithPrivateOnly() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithPrivateOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithPrivateOnly.json // this example is just showing the usage of "BastionHosts_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 @@ -558,7 +558,7 @@ public async Task GetIfExists_GetBastionHostWithPrivateOnly() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_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 @@ -599,7 +599,7 @@ public async Task GetIfExists_GetBastionHostWithZones() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostResource.cs index e7fa160de6b8..d6d5f93422ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BastionHostResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BastionHostResource [Ignore("Only validating compilation of examples")] public async Task Get_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_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_GetBastionHost() [Ignore("Only validating compilation of examples")] public async Task Get_GetBastionHostWithPrivateOnly() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithPrivateOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithPrivateOnly.json // this example is just showing the usage of "BastionHosts_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 @@ -80,7 +80,7 @@ public async Task Get_GetBastionHostWithPrivateOnly() [Ignore("Only validating compilation of examples")] public async Task Get_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_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 @@ -110,7 +110,7 @@ public async Task Get_GetBastionHostWithZones() [Ignore("Only validating compilation of examples")] public async Task Get_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_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_GetDeveloperBastionHost() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDelete.json // this example is just showing the usage of "BastionHosts_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 @@ -166,7 +166,7 @@ public async Task Delete_DeleteBastionHost() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostDeveloperDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostDeveloperDelete.json // this example is just showing the usage of "BastionHosts_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 @@ -192,7 +192,7 @@ public async Task Delete_DeleteDeveloperBastionHost() [Ignore("Only validating compilation of examples")] public async Task Update_PatchBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostPatch.json // this example is just showing the usage of "BastionHosts_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_PatchBastionHost() [Ignore("Only validating compilation of examples")] public async Task DeleteBastionShareableLinkByToken_DeleteBastionShareableLinksForTheRequestVMs() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionShareableLinkDeleteByToken.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionShareableLinkDeleteByToken.json // this example is just showing the usage of "DeleteBastionShareableLinkByToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionCollection.cs index 078fa456feb9..4ca9fd4299f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_BgpConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionPut.json // this example is just showing the usage of "VirtualHubBgpConnection_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task GetAll_VirtualHubRouteTableV2List() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionList.json // this example is just showing the usage of "VirtualHubBgpConnections_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_VirtualHubRouteTableV2List() [Ignore("Only validating compilation of examples")] public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionResource.cs index a270037fec66..651b05b3a3ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_BgpConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_BgpConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task Delete_VirtualHubRouteTableV2Delete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionDelete.json // this example is just showing the usage of "VirtualHubBgpConnection_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_VirtualHubRouteTableV2Delete() [Ignore("Only validating compilation of examples")] public async Task Update_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubBgpConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubBgpConnectionPut.json // this example is just showing the usage of "VirtualHubBgpConnection_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 @@ -117,7 +117,7 @@ public async Task Update_VirtualHubRouteTableV2Put() [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubBgpConnectionLearnedRoutes_VirtualRouterPeerListLearnedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeerListLearnedRoute.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeerListLearnedRoute.json // this example is just showing the usage of "VirtualHubBgpConnections_ListLearnedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetVirtualHubBgpConnectionLearnedRoutes_VirtualRouterPeerListL [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubBgpConnectionAdvertisedRoutes_VirtualRouterPeerListAdvertisedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeerListAdvertisedRoute.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeerListAdvertisedRoute.json // this example is just showing the usage of "VirtualHubBgpConnections_ListAdvertisedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapCollection.cs index 6b7c226f2171..99c49fe759ba 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudServiceSwapCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutVipSwapOperation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapPut.json // this example is just showing the usage of "VipSwap_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 @@ -54,7 +54,7 @@ public async Task CreateOrUpdate_PutVipSwapOperation() [Ignore("Only validating compilation of examples")] public async Task Get_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_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 @@ -87,7 +87,7 @@ public async Task Get_GetSwapResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetSwapResourceList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapList.json // this example is just showing the usage of "VipSwap_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 @@ -123,7 +123,7 @@ public async Task GetAll_GetSwapResourceList() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_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 @@ -152,7 +152,7 @@ public async Task Exists_GetSwapResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapResource.cs index e8212a92a4d3..7a76f3306c88 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CloudServiceSwapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudServiceSwapResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_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_GetSwapResource() [Ignore("Only validating compilation of examples")] public async Task Update_PutVipSwapOperation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CloudServiceSwapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CloudServiceSwapPut.json // this example is just showing the usage of "VipSwap_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 diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorCollection.cs index 1100658e3b57..f77cf29d1185 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectionMonitorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateConnectionMonitorV1() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorCreate.json // this example is just showing the usage of "ConnectionMonitors_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 @@ -75,7 +75,7 @@ public async Task CreateOrUpdate_CreateConnectionMonitorV1() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateConnectionMonitorV2() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorV2Create.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorV2Create.json // this example is just showing the usage of "ConnectionMonitors_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 @@ -149,7 +149,7 @@ public async Task CreateOrUpdate_CreateConnectionMonitorV2() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateConnectionMonitorWithArcNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json // this example is just showing the usage of "ConnectionMonitors_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 @@ -226,7 +226,7 @@ public async Task CreateOrUpdate_CreateConnectionMonitorWithArcNetwork() [Ignore("Only validating compilation of examples")] public async Task Get_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_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 @@ -260,7 +260,7 @@ public async Task Get_GetConnectionMonitor() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListConnectionMonitors() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorList.json // this example is just showing the usage of "ConnectionMonitors_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 @@ -296,7 +296,7 @@ public async Task GetAll_ListConnectionMonitors() [Ignore("Only validating compilation of examples")] public async Task Exists_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_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 @@ -326,7 +326,7 @@ public async Task Exists_GetConnectionMonitor() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorResource.cs index c6e738a95f84..2816828a4761 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectionMonitorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectionMonitorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_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_GetConnectionMonitor() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorDelete.json // this example is just showing the usage of "ConnectionMonitors_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_DeleteConnectionMonitor() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateConnectionMonitorTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json // this example is just showing the usage of "ConnectionMonitors_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +117,7 @@ public async Task Update_UpdateConnectionMonitorTags() [Ignore("Only validating compilation of examples")] public async Task Stop_StopConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectionMonitorStop.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectionMonitorStop.json // this example is just showing the usage of "ConnectionMonitors_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 diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs index 244b18cbcde6..35f7029a402c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectivityConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConnectivityConfigurationsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationPut.json // this example is just showing the usage of "ConnectivityConfigurations_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 @@ -73,7 +73,7 @@ public async Task CreateOrUpdate_ConnectivityConfigurationsPut() [Ignore("Only validating compilation of examples")] public async Task Get_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_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 @@ -107,7 +107,7 @@ public async Task Get_ConnectivityConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ConnectivityConfigurationsList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationList.json // this example is just showing the usage of "ConnectivityConfigurations_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 @@ -143,7 +143,7 @@ public async Task GetAll_ConnectivityConfigurationsList() [Ignore("Only validating compilation of examples")] public async Task Exists_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_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 @@ -173,7 +173,7 @@ public async Task Exists_ConnectivityConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationResource.cs index ab9a804d2084..ee93d45fd3d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ConnectivityConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectivityConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_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_ConnectivityConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConnectivityConfigurationsDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationDelete.json // this example is just showing the usage of "ConnectivityConfigurations_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_ConnectivityConfigurationsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConnectivityConfigurationsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectivityConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectivityConfigurationPut.json // this example is just showing the usage of "ConnectivityConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixCollection.cs index ba66a18b5373..52d5b4a763f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CustomIPPrefixCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateCustomIPPrefixAllocationMethod() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixCreateCustomizedValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixCreateCustomizedValues.json // this example is just showing the usage of "CustomIPPrefixes_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateCustomIPPrefixAllocationMethod() [Ignore("Only validating compilation of examples")] public async Task Get_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_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 @@ -92,7 +92,7 @@ public async Task Get_GetCustomIPPrefix() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListResourceGroupCustomIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixList.json // this example is just showing the usage of "CustomIPPrefixes_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 @@ -127,7 +127,7 @@ public async Task GetAll_ListResourceGroupCustomIPPrefixes() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_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 @@ -156,7 +156,7 @@ public async Task Exists_GetCustomIPPrefix() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixResource.cs index 5325e79ed797..f365d8d40a05 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_CustomIPPrefixResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CustomIPPrefixResource [Ignore("Only validating compilation of examples")] public async Task Get_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_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_GetCustomIPPrefix() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixDelete.json // this example is just showing the usage of "CustomIPPrefixes_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_DeleteCustomIPPrefix() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatePublicIPAddressTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixUpdateTags.json // this example is just showing the usage of "CustomIPPrefixes_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyCollection.cs index 401ca517b4c3..53905f7bdd02 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosCustomPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyCreate.json // this example is just showing the usage of "DdosCustomPolicies_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateDDoSCustomPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_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 @@ -91,7 +91,7 @@ public async Task Get_GetDDoSCustomPolicy() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_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 @@ -120,7 +120,7 @@ public async Task Exists_GetDDoSCustomPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyResource.cs index 2c291fac65e3..26b403716c4d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosCustomPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosCustomPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_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_GetDDoSCustomPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyDelete.json // this example is just showing the usage of "DdosCustomPolicies_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_DeleteDDoSCustomPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_DDoSCustomPolicyUpdateTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosCustomPolicyUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosCustomPolicyUpdateTags.json // this example is just showing the usage of "DdosCustomPolicies_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanCollection.cs index e6f996d2c0e7..d51514adeb0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosProtectionPlanCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanCreate.json // this example is just showing the usage of "DdosProtectionPlans_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CreateDDoSProtectionPlan() [Ignore("Only validating compilation of examples")] public async Task Get_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_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 @@ -88,7 +88,7 @@ public async Task Get_GetDDoSProtectionPlan() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDDoSProtectionPlansInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanList.json // this example is just showing the usage of "DdosProtectionPlans_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 @@ -123,7 +123,7 @@ public async Task GetAll_ListDDoSProtectionPlansInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_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 @@ -152,7 +152,7 @@ public async Task Exists_GetDDoSProtectionPlan() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanResource.cs index 90e9dce80910..5c2c7a3fdf58 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DdosProtectionPlanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosProtectionPlanResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_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_GetDDoSProtectionPlan() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanDelete.json // this example is just showing the usage of "DdosProtectionPlans_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_DeleteDDoSProtectionPlan() [Ignore("Only validating compilation of examples")] public async Task Update_DDoSProtectionPlanUpdateTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanUpdateTags.json // this example is just showing the usage of "DdosProtectionPlans_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs index 705c5aa5b3fa..bab9f4e9c37a 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DefaultSecurityRuleCollection [Ignore("Only validating compilation of examples")] public async Task Get_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_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_DefaultSecurityRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DefaultSecurityRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DefaultSecurityRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DefaultSecurityRuleList.json // this example is just showing the usage of "DefaultSecurityRules_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 @@ -89,7 +89,7 @@ public async Task GetAll_DefaultSecurityRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_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 @@ -119,7 +119,7 @@ public async Task Exists_DefaultSecurityRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleResource.cs index 280414b60097..18e7e65d8dc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DefaultSecurityRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DefaultSecurityRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationCollection.cs index 6e1b84716fa4..98e9a6d7dff4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DscpConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateDSCPConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationCreate.json // this example is just showing the usage of "DscpConfiguration_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 @@ -112,7 +112,7 @@ public async Task CreateOrUpdate_CreateDSCPConfiguration() [Ignore("Only validating compilation of examples")] public async Task Get_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_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 @@ -145,7 +145,7 @@ public async Task Get_GetDscpConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationList.json // this example is just showing the usage of "DscpConfiguration_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 @@ -180,7 +180,7 @@ public async Task GetAll_GetDscpConfiguration() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_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 @@ -209,7 +209,7 @@ public async Task Exists_GetDscpConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationResource.cs index 90081814463b..5b36c1ebc839 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_DscpConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DscpConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_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_GetDscpConfiguration() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteDSCPConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationDelete.json // this example is just showing the usage of "DscpConfiguration_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_DeleteDSCPConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_CreateDSCPConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationCreate.json // this example is just showing the usage of "DscpConfiguration_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs index fc36985c3e85..9715d090da33 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteCircuitAuthorizationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationCreate.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitAuthorization() [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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 @@ -89,7 +89,7 @@ public async Task Get_GetExpressRouteCircuitAuthorization() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationList.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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 @@ -125,7 +125,7 @@ public async Task GetAll_ListExpressRouteCircuitAuthorization() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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 @@ -155,7 +155,7 @@ public async Task Exists_GetExpressRouteCircuitAuthorization() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs index 58e79fbaffaf..191e7c5cf2f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteCircuitAuthorizationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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_GetExpressRouteCircuitAuthorization() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationDelete.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteExpressRouteCircuitAuthorization() [Ignore("Only validating compilation of examples")] public async Task Update_CreateExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitAuthorizationCreate.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs index 7e69181c9336..308b96663b6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteCircuitCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitCreate.json // this example is just showing the usage of "ExpressRouteCircuits_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 @@ -74,7 +74,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuit() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateExpressRouteCircuitOnExpressRoutePort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json // this example is just showing the usage of "ExpressRouteCircuits_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 @@ -122,7 +122,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitOnExpressRoutePort() [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_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 @@ -155,7 +155,7 @@ public async Task Get_GetExpressRouteCircuit() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExpressRouteCircuitsInAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitListByResourceGroup.json // this example is just showing the usage of "ExpressRouteCircuits_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 @@ -190,7 +190,7 @@ public async Task GetAll_ListExpressRouteCircuitsInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_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 @@ -219,7 +219,7 @@ public async Task Exists_GetExpressRouteCircuit() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs index ec49d67b2932..3881810435a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ExpressRouteCircuitConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionCreate.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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 @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_ExpressRouteCircuitConnectionCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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_ExpressRouteCircuitConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExpressRouteCircuitConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionList.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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 @@ -139,7 +139,7 @@ public async Task GetAll_ListExpressRouteCircuitConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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_ExpressRouteCircuitConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs index e3c8c9fc9270..02eb13b88e25 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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_ExpressRouteCircuitConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionDelete.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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 @@ -80,7 +80,7 @@ public async Task Delete_DeleteExpressRouteCircuit() [Ignore("Only validating compilation of examples")] public async Task Update_ExpressRouteCircuitConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitConnectionCreate.json // this example is just showing the usage of "ExpressRouteCircuitConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs index 94794f2e42ac..ad02f2b59f27 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteCircuitPeeringCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringCreate.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitPeerings() [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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_GetExpressRouteCircuitPeering() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringList.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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 @@ -131,7 +131,7 @@ public async Task GetAll_ListExpressRouteCircuitPeerings() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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 @@ -161,7 +161,7 @@ public async Task Exists_GetExpressRouteCircuitPeering() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs index 0f1390068348..be34f6b1152c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitPeeringResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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_GetExpressRouteCircuitPeering() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringDelete.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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_DeleteExpressRouteCircuitPeerings() [Ignore("Only validating compilation of examples")] public async Task Update_CreateExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringCreate.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_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 @@ -117,7 +117,7 @@ public async Task Update_CreateExpressRouteCircuitPeerings() [Ignore("Only validating compilation of examples")] public async Task GetArpTableExpressRouteCircuit_ListARPTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitARPTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitARPTableList.json // this example is just showing the usage of "ExpressRouteCircuits_ListArpTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetArpTableExpressRouteCircuit_ListARPTable() [Ignore("Only validating compilation of examples")] public async Task GetRoutesTableExpressRouteCircuit_ListRouteTables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitRouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitRouteTableList.json // this example is just showing the usage of "ExpressRouteCircuits_ListRoutesTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task GetRoutesTableExpressRouteCircuit_ListRouteTables() [Ignore("Only validating compilation of examples")] public async Task GetRoutesTableSummaryExpressRouteCircuit_ListRouteTableSummary() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitRouteTableSummaryList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitRouteTableSummaryList.json // this example is just showing the usage of "ExpressRouteCircuits_ListRoutesTableSummary" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task GetRoutesTableSummaryExpressRouteCircuit_ListRouteTableSummary [Ignore("Only validating compilation of examples")] public async Task GetPeeringStatsExpressRouteCircuit_GetExpressRouteCircuitPeeringTrafficStats() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitPeeringStats.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitPeeringStats.json // this example is just showing the usage of "ExpressRouteCircuits_GetPeeringStats" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitResource.cs index d385ea8cc31d..23aa78094195 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCircuitResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_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_GetExpressRouteCircuit() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitDelete.json // this example is just showing the usage of "ExpressRouteCircuits_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_DeleteExpressRouteCircuit() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateExpressRouteCircuitTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitUpdateTags.json // this example is just showing the usage of "ExpressRouteCircuits_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateExpressRouteCircuitTags() [Ignore("Only validating compilation of examples")] public async Task GetStats_GetExpressRouteCircuitTrafficStats() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitStats.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitStats.json // this example is just showing the usage of "ExpressRouteCircuits_GetStats" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs index ed212c702a61..42d4b9ce4b59 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ExpressRouteConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionCreate.json // this example is just showing the usage of "ExpressRouteConnections_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 @@ -84,7 +84,7 @@ public async Task CreateOrUpdate_ExpressRouteConnectionCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_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 @@ -118,7 +118,7 @@ public async Task Get_ExpressRouteConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRouteConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionList.json // this example is just showing the usage of "ExpressRouteConnections_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 @@ -154,7 +154,7 @@ public async Task GetAll_ExpressRouteConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_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 @@ -184,7 +184,7 @@ public async Task Exists_ExpressRouteConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionResource.cs index 1158eb746dd2..5da8d32ee08f 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_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_ExpressRouteConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ExpressRouteConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionDelete.json // this example is just showing the usage of "ExpressRouteConnections_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_ExpressRouteConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ExpressRouteConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteConnectionCreate.json // this example is just showing the usage of "ExpressRouteConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs index 3a4b1c6bd99e..a40a32a697e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteCrossConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionUpdate.json // this example is just showing the usage of "ExpressRouteCrossConnections_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_UpdateExpressRouteCrossConnection() [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_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 @@ -92,7 +92,7 @@ public async Task Get_GetExpressRouteCrossConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRouteCrossConnectionListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json // this example is just showing the usage of "ExpressRouteCrossConnections_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 @@ -127,7 +127,7 @@ public async Task GetAll_ExpressRouteCrossConnectionListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_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 @@ -156,7 +156,7 @@ public async Task Exists_GetExpressRouteCrossConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs index 504af6b34a11..3bb48dea15e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCrossConnectionPeeringCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ExpressRouteCrossConnectionBgpPeeringCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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 @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_ExpressRouteCrossConnectionBgpPeeringCreate() [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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_GetExpressRouteCrossConnectionBgpPeering() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRouteCrossConnectionBgpPeeringList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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_ExpressRouteCrossConnectionBgpPeeringList() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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_GetExpressRouteCrossConnectionBgpPeering() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs index 90b3c72c0d9a..6cdc2104d60d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCrossConnectionPeeringResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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_GetExpressRouteCrossConnectionBgpPeering() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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_DeleteExpressRouteCrossConnectionBgpPeering() [Ignore("Only validating compilation of examples")] public async Task Update_ExpressRouteCrossConnectionBgpPeeringCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_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 @@ -122,7 +122,7 @@ public async Task Update_ExpressRouteCrossConnectionBgpPeeringCreate() [Ignore("Only validating compilation of examples")] public async Task GetArpTableExpressRouteCrossConnection_GetExpressRouteCrossConnectionsArpTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionsArpTable.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionsArpTable.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListArpTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task GetArpTableExpressRouteCrossConnection_GetExpressRouteCrossCon [Ignore("Only validating compilation of examples")] public async Task GetRoutesTableSummaryExpressRouteCrossConnection_GetExpressRouteCrossConnectionsRouteTableSummary() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListRoutesTableSummary" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,7 +180,7 @@ public async Task GetRoutesTableSummaryExpressRouteCrossConnection_GetExpressRou [Ignore("Only validating compilation of examples")] public async Task GetRoutesTableExpressRouteCrossConnection_GetExpressRouteCrossConnectionsRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionsRouteTable.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionsRouteTable.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListRoutesTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs index bbacae7c0b6d..f4dcd6675fe4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCrossConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_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_GetExpressRouteCrossConnection() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateExpressRouteCrossConnectionTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionUpdateTags.json // this example is just showing the usage of "ExpressRouteCrossConnections_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs index df6de108fb2a..334dfb9e6a5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ExpressRouteGatewayCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayCreate.json // this example is just showing the usage of "ExpressRouteGateways_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_ExpressRouteGatewayCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_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 @@ -98,7 +98,7 @@ public async Task Get_ExpressRouteGatewayGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRouteGatewayListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayListByResourceGroup.json // this example is just showing the usage of "ExpressRouteGateways_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 @@ -133,7 +133,7 @@ public async Task GetAll_ExpressRouteGatewayListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_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 @@ -162,7 +162,7 @@ public async Task Exists_ExpressRouteGatewayGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayResource.cs index 172d76b22ef7..618489631f87 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_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_ExpressRouteGatewayGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ExpressRouteGatewayDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayDelete.json // this example is just showing the usage of "ExpressRouteGateways_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_ExpressRouteGatewayDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ExpressRouteGatewayUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayUpdateTags.json // this example is just showing the usage of "ExpressRouteGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkCollection.cs index 9bfe88d9bd24..a98b55f593a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteLinkCollection [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_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_ExpressRouteLinkGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteLinkList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteLinkList.json // this example is just showing the usage of "ExpressRouteLinks_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 @@ -89,7 +89,7 @@ public async Task GetAll_ExpressRouteLinkGet() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_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 @@ -119,7 +119,7 @@ public async Task Exists_ExpressRouteLinkGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkResource.cs index 3536981d0323..3d94568619be 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs index 68e55a3ee554..669eebdb7dba 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRoutePortAuthorizationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationCreate.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CreateExpressRoutePortAuthorization() [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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 @@ -89,7 +89,7 @@ public async Task Get_GetExpressRoutePortAuthorization() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationList.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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 @@ -125,7 +125,7 @@ public async Task GetAll_ListExpressRoutePortAuthorization() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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 @@ -155,7 +155,7 @@ public async Task Exists_GetExpressRoutePortAuthorization() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs index 7a23baeca32a..8b0f118d20c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRoutePortAuthorizationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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_GetExpressRoutePortAuthorization() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationDelete.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteExpressRoutePortAuthorization() [Ignore("Only validating compilation of examples")] public async Task Update_CreateExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortAuthorizationCreate.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortCollection.cs index c107cffe142a..e8e0aaee89fc 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRoutePortCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ExpressRoutePortCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortCreate.json // this example is just showing the usage of "ExpressRoutePorts_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_ExpressRoutePortCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ExpressRoutePortUpdateLink() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortUpdateLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortUpdateLink.json // this example is just showing the usage of "ExpressRoutePorts_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 @@ -110,7 +110,7 @@ public async Task CreateOrUpdate_ExpressRoutePortUpdateLink() [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_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 @@ -143,7 +143,7 @@ public async Task Get_ExpressRoutePortGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRoutePortListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortListByResourceGroup.json // this example is just showing the usage of "ExpressRoutePorts_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 @@ -178,7 +178,7 @@ public async Task GetAll_ExpressRoutePortListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_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 @@ -207,7 +207,7 @@ public async Task Exists_ExpressRoutePortGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortResource.cs index 14be5b7c5992..dbf0df4f2d59 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRoutePortResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_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_ExpressRoutePortGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ExpressRoutePortDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortDelete.json // this example is just showing the usage of "ExpressRoutePorts_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_ExpressRoutePortDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ExpressRoutePortUpdateTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortUpdateTags.json // this example is just showing the usage of "ExpressRoutePorts_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ExpressRoutePortUpdateTags() [Ignore("Only validating compilation of examples")] public async Task GenerateLoa_GenerateExpressRoutePortLOA() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GenerateExpressRoutePortsLOA.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GenerateExpressRoutePortsLOA.json // this example is just showing the usage of "ExpressRoutePorts_GenerateLoa" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs index 369918bc4b73..bfd3efb14b13 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRoutePortsLocationCollection [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_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_ExpressRoutePortsLocationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRoutePortsLocationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortsLocationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortsLocationList.json // this example is just showing the usage of "ExpressRoutePortsLocations_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 @@ -86,7 +86,7 @@ public async Task GetAll_ExpressRoutePortsLocationList() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_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 @@ -114,7 +114,7 @@ public async Task Exists_ExpressRoutePortsLocationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs index 793c212a25b4..13b8153cef0c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRoutePortsLocationResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs index 5c7c4dd2a178..0c525f679927 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteProviderPortCollection [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ExpressRouteProviderPort() [Ignore("Only validating compilation of examples")] public async Task GetAll_ExpressRouteProviderPortList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/expressRouteProviderPortList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/expressRouteProviderPortList.json // this example is just showing the usage of "ExpressRouteProviderPortsLocation_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 @@ -86,7 +86,7 @@ public async Task GetAll_ExpressRouteProviderPortList() [Ignore("Only validating compilation of examples")] public async Task Exists_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ExpressRouteProviderPort() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs index 6ef73e32e07c..90505fc7d065 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteProviderPortResource [Ignore("Only validating compilation of examples")] public async Task Get_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyCollection.cs index b151c10e4def..b66868578638 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FirewallPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyPut.json // this example is just showing the usage of "FirewallPolicies_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 @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_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 Get_GetFirewallPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllFirewallPoliciesForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyListByResourceGroup.json // this example is just showing the usage of "FirewallPolicies_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 @@ -203,7 +203,7 @@ public async Task GetAll_ListAllFirewallPoliciesForAGivenResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_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 @@ -232,7 +232,7 @@ public async Task Exists_GetFirewallPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyDraftResource.cs index df4ba81eae6d..e94aaee84225 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyDraftResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyDraftResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyDraftGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyDraftGet.json // this example is just showing the usage of "FirewallPolicyDrafts_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_GetFirewallPolicyDraft() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyDraftDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyDraftDelete.json // this example is just showing the usage of "FirewallPolicyDrafts_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_DeleteFirewallPolicyDraft() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyDraftPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyDraftPut.json // this example is just showing the usage of "FirewallPolicyDrafts_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyResource.cs index ff0b6261b779..c1bf863bcb96 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_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_GetFirewallPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyDelete.json // this example is just showing the usage of "FirewallPolicies_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_DeleteFirewallPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateFirewallPolicyTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyPatch.json // this example is just showing the usage of "FirewallPolicies_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateFirewallPolicyTags() [Ignore("Only validating compilation of examples")] public async Task GetFirewallPolicyIdpsSignature_QuerySignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyQuerySignatureOverrides.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyQuerySignatureOverrides.json // this example is just showing the usage of "FirewallPolicyIdpsSignatures_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 @@ -156,7 +156,7 @@ public async Task GetFirewallPolicyIdpsSignature_QuerySignatureOverrides() [Ignore("Only validating compilation of examples")] public async Task GetFirewallPolicyIdpsSignaturesFilterValue_QuerySignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesFilterValues_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 @@ -186,7 +186,7 @@ public async Task GetFirewallPolicyIdpsSignaturesFilterValue_QuerySignatureOverr [Ignore("Only validating compilation of examples")] public async Task DeployFirewallPolicyDeployment_DeployFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyDraftDeploy.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyDraftDeploy.json // this example is just showing the usage of "FirewallPolicyDeployments_Deploy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs index ba631436b319..02540eafc24e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyRuleCollectionGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -76,7 +76,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyNatRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -129,7 +129,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithIPGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -181,7 +181,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithIPGr [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -237,7 +237,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithWebC [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -298,7 +298,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithHttp [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -332,7 +332,7 @@ public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -366,7 +366,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -400,7 +400,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -434,7 +434,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -470,7 +470,7 @@ public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupWithWebCategori [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupList.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -506,7 +506,7 @@ public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsForAGivenFirew [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsWithIpGroupsForAGivenFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -542,7 +542,7 @@ public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsWithIpGroupsFo [Ignore("Only validating compilation of examples")] public async Task Exists_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -572,7 +572,7 @@ public async Task Exists_GetFirewallPolicyNatRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -602,7 +602,7 @@ public async Task Exists_GetFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -632,7 +632,7 @@ public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -662,7 +662,7 @@ public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithWebCategories() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -704,7 +704,7 @@ public async Task GetIfExists_GetFirewallPolicyNatRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -746,7 +746,7 @@ public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -788,7 +788,7 @@ public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs index f0601a59cf85..25ff87807ace 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyRuleCollectionGroupDraftResource [Ignore("Only validating compilation of examples")] public async Task Get_GetRuleCollectionGroupDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroupDrafts_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_GetRuleCollectionGroupDraft() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFirewallRuleCollectionGroupDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroupDrafts_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_DeleteFirewallRuleCollectionGroupDraft() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateRuleCollectionGroupDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroupDrafts_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs index 1b42de7707d6..ea654d6bf73b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyRuleCollectionGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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_GetFirewallPolicyNatRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -82,7 +82,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -113,7 +113,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -144,7 +144,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupDelete.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -171,7 +171,7 @@ public async Task Delete_DeleteFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -224,7 +224,7 @@ public async Task Update_CreateFirewallPolicyNatRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -274,7 +274,7 @@ public async Task Update_CreateFirewallPolicyRuleCollectionGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithIPGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -323,7 +323,7 @@ public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithIPGroups() [Ignore("Only validating compilation of examples")] public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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 @@ -376,7 +376,7 @@ public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithWebCategorie [Ignore("Only validating compilation of examples")] public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogCollection.cs index c8526596124e..aa94b7f366fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FlowLogCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogCreate.json // this example is just showing the usage of "FlowLogs_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 @@ -76,7 +76,7 @@ public async Task CreateOrUpdate_CreateOrUpdateFlowLog() [Ignore("Only validating compilation of examples")] public async Task Get_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_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 @@ -110,7 +110,7 @@ public async Task Get_GetFlowLog() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListConnectionMonitors() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogList.json // this example is just showing the usage of "FlowLogs_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 @@ -146,7 +146,7 @@ public async Task GetAll_ListConnectionMonitors() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_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 @@ -176,7 +176,7 @@ public async Task Exists_GetFlowLog() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogResource.cs index 73b13e6c5cbd..46b363d57540 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FlowLogResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FlowLogResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_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_GetFlowLog() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogDelete.json // this example is just showing the usage of "FlowLogs_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_DeleteFlowLog() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateFlowLogTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogUpdateTags.json // this example is just showing the usage of "FlowLogs_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs index 79fee0c93a14..eafe2735d515 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_FrontendIPConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_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_LoadBalancerFrontendIPConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_LoadBalancerFrontendIPConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerFrontendIPConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerFrontendIPConfigurationList.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_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 @@ -89,7 +89,7 @@ public async Task GetAll_LoadBalancerFrontendIPConfigurationList() [Ignore("Only validating compilation of examples")] public async Task Exists_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_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 @@ -119,7 +119,7 @@ public async Task Exists_LoadBalancerFrontendIPConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationResource.cs index f12cc972cc13..4ee352508d03 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_FrontendIPConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_FrontendIPConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationCollection.cs index 2e0c41ef81f1..a2b0dc24b8b6 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_HubIPConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VirtualHubIpConfigurationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationPut.json // this example is just showing the usage of "VirtualHubIpConfiguration_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_VirtualHubIpConfigurationPut() [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task GetAll_VirtualHubRouteTableV2List() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationList.json // this example is just showing the usage of "VirtualHubIpConfiguration_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 @@ -131,7 +131,7 @@ public async Task GetAll_VirtualHubRouteTableV2List() [Ignore("Only validating compilation of examples")] public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_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 @@ -161,7 +161,7 @@ public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationResource.cs index c78fa26c8e88..fc9dd56d3119 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubIPConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HubIPConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task Delete_VirtualHubIpConfigurationDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationDelete.json // this example is just showing the usage of "VirtualHubIpConfiguration_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 @@ -77,7 +77,7 @@ public async Task Delete_VirtualHubIpConfigurationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VirtualHubIpConfigurationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubIpConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubIpConfigurationPut.json // this example is just showing the usage of "VirtualHubIpConfiguration_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableCollection.cs index c7b296f1a543..77cdd30dd5d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HubRouteTableCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTablePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTablePut.json // this example is just showing the usage of "HubRouteTables_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_RouteTablePut() [Ignore("Only validating compilation of examples")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_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_RouteTableGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RouteTableList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTableList.json // this example is just showing the usage of "HubRouteTables_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_RouteTableList() [Ignore("Only validating compilation of examples")] public async Task Exists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_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_RouteTableGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableResource.cs index 163519f3ee0d..92cb3878a24a 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubRouteTableResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HubRouteTableResource [Ignore("Only validating compilation of examples")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_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_RouteTableGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RouteTableDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTableDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTableDelete.json // this example is just showing the usage of "HubRouteTables_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_RouteTableDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubRouteTablePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubRouteTablePut.json // this example is just showing the usage of "HubRouteTables_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs index 139da248571f..04ed37124da8 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_HubVirtualNetworkConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_HubVirtualNetworkConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionPut.json // this example is just showing the usage of "HubVirtualNetworkConnections_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 @@ -93,7 +93,7 @@ public async Task CreateOrUpdate_HubVirtualNetworkConnectionPut() [Ignore("Only validating compilation of examples")] public async Task Get_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_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 @@ -127,7 +127,7 @@ public async Task Get_HubVirtualNetworkConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_HubVirtualNetworkConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionList.json // this example is just showing the usage of "HubVirtualNetworkConnections_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 @@ -163,7 +163,7 @@ public async Task GetAll_HubVirtualNetworkConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_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 @@ -193,7 +193,7 @@ public async Task Exists_HubVirtualNetworkConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs index 4d816fd61b19..86c50b36877b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_HubVirtualNetworkConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_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_HubVirtualNetworkConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_HubVirtualNetworkConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionDelete.json // this example is just showing the usage of "HubVirtualNetworkConnections_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_HubVirtualNetworkConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_HubVirtualNetworkConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/HubVirtualNetworkConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/HubVirtualNetworkConnectionPut.json // this example is just showing the usage of "HubVirtualNetworkConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationCollection.cs index 1949b61d9482..066579082239 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_IPAllocationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationCreate.json // this example is just showing the usage of "IpAllocations_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateIpAllocation() [Ignore("Only validating compilation of examples")] public async Task Get_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_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 @@ -98,7 +98,7 @@ public async Task Get_GetIpAllocation() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListIpAllocationsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationListByResourceGroup.json // this example is just showing the usage of "IpAllocations_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 @@ -133,7 +133,7 @@ public async Task GetAll_ListIpAllocationsInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_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 @@ -162,7 +162,7 @@ public async Task Exists_GetIpAllocation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationResource.cs index 7bf8ab95fd13..75593c719cc8 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPAllocationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IPAllocationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_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_GetIpAllocation() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationDelete.json // this example is just showing the usage of "IpAllocations_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_DeleteIpAllocation() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVirtualNetworkTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationUpdateTags.json // this example is just showing the usage of "IpAllocations_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupCollection.cs index 9db80213b6b8..c595d4d54ad2 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IPGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsCreate.json // this example is just showing the usage of "IpGroups_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_CreateOrUpdateIpGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_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 @@ -96,7 +96,7 @@ public async Task Get_GetIpGroups() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListByResourceGroupIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsListByResourceGroup.json // this example is just showing the usage of "IpGroups_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 @@ -131,7 +131,7 @@ public async Task GetAll_ListByResourceGroupIpGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_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_GetIpGroups() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupResource.cs index 10b8d0eb7a38..c0ea73e6aee7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IPGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IPGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_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_GetIpGroups() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsDelete.json // this example is just showing the usage of "IpGroups_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_DeleteIpGroups() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsUpdateTags.json // this example is just showing the usage of "IpGroups_UpdateGroups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleCollection.cs index db769910d945..c45ab5ce44a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_InboundNatRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_InboundNatRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleCreate.json // this example is just showing the usage of "InboundNatRules_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_InboundNatRuleCreate() [Ignore("Only validating compilation of examples")] public async Task Get_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_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_InboundNatRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_InboundNatRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleList.json // this example is just showing the usage of "InboundNatRules_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_InboundNatRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_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_InboundNatRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleResource.cs index d4f6cbdc7e40..5d18098227cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundNatRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_InboundNatRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_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_InboundNatRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_InboundNatRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleDelete.json // this example is just showing the usage of "InboundNatRules_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_InboundNatRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_InboundNatRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundNatRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundNatRuleCreate.json // this example is just showing the usage of "InboundNatRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleCollection.cs index 2ab2d4ab77b5..27227dd790bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_InboundSecurityRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkVirtualApplianceInboundSecurityRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundSecurityRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundSecurityRulePut.json // this example is just showing the usage of "InboundSecurityRule_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 @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateNetworkVirtualApplianceInboundSecurityRul [Ignore("Only validating compilation of examples")] public async Task Get_CreateNetworkVirtualApplianceInboundSecurityRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundSecurityRuleGet.json // this example is just showing the usage of "InboundSecurityRule_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_CreateNetworkVirtualApplianceInboundSecurityRules() [Ignore("Only validating compilation of examples")] public async Task Exists_CreateNetworkVirtualApplianceInboundSecurityRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundSecurityRuleGet.json // this example is just showing the usage of "InboundSecurityRule_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 @@ -132,7 +132,7 @@ public async Task Exists_CreateNetworkVirtualApplianceInboundSecurityRules() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CreateNetworkVirtualApplianceInboundSecurityRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundSecurityRuleGet.json // this example is just showing the usage of "InboundSecurityRule_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleResource.cs index aedc3890750c..9b827846defe 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_InboundSecurityRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_InboundSecurityRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_CreateNetworkVirtualApplianceInboundSecurityRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundSecurityRuleGet.json // this example is just showing the usage of "InboundSecurityRule_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_CreateNetworkVirtualApplianceInboundSecurityRules() [Ignore("Only validating compilation of examples")] public async Task Update_CreateNetworkVirtualApplianceInboundSecurityRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/InboundSecurityRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/InboundSecurityRulePut.json // this example is just showing the usage of "InboundSecurityRule_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolCollection.cs index 66c2b05ab537..bec29b700b72 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IpamPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_IpamPoolsCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Create.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Create.json // this example is just showing the usage of "IpamPools_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_IpamPoolsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_IpamPoolsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Get.json // this example is just showing the usage of "IpamPools_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_IpamPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_IpamPoolsList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_List.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_List.json // this example is just showing the usage of "IpamPools_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_IpamPoolsList() [Ignore("Only validating compilation of examples")] public async Task Exists_IpamPoolsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Get.json // this example is just showing the usage of "IpamPools_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_IpamPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_IpamPoolsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Get.json // this example is just showing the usage of "IpamPools_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolResource.cs index e8c72bd15ae6..34f2dbacd4df 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_IpamPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IpamPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_IpamPoolsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Get.json // this example is just showing the usage of "IpamPools_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_IpamPoolsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_IpamPoolsDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Delete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Delete.json // this example is just showing the usage of "IpamPools_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_IpamPoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_IpamPoolsUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_Update.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_Update.json // this example is just showing the usage of "IpamPools_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 @@ -110,7 +110,7 @@ public async Task Update_IpamPoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetPoolUsage_IpamPoolsGetPoolUsage() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_GetPoolUsage.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_GetPoolUsage.json // this example is just showing the usage of "IpamPools_GetPoolUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetPoolUsage_IpamPoolsGetPoolUsage() [Ignore("Only validating compilation of examples")] public async Task GetAssociatedResources_IpamPoolsListAssociatedResources() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpamPools_ListAssociatedResources.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpamPools_ListAssociatedResources.json // this example is just showing the usage of "IpamPools_ListAssociatedResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerCollection.cs index 8eb7b0696310..bea21cbd6e55 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_LoadBalancerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreate.json // this example is just showing the usage of "LoadBalancers_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 @@ -109,7 +109,7 @@ public async Task CreateOrUpdate_CreateLoadBalancer() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithFrontendIPInZone1() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateWithZones.json // this example is just showing the usage of "LoadBalancers_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 @@ -200,7 +200,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithFrontendIPInZone1() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json // this example is just showing the usage of "LoadBalancers_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 @@ -291,7 +291,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerConsum [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json // this example is just showing the usage of "LoadBalancers_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 @@ -387,7 +387,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProvid [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json // this example is just showing the usage of "LoadBalancers_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 @@ -476,7 +476,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProvid [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateGlobalTier.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateGlobalTier.json // this example is just showing the usage of "LoadBalancers_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 @@ -560,7 +560,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGlobalTierAndOneRegionalL [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithStandardSKU() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateStandardSku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateStandardSku.json // this example is just showing the usage of "LoadBalancers_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 @@ -650,7 +650,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithStandardSKU() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithSyncModePropertyOnPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json // this example is just showing the usage of "LoadBalancers_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 @@ -742,7 +742,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithSyncModePropertyOnPool() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithInboundNatPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateWithInboundNatPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateWithInboundNatPool.json // this example is just showing the usage of "LoadBalancers_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 @@ -812,7 +812,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithInboundNatPool() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLoadBalancerWithOutboundRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerCreateWithOutboundRules.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerCreateWithOutboundRules.json // this example is just showing the usage of "LoadBalancers_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 @@ -912,7 +912,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithOutboundRules() [Ignore("Only validating compilation of examples")] public async Task Get_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_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 @@ -945,7 +945,7 @@ public async Task Get_GetLoadBalancer() [Ignore("Only validating compilation of examples")] public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_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 @@ -978,7 +978,7 @@ public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListLoadBalancersInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerList.json // this example is just showing the usage of "LoadBalancers_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 @@ -1013,7 +1013,7 @@ public async Task GetAll_ListLoadBalancersInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_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 @@ -1042,7 +1042,7 @@ public async Task Exists_GetLoadBalancer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_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 @@ -1071,7 +1071,7 @@ public async Task Exists_GetLoadBalancerWithInboundNATRulePortMapping() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_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 @@ -1112,7 +1112,7 @@ public async Task GetIfExists_GetLoadBalancer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerResource.cs index 0e8ce1b41686..6130c239a6f3 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LoadBalancerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_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_GetLoadBalancer() [Ignore("Only validating compilation of examples")] public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_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 @@ -80,7 +80,7 @@ public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerDelete.json // this example is just showing the usage of "LoadBalancers_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 @@ -106,7 +106,7 @@ public async Task Delete_DeleteLoadBalancer() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateLoadBalancerTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerUpdateTags.json // this example is just showing the usage of "LoadBalancers_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Update_UpdateLoadBalancerTags() [Ignore("Only validating compilation of examples")] public async Task MigrateToIPBased_MigrateLoadBalancerToIPBased() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/MigrateLoadBalancerToIPBased.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/MigrateLoadBalancerToIPBased.json // this example is just showing the usage of "LoadBalancers_MigrateToIPBased" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task MigrateToIPBased_MigrateLoadBalancerToIPBased() [Ignore("Only validating compilation of examples")] public async Task GetLoadBalancerNetworkInterfaces_LoadBalancerNetworkInterfaceListSimple() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerNetworkInterfaceListSimple.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerNetworkInterfaceListSimple.json // this example is just showing the usage of "LoadBalancerNetworkInterfaces_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 @@ -207,7 +207,7 @@ public async Task GetLoadBalancerNetworkInterfaces_LoadBalancerNetworkInterfaceL [Ignore("Only validating compilation of examples")] public async Task GetLoadBalancerNetworkInterfaces_LoadBalancerNetworkInterfaceListVmss() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerNetworkInterfaceListVmss.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerNetworkInterfaceListVmss.json // this example is just showing the usage of "LoadBalancerNetworkInterfaces_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleCollection.cs index fc0a104eabd6..799b8c15f329 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_LoadBalancingRuleCollection [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_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_LoadBalancerLoadBalancingRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_LoadBalancerLoadBalancingRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerLoadBalancingRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerLoadBalancingRuleList.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_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 @@ -89,7 +89,7 @@ public async Task GetAll_LoadBalancerLoadBalancingRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_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 @@ -119,7 +119,7 @@ public async Task Exists_LoadBalancerLoadBalancingRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleResource.cs index 86178e9fc801..544ed722bef8 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LoadBalancingRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LoadBalancingRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_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_LoadBalancerLoadBalancingRuleGet() [Ignore("Only validating compilation of examples")] public async Task Health_QueryLoadBalancingRuleHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerHealth.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerHealth.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_Health" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs index acb310c30c41..bcb55f176e1a 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_LocalNetworkGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayCreate.json // this example is just showing the usage of "LocalNetworkGateways_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateLocalNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_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 @@ -98,7 +98,7 @@ public async Task Get_GetLocalNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListLocalNetworkGateways() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayList.json // this example is just showing the usage of "LocalNetworkGateways_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_ListLocalNetworkGateways() [Ignore("Only validating compilation of examples")] public async Task Exists_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_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 @@ -162,7 +162,7 @@ public async Task Exists_GetLocalNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayResource.cs index 712b17eada46..2c892191fbf9 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_LocalNetworkGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LocalNetworkGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_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_GetLocalNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayDelete.json // this example is just showing the usage of "LocalNetworkGateways_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_DeleteLocalNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateLocalNetworkGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LocalNetworkGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LocalNetworkGatewayUpdateTags.json // this example is just showing the usage of "LocalNetworkGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs index d23ce2d48503..b66192077d23 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagementGroupNetworkManagerConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupPut.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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 @@ -57,7 +57,7 @@ public async Task CreateOrUpdate_CreateOrUpdateManagementGroupNetworkManagerConn [Ignore("Only validating compilation of examples")] public async Task Get_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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 @@ -89,7 +89,7 @@ public async Task Get_GetManagementGroupNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupList.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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 @@ -123,7 +123,7 @@ public async Task GetAll_ListManagementGroupNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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 @@ -151,7 +151,7 @@ public async Task Exists_GetManagementGroupNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs index 7bf4192f6e6a..a417f83d8eee 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagementGroupNetworkManagerConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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 @@ -48,7 +48,7 @@ public async Task Get_GetManagementGroupNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupDelete.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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 @@ -73,7 +73,7 @@ public async Task Delete_DeleteManagementGroupNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionManagementGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionManagementGroupPut.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayCollection.cs index 1cc4869b3ec5..6ca3369cecab 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_NatGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayCreateOrUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayCreateOrUpdate.json // this example is just showing the usage of "NatGateways_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 @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_CreateNatGateway() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNatGatewayWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayCreateOrUpdateStandardV2Sku.json // this example is just showing the usage of "NatGateways_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 @@ -116,7 +116,7 @@ public async Task CreateOrUpdate_CreateNatGatewayWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task Get_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_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 @@ -149,7 +149,7 @@ public async Task Get_GetNatGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetNatGatewayWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGetStandardV2Sku.json // this example is just showing the usage of "NatGateways_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 @@ -182,7 +182,7 @@ public async Task Get_GetNatGatewayWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNatGatewaysInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayList.json // this example is just showing the usage of "NatGateways_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 @@ -217,7 +217,7 @@ public async Task GetAll_ListNatGatewaysInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_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 @@ -246,7 +246,7 @@ public async Task Exists_GetNatGateway() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNatGatewayWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGetStandardV2Sku.json // this example is just showing the usage of "NatGateways_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 @@ -275,7 +275,7 @@ public async Task Exists_GetNatGatewayWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_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 @@ -316,7 +316,7 @@ public async Task GetIfExists_GetNatGateway() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNatGatewayWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGetStandardV2Sku.json // this example is just showing the usage of "NatGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayResource.cs index 9d95a5bf192b..1f1b4f78251d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NatGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NatGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_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_GetNatGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetNatGatewayWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayGetStandardV2Sku.json // this example is just showing the usage of "NatGateways_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 @@ -80,7 +80,7 @@ public async Task Get_GetNatGatewayWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayDelete.json // this example is just showing the usage of "NatGateways_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 @@ -106,7 +106,7 @@ public async Task Delete_DeleteNatGateway() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNatGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayUpdateTags.json // this example is just showing the usage of "NatGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Update_UpdateNatGatewayTags() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNatGatewayWithStandardV2SkuTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayUpdateTagsStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayUpdateTagsStandardV2Sku.json // this example is just showing the usage of "NatGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupCollection.cs index 55edecead2de..0f0167cdb119 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NetworkGroupsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupPut.json // this example is just showing the usage of "NetworkGroups_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_NetworkGroupsPut() [Ignore("Only validating compilation of examples")] public async Task Get_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_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_NetworkGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NetworkGroupsList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupList.json // this example is just showing the usage of "NetworkGroups_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_NetworkGroupsList() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_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_NetworkGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupResource.cs index 00b507f8a41f..537b9869a381 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_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_NetworkGroupsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NetworkGroupsDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupDelete.json // this example is just showing the usage of "NetworkGroups_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_NetworkGroupsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NetworkGroupsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGroupPut.json // this example is just showing the usage of "NetworkGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs index a2f489009dd9..bb23f1568141 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkGroupStaticMemberCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_StaticMemberPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberPut.json // this example is just showing the usage of "StaticMembers_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_StaticMemberPut() [Ignore("Only validating compilation of examples")] public async Task Get_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_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_StaticMembersGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_StaticMembersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberList.json // this example is just showing the usage of "StaticMembers_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 @@ -131,7 +131,7 @@ public async Task GetAll_StaticMembersList() [Ignore("Only validating compilation of examples")] public async Task Exists_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_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 @@ -162,7 +162,7 @@ public async Task Exists_StaticMembersGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs index c068c57ec669..1d54cf2e3f1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkGroupStaticMemberResource [Ignore("Only validating compilation of examples")] public async Task Get_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_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_StaticMembersGet() [Ignore("Only validating compilation of examples")] public async Task Delete_StaticMembersDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberDelete.json // this example is just showing the usage of "StaticMembers_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_StaticMembersDelete() [Ignore("Only validating compilation of examples")] public async Task Update_StaticMemberPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerStaticMemberPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerStaticMemberPut.json // this example is just showing the usage of "StaticMembers_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceCollection.cs index 7d5d207b4b49..e0f7b2c370db 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkInterfaceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceCreate.json // this example is just showing the usage of "NetworkInterfaces_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 @@ -76,7 +76,7 @@ public async Task CreateOrUpdate_CreateNetworkInterface() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json // this example is just showing the usage of "NetworkInterfaces_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 @@ -128,7 +128,7 @@ public async Task CreateOrUpdate_CreateNetworkInterfaceWithGatewayLoadBalancerCo [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_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 @@ -161,7 +161,7 @@ public async Task Get_GetNetworkInterface() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkInterfacesInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceList.json // this example is just showing the usage of "NetworkInterfaces_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 @@ -196,7 +196,7 @@ public async Task GetAll_ListNetworkInterfacesInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_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 @@ -225,7 +225,7 @@ public async Task Exists_GetNetworkInterface() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs index 4a9c9fb3c874..62b163b4f8eb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceIPConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task Get_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_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_NetworkInterfaceIPConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NetworkInterfaceIPConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceIPConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceIPConfigurationList.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_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 @@ -89,7 +89,7 @@ public async Task GetAll_NetworkInterfaceIPConfigurationList() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_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 @@ -119,7 +119,7 @@ public async Task Exists_NetworkInterfaceIPConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs index b8cb6937f44d..2714327118d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceIPConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceResource.cs index 3f06aa4e33ac..d5e642661689 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkInterfaceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_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_GetNetworkInterface() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceDelete.json // this example is just showing the usage of "NetworkInterfaces_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_DeleteNetworkInterface() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNetworkInterfaceTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceUpdateTags.json // this example is just showing the usage of "NetworkInterfaces_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateNetworkInterfaceTags() [Ignore("Only validating compilation of examples")] public async Task GetEffectiveRouteTable_ShowNetworkInterfaceEffectiveRouteTables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceEffectiveRouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceEffectiveRouteTableList.json // this example is just showing the usage of "NetworkInterfaces_GetEffectiveRouteTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task GetEffectiveRouteTable_ShowNetworkInterfaceEffectiveRouteTable [Ignore("Only validating compilation of examples")] public async Task GetEffectiveNetworkSecurityGroups_ListNetworkInterfaceEffectiveNetworkSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceEffectiveNSGList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceEffectiveNSGList.json // this example is just showing the usage of "NetworkInterfaces_ListEffectiveNetworkSecurityGroups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetEffectiveNetworkSecurityGroups_ListNetworkInterfaceEffectiv [Ignore("Only validating compilation of examples")] public async Task GetNetworkInterfaceLoadBalancers_NetworkInterfaceLoadBalancerList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceLoadBalancerList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceLoadBalancerList.json // this example is just showing the usage of "NetworkInterfaceLoadBalancers_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs index e580e927d218..b1588fc3017a 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceTapConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationCreate.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_CreateNetworkInterfaceTapConfigurations() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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_GetNetworkInterfaceTapConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworkTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationList.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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 @@ -131,7 +131,7 @@ public async Task GetAll_ListVirtualNetworkTapConfigurations() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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 @@ -161,7 +161,7 @@ public async Task Exists_GetNetworkInterfaceTapConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs index 49213ebf420e..1d2dd9138bce 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceTapConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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_GetNetworkInterfaceTapConfigurations() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTapConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationDelete.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteTapConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_CreateNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceTapConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceTapConfigurationCreate.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerCollection.cs index 0f88eef6eb44..e8f6a06b2884 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkManagerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutNetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerPut.json // this example is just showing the usage of "NetworkManagers_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_PutNetworkManager() [Ignore("Only validating compilation of examples")] public async Task Get_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_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 @@ -98,7 +98,7 @@ public async Task Get_NetworkManagersGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerList.json // this example is just showing the usage of "NetworkManagers_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_ListNetworkManager() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_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 @@ -162,7 +162,7 @@ public async Task Exists_NetworkManagersGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerResource.cs index 00c768453897..ff6acbb6fce2 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_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_NetworkManagersGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NetworkManagersDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerDelete.json // this example is just showing the usage of "NetworkManagers_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 @@ -77,7 +77,7 @@ public async Task Delete_NetworkManagersDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NetworkManagesPatch() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerPatch.json // this example is just showing the usage of "NetworkManagers_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_NetworkManagesPatch() [Ignore("Only validating compilation of examples")] public async Task GetActiveConnectivityConfigurations_ListActiveConnectivityConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json // this example is just showing the usage of "ListActiveConnectivityConfigurations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task GetActiveConnectivityConfigurations_ListActiveConnectivityConf [Ignore("Only validating compilation of examples")] public async Task GetActiveSecurityAdminRules_ListActiveSecurityAdminRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerActiveSecurityAdminRulesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerActiveSecurityAdminRulesList.json // this example is just showing the usage of "ListActiveSecurityAdminRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task GetActiveSecurityAdminRules_ListActiveSecurityAdminRules() [Ignore("Only validating compilation of examples")] public async Task PostNetworkManagerCommit_NetworkManageCommitPost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerCommitPost.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerCommitPost.json // this example is just showing the usage of "NetworkManagerCommits_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task PostNetworkManagerCommit_NetworkManageCommitPost() [Ignore("Only validating compilation of examples")] public async Task GetNetworkManagerDeploymentStatus_NetworkManagerDeploymentStatusList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerDeploymentStatusList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerDeploymentStatusList.json // this example is just showing the usage of "NetworkManagerDeploymentStatus_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationCollection.cs index 87404a5905ac..4f67af4b77ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkManagerRoutingConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkManagerRoutingConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationPut.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateNetworkManagerRoutingConfiguration() [Ignore("Only validating compilation of examples")] public async Task Get_GetRoutingConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationGet.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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 @@ -92,7 +92,7 @@ public async Task Get_GetRoutingConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRoutingConfigurationsInANetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationList.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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 @@ -128,7 +128,7 @@ public async Task GetAll_ListRoutingConfigurationsInANetworkManager() [Ignore("Only validating compilation of examples")] public async Task Exists_GetRoutingConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationGet.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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 @@ -158,7 +158,7 @@ public async Task Exists_GetRoutingConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetRoutingConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationGet.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationResource.cs index 507217c36771..d5ac3f716842 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkManagerRoutingConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetRoutingConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationGet.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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_GetRoutingConfigurations() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkManagerRoutingConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationDelete.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteNetworkManagerRoutingConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_CreateNetworkManagerRoutingConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingConfigurationPut.json // this example is just showing the usage of "NetworkManagerRoutingConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleCollection.cs index e08c32190753..923c4880abb5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerRoutingRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADefaultRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRulePut.json // this example is just showing the usage of "RoutingRules_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_CreateADefaultRoutingRule() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRulePut.json // this example is just showing the usage of "RoutingRules_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 @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_CreateAnRoutingRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetsRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleGet.json // this example is just showing the usage of "RoutingRules_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 @@ -142,7 +142,7 @@ public async Task Get_GetsRoutingRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRoutingRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleList.json // this example is just showing the usage of "RoutingRules_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 @@ -180,7 +180,7 @@ public async Task GetAll_ListRoutingRules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleGet.json // this example is just showing the usage of "RoutingRules_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 @@ -212,7 +212,7 @@ public async Task Exists_GetsRoutingRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleGet.json // this example is just showing the usage of "RoutingRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleResource.cs index 0f44fb16aaf6..b34c55c5c5c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerRoutingRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleGet.json // this example is just showing the usage of "RoutingRules_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_GetsRoutingRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesARoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleDelete.json // this example is just showing the usage of "RoutingRules_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 @@ -83,7 +83,7 @@ public async Task Delete_DeletesARoutingRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateADefaultRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRulePut.json // this example is just showing the usage of "RoutingRules_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 @@ -123,7 +123,7 @@ public async Task Update_CreateADefaultRoutingRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAnRoutingRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRulePut.json // this example is just showing the usage of "RoutingRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesCollection.cs index 3e40b34ef130..1a7efaef9879 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerRoutingRulesCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateARoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionPut.json // this example is just showing the usage of "RoutingRuleCollections_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_CreateOrUpdateARoutingRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Get_GetsRoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionGet.json // this example is just showing the usage of "RoutingRuleCollections_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 @@ -96,7 +96,7 @@ public async Task Get_GetsRoutingRuleCollection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRoutingRuleCollections() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionList.json // this example is just showing the usage of "RoutingRuleCollections_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_ListRoutingRuleCollections() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsRoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionGet.json // this example is just showing the usage of "RoutingRuleCollections_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 +164,7 @@ public async Task Exists_GetsRoutingRuleCollection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsRoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionGet.json // this example is just showing the usage of "RoutingRuleCollections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesResource.cs index 492b66cc6587..1e3cee477a04 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerRoutingRulesResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerRoutingRulesResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsRoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionGet.json // this example is just showing the usage of "RoutingRuleCollections_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_GetsRoutingRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAnRoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionDelete.json // this example is just showing the usage of "RoutingRuleCollections_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 @@ -80,7 +80,7 @@ public async Task Delete_DeletesAnRoutingRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateARoutingRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerRoutingRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerRoutingRuleCollectionPut.json // this example is just showing the usage of "RoutingRuleCollections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationCollection.cs index 36c51e431f48..07ce9532a973 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkManagerSecurityUserConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkManagerSecurityUserConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationPut.json // this example is just showing the usage of "SecurityUserConfigurations_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateNetworkManagerSecurityUserConfiguration() [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityUserConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationGet.json // this example is just showing the usage of "SecurityUserConfigurations_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 @@ -92,7 +92,7 @@ public async Task Get_GetSecurityUserConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSecurityUserConfigurationsInANetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationList.json // this example is just showing the usage of "SecurityUserConfigurations_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 @@ -128,7 +128,7 @@ public async Task GetAll_ListSecurityUserConfigurationsInANetworkManager() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSecurityUserConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationGet.json // this example is just showing the usage of "SecurityUserConfigurations_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 @@ -158,7 +158,7 @@ public async Task Exists_GetSecurityUserConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSecurityUserConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationGet.json // this example is just showing the usage of "SecurityUserConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationResource.cs index fa2c9cc26aa8..57badb7ff921 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkManagerSecurityUserConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityUserConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationGet.json // this example is just showing the usage of "SecurityUserConfigurations_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_GetSecurityUserConfigurations() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkManagerSecurityUserConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationDelete.json // this example is just showing the usage of "SecurityUserConfigurations_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_DeleteNetworkManagerSecurityUserConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_CreateNetworkManagerSecurityUserConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserConfigurationPut.json // this example is just showing the usage of "SecurityUserConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleCollection.cs index 40d2d82eb606..3969eb4e1b44 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerSecurityUserRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRulePut.json // this example is just showing the usage of "SecurityUserRules_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 @@ -75,7 +75,7 @@ public async Task CreateOrUpdate_CreateASecurityUserRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetsASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleGet.json // this example is just showing the usage of "SecurityUserRules_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 @@ -111,7 +111,7 @@ public async Task Get_GetsASecurityUserRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSecurityUserRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleList.json // this example is just showing the usage of "SecurityUserRules_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 @@ -149,7 +149,7 @@ public async Task GetAll_ListSecurityUserRules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleGet.json // this example is just showing the usage of "SecurityUserRules_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 +181,7 @@ public async Task Exists_GetsASecurityUserRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleGet.json // this example is just showing the usage of "SecurityUserRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleResource.cs index b862fd54ba54..e6d788efc8d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerSecurityUserRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleGet.json // this example is just showing the usage of "SecurityUserRules_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_GetsASecurityUserRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleDelete.json // this example is just showing the usage of "SecurityUserRules_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 @@ -83,7 +83,7 @@ public async Task Delete_DeleteASecurityUserRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateASecurityUserRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRulePut.json // this example is just showing the usage of "SecurityUserRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesCollection.cs index 1e052a839242..ca94206694d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerSecurityUserRulesCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateASecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json // this example is just showing the usage of "SecurityUserRuleCollections_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASecurityUserRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json // this example is just showing the usage of "SecurityUserRuleCollections_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 @@ -96,7 +96,7 @@ public async Task Get_GetsSecurityUserRuleCollection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRuleCollectionsInASecurityConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionList.json // this example is just showing the usage of "SecurityUserRuleCollections_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_ListRuleCollectionsInASecurityConfiguration() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsSecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json // this example is just showing the usage of "SecurityUserRuleCollections_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 +164,7 @@ public async Task Exists_GetsSecurityUserRuleCollection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsSecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json // this example is just showing the usage of "SecurityUserRuleCollections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesResource.cs index 2853b9e7e1b2..6c13bc8a9dec 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkManagerSecurityUserRulesResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkManagerSecurityUserRulesResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsSecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionGet.json // this example is just showing the usage of "SecurityUserRuleCollections_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_GetsSecurityUserRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesASecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionDelete.json // this example is just showing the usage of "SecurityUserRuleCollections_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 @@ -81,7 +81,7 @@ public async Task Delete_DeletesASecurityUserRuleCollection() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateASecurityUserRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityUserRuleCollectionPut.json // this example is just showing the usage of "SecurityUserRuleCollections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs index 466e2533070c..59f8a8ad0a15 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApproveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_UpdatePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_ApproveOrRejectPrivateEndPointConnectionForAPri [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetPrivateEndPointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPrivateLinkServiceInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_ListPrivateEndpointConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetAll_ListPrivateLinkServiceInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +164,7 @@ public async Task Exists_GetPrivateEndPointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs index b36e323426d5..424b9e7a09b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetPrivateEndPointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePrivateEndPointConnectionForAPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_DeletePrivateEndPointConnectionForAPrivateLinkService() [Ignore("Only validating compilation of examples")] public async Task Update_ApproveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_UpdatePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileCollection.cs index 3734fa77e9e5..141ece0618dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkProfileCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkProfileDefaults() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileCreateConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileCreateConfigOnly.json // this example is just showing the usage of "NetworkProfiles_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 @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_CreateNetworkProfileDefaults() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_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_GetNetworkProfile() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_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 @@ -137,7 +137,7 @@ public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListResourceGroupNetworkProfiles() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileList.json // this example is just showing the usage of "NetworkProfiles_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 @@ -172,7 +172,7 @@ public async Task GetAll_ListResourceGroupNetworkProfiles() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_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 @@ -201,7 +201,7 @@ public async Task Exists_GetNetworkProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_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 +230,7 @@ public async Task Exists_GetNetworkProfileWithContainerNetworkInterfaces() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_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 @@ -271,7 +271,7 @@ public async Task GetIfExists_GetNetworkProfile() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileResource.cs index cb6f30969eb6..cc44c8f24020 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkProfileResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkProfileResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_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_GetNetworkProfile() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_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 @@ -80,7 +80,7 @@ public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileDelete.json // this example is just showing the usage of "NetworkProfiles_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 @@ -106,7 +106,7 @@ public async Task Delete_DeleteNetworkProfile() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNetworkProfileTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileUpdateTags.json // this example is just showing the usage of "NetworkProfiles_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs index bdabaf8d3eb1..e7c56062bc6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkSecurityGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupCreate.json // this example is just showing the usage of "NetworkSecurityGroups_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkSecurityGroupWithRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupCreateWithRule.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupCreateWithRule.json // this example is just showing the usage of "NetworkSecurityGroups_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 @@ -109,7 +109,7 @@ public async Task CreateOrUpdate_CreateNetworkSecurityGroupWithRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_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 @@ -142,7 +142,7 @@ public async Task Get_GetNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkSecurityGroupsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupList.json // this example is just showing the usage of "NetworkSecurityGroups_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 @@ -177,7 +177,7 @@ public async Task GetAll_ListNetworkSecurityGroupsInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_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_GetNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupResource.cs index ab38bc7e1bf4..7d347b0bc555 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_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_GetNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupDelete.json // this example is just showing the usage of "NetworkSecurityGroups_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_DeleteNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNetworkSecurityGroupTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupUpdateTags.json // this example is just showing the usage of "NetworkSecurityGroups_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleCollection.cs index cc68c67640ca..c2a272446cfa 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterAccessRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NspAccessRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRulePut.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_NspAccessRulePut() [Ignore("Only validating compilation of examples")] public async Task Get_NspAccessRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRuleGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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 @@ -96,7 +96,7 @@ public async Task Get_NspAccessRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NspAccessRulesList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRuleList.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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_NspAccessRulesList() [Ignore("Only validating compilation of examples")] public async Task Exists_NspAccessRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRuleGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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 +164,7 @@ public async Task Exists_NspAccessRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NspAccessRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRuleGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleResource.cs index dca9af8069e9..7b6ef917865e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAccessRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterAccessRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_NspAccessRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRuleGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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_NspAccessRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NspAccessRulesDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRuleDelete.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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 @@ -80,7 +80,7 @@ public async Task Delete_NspAccessRulesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NspAccessRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAccessRulePut.json // this example is just showing the usage of "NetworkSecurityPerimeterAccessRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationCollection.cs index ec9e247c2b62..eae420aa55ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterAssociationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NspAssociationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationPut.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_NspAssociationPut() [Ignore("Only validating compilation of examples")] public async Task Get_NspAssociationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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_NspAssociationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NspAssociationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationList.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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 @@ -131,7 +131,7 @@ public async Task GetAll_NspAssociationList() [Ignore("Only validating compilation of examples")] public async Task Exists_NspAssociationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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 @@ -161,7 +161,7 @@ public async Task Exists_NspAssociationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NspAssociationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationResource.cs index 8dcfcf0b34e7..ec722364d40e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterAssociationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterAssociationResource [Ignore("Only validating compilation of examples")] public async Task Get_NspAssociationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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_NspAssociationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NspAssociationDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationDelete.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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_NspAssociationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NspAssociationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspAssociationPut.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs index 4dec4b3f6251..cebf498a2d05 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutNetworkSecurityPerimeter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterPut.json // this example is just showing the usage of "NetworkSecurityPerimeters_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_PutNetworkSecurityPerimeter() [Ignore("Only validating compilation of examples")] public async Task Get_NetworkSecurityPerimeterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterGet.json // this example is just showing the usage of "NetworkSecurityPerimeters_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 @@ -88,7 +88,7 @@ public async Task Get_NetworkSecurityPerimeterGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkSecurityPerimeter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterList.json // this example is just showing the usage of "NetworkSecurityPerimeters_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 @@ -123,7 +123,7 @@ public async Task GetAll_ListNetworkSecurityPerimeter() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkSecurityPerimeterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterGet.json // this example is just showing the usage of "NetworkSecurityPerimeters_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 @@ -152,7 +152,7 @@ public async Task Exists_NetworkSecurityPerimeterGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkSecurityPerimeterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterGet.json // this example is just showing the usage of "NetworkSecurityPerimeters_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkCollection.cs index 2b45126f68e7..2bea350649d8 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NspLinksPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkPut.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_NspLinksPut() [Ignore("Only validating compilation of examples")] public async Task Get_NspLinksGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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_NspLinksGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NspLinkList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkList.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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_NspLinkList() [Ignore("Only validating compilation of examples")] public async Task Exists_NspLinksGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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_NspLinksGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NspLinksGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceCollection.cs index 059267745667..d6b62f4d2f65 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterLinkReferenceCollection [Ignore("Only validating compilation of examples")] public async Task Get_NspLinkReferencesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkReferenceGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinkReferences_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_NspLinkReferencesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NspLinkReferenceList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkReferenceList.json // this example is just showing the usage of "NetworkSecurityPerimeterLinkReferences_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 @@ -89,7 +89,7 @@ public async Task GetAll_NspLinkReferenceList() [Ignore("Only validating compilation of examples")] public async Task Exists_NspLinkReferencesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkReferenceGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinkReferences_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 @@ -119,7 +119,7 @@ public async Task Exists_NspLinkReferencesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NspLinkReferencesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkReferenceGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinkReferences_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceResource.cs index 56e72ea60cee..78bdf44e5023 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkReferenceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterLinkReferenceResource [Ignore("Only validating compilation of examples")] public async Task Get_NspLinkReferencesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkReferenceGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinkReferences_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_NspLinkReferencesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NspLinkReferenceDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkReferenceDelete.json // this example is just showing the usage of "NetworkSecurityPerimeterLinkReferences_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 diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkResource.cs index 03975a1836d4..1906446575e6 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_NspLinksGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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_NspLinksGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NspLinkDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkDelete.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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 @@ -77,7 +77,7 @@ public async Task Delete_NspLinkDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NspLinksPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLinkPut.json // this example is just showing the usage of "NetworkSecurityPerimeterLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationCollection.cs index b49ff8adf6cb..182470096935 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterLoggingConfigurationCollecti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NspLoggingConfigurationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationPut.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_NspLoggingConfigurationPut() [Ignore("Only validating compilation of examples")] public async Task Get_NspLoggingConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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 @@ -92,7 +92,7 @@ public async Task Get_NspLoggingConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NspLoggingConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationList.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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 @@ -128,7 +128,7 @@ public async Task GetAll_NspLoggingConfigurationList() [Ignore("Only validating compilation of examples")] public async Task Exists_NspLoggingConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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 @@ -158,7 +158,7 @@ public async Task Exists_NspLoggingConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NspLoggingConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationResource.cs index cf3cd61a3782..5afd34c79418 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterLoggingConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterLoggingConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_NspLoggingConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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_NspLoggingConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NspLoggingConfigurationDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationDelete.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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 @@ -77,7 +77,7 @@ public async Task Delete_NspLoggingConfigurationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NspLoggingConfigurationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspLoggingConfigurationPut.json // this example is just showing the usage of "NetworkSecurityPerimeterLoggingConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileCollection.cs index f8f8c7645f62..34b561aeebe9 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterProfileCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NspProfilesPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfilePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfilePut.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_NspProfilesPut() [Ignore("Only validating compilation of examples")] public async Task Get_NspProfilesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfileGet.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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 @@ -89,7 +89,7 @@ public async Task Get_NspProfilesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NspProfilesList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfileList.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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 @@ -125,7 +125,7 @@ public async Task GetAll_NspProfilesList() [Ignore("Only validating compilation of examples")] public async Task Exists_NspProfilesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfileGet.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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 @@ -155,7 +155,7 @@ public async Task Exists_NspProfilesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NspProfilesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfileGet.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileResource.cs index 4ee5a104e9ee..f68036a65b9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterProfileResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterProfileResource [Ignore("Only validating compilation of examples")] public async Task Get_NspProfilesGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfileGet.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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_NspProfilesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NspProfilesDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfileDelete.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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 @@ -77,7 +77,7 @@ public async Task Delete_NspProfilesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NspProfilesPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfilePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspProfilePut.json // this example is just showing the usage of "NetworkSecurityPerimeterProfiles_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs index afe19708173a..098e8b4e6467 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkSecurityPerimeterResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkSecurityPerimeterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterGet.json // this example is just showing the usage of "NetworkSecurityPerimeters_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_NetworkSecurityPerimeterGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NetworkSecurityPerimeterDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterDelete.json // this example is just showing the usage of "NetworkSecurityPerimeters_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_NetworkSecurityPerimeterDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PatchNetworkSecurityPerimeter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterPatch.json // this example is just showing the usage of "NetworkSecurityPerimeters_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceCollection.cs index 78e5aa3000ac..1d5e9069d7fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkVerifierWorkspaceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VerifierWorkspaceCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspacePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspacePut.json // this example is just showing the usage of "VerifierWorkspaces_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_VerifierWorkspaceCreate() [Ignore("Only validating compilation of examples")] public async Task Get_VerifierWorkspaceGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspaceGet.json // this example is just showing the usage of "VerifierWorkspaces_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 @@ -96,7 +96,7 @@ public async Task Get_VerifierWorkspaceGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VerifierWorkspaceList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspaceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspaceList.json // this example is just showing the usage of "VerifierWorkspaces_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_VerifierWorkspaceList() [Ignore("Only validating compilation of examples")] public async Task Exists_VerifierWorkspaceGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspaceGet.json // this example is just showing the usage of "VerifierWorkspaces_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 @@ -162,7 +162,7 @@ public async Task Exists_VerifierWorkspaceGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VerifierWorkspaceGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspaceGet.json // this example is just showing the usage of "VerifierWorkspaces_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceResource.cs index e905e7a9702b..033a8ac8d43b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVerifierWorkspaceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkVerifierWorkspaceResource [Ignore("Only validating compilation of examples")] public async Task Get_VerifierWorkspaceGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspaceGet.json // this example is just showing the usage of "VerifierWorkspaces_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_VerifierWorkspaceGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VerifierWorkspaceDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspaceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspaceDelete.json // this example is just showing the usage of "VerifierWorkspaces_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_VerifierWorkspaceDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VerifierWorkspacePatch() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VerifierWorkspacePatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VerifierWorkspacePatch.json // this example is just showing the usage of "VerifierWorkspaces_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs index 36f395d401fe..7d56c37eb0b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs @@ -19,11 +19,395 @@ namespace Azure.ResourceManager.Network.Samples { public partial class Sample_NetworkVirtualApplianceCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateNVAInVNetWithPrivateNicPublicNic() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceVnetBasicPut.json + // this example is just showing the usage of "NetworkVirtualAppliances_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 = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkVirtualApplianceResource + NetworkVirtualApplianceCollection collection = resourceGroupResource.GetNetworkVirtualAppliances(); + + // invoke the operation + string networkVirtualApplianceName = "nva"; + NetworkVirtualApplianceData data = new NetworkVirtualApplianceData + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")] = new UserAssignedIdentity() +}, + }, + NvaSku = new VirtualApplianceSkuProperties + { + Vendor = "Cisco SDWAN", + BundledScaleUnit = "1", + MarketPlaceVersion = "latest", + }, + BootStrapConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig" }, + CloudInitConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" }, + VirtualApplianceAsn = 10000L, + NvaInterfaceConfigurations = {new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), +PropertiesType = {NvaNicType.PrivateNic}, +Name = "dataInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2"), +PropertiesType = {NvaNicType.PublicNic}, +Name = "managementInterface", +}}, + Location = new AzureLocation("West US"), + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkVirtualApplianceName, data); + NetworkVirtualApplianceResource 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 + NetworkVirtualApplianceData 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_CreateNVAInVNetWithPrivateNicPublicNicIncludingInternetIngress() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceVnetIngressPut.json + // this example is just showing the usage of "NetworkVirtualAppliances_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 = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkVirtualApplianceResource + NetworkVirtualApplianceCollection collection = resourceGroupResource.GetNetworkVirtualAppliances(); + + // invoke the operation + string networkVirtualApplianceName = "nva"; + NetworkVirtualApplianceData data = new NetworkVirtualApplianceData + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")] = new UserAssignedIdentity() +}, + }, + NvaSku = new VirtualApplianceSkuProperties + { + Vendor = "Cisco SDWAN", + BundledScaleUnit = "1", + MarketPlaceVersion = "latest", + }, + BootStrapConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig" }, + CloudInitConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" }, + VirtualApplianceAsn = 10000L, + InternetIngressPublicIPs = {new WritableSubResource +{ +Id = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/slbip"), +}}, + NvaInterfaceConfigurations = {new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), +PropertiesType = {NvaNicType.PrivateNic}, +Name = "dataInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2"), +PropertiesType = {NvaNicType.PublicNic}, +Name = "managementInterface", +}}, + Location = new AzureLocation("West US"), + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkVirtualApplianceName, data); + NetworkVirtualApplianceResource 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 + NetworkVirtualApplianceData 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_CreateNVAInVNetWithPrivateNicPublicNicIncludingNetworkProfile() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceVnetNetworkProfilePut.json + // this example is just showing the usage of "NetworkVirtualAppliances_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 = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkVirtualApplianceResource + NetworkVirtualApplianceCollection collection = resourceGroupResource.GetNetworkVirtualAppliances(); + + // invoke the operation + string networkVirtualApplianceName = "nva"; + NetworkVirtualApplianceData data = new NetworkVirtualApplianceData + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")] = new UserAssignedIdentity() +}, + }, + NvaSku = new VirtualApplianceSkuProperties + { + Vendor = "Cisco SDWAN", + BundledScaleUnit = "1", + MarketPlaceVersion = "latest", + }, + BootStrapConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig" }, + CloudInitConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" }, + VirtualApplianceAsn = 10000L, + NetworkInterfaceConfigurations = {new VirtualApplianceNetworkInterfaceConfiguration +{ +NicType = NicTypeInRequest.PublicNic, +VirtualApplianceNetworkInterfaceIPConfigurations = {new VirtualApplianceIPConfiguration +{ +Name = "myPrimaryPublicIpConfig", +IsPrimary = true, +}, new VirtualApplianceIPConfiguration +{ +Name = "myNonPrimaryPublicIpConfig", +IsPrimary = false, +}}, +}, new VirtualApplianceNetworkInterfaceConfiguration +{ +NicType = NicTypeInRequest.PrivateNic, +VirtualApplianceNetworkInterfaceIPConfigurations = {new VirtualApplianceIPConfiguration +{ +Name = "myPrimaryPrivateIpConfig", +IsPrimary = true, +}, new VirtualApplianceIPConfiguration +{ +Name = "myNonPrimaryPrivateIpConfig", +IsPrimary = false, +}}, +}}, + NvaInterfaceConfigurations = {new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), +PropertiesType = {NvaNicType.PrivateNic}, +Name = "dataInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2"), +PropertiesType = {NvaNicType.PublicNic}, +Name = "managementInterface", +}}, + Location = new AzureLocation("West US"), + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkVirtualApplianceName, data); + NetworkVirtualApplianceResource 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 + NetworkVirtualApplianceData 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_CreateNVAInVNetWithPrivateNicPublicNicAdditionalPrivateNic() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceVnetAdditionalPrivatePut.json + // this example is just showing the usage of "NetworkVirtualAppliances_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 = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkVirtualApplianceResource + NetworkVirtualApplianceCollection collection = resourceGroupResource.GetNetworkVirtualAppliances(); + + // invoke the operation + string networkVirtualApplianceName = "nva"; + NetworkVirtualApplianceData data = new NetworkVirtualApplianceData + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")] = new UserAssignedIdentity() +}, + }, + NvaSku = new VirtualApplianceSkuProperties + { + Vendor = "Cisco SDWAN", + BundledScaleUnit = "1", + MarketPlaceVersion = "latest", + }, + BootStrapConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig" }, + CloudInitConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" }, + VirtualApplianceAsn = 10000L, + NvaInterfaceConfigurations = {new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), +PropertiesType = {NvaNicType.PrivateNic}, +Name = "dataInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2"), +PropertiesType = {NvaNicType.PublicNic}, +Name = "managementInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3"), +PropertiesType = {NvaNicType.AdditionalPrivateNic}, +Name = "myAdditionalInterface", +}}, + Location = new AzureLocation("West US"), + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkVirtualApplianceName, data); + NetworkVirtualApplianceResource 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 + NetworkVirtualApplianceData 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_CreateNVAInVNetWithPrivateNicPublicNicAdditionalPublicNic() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceVnetAdditionalPublicPut.json + // this example is just showing the usage of "NetworkVirtualAppliances_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 = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkVirtualApplianceResource + NetworkVirtualApplianceCollection collection = resourceGroupResource.GetNetworkVirtualAppliances(); + + // invoke the operation + string networkVirtualApplianceName = "nva"; + NetworkVirtualApplianceData data = new NetworkVirtualApplianceData + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")] = new UserAssignedIdentity() +}, + }, + NvaSku = new VirtualApplianceSkuProperties + { + Vendor = "Cisco SDWAN", + BundledScaleUnit = "1", + MarketPlaceVersion = "latest", + }, + BootStrapConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig" }, + CloudInitConfigurationBlobs = { "https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig" }, + VirtualApplianceAsn = 10000L, + NvaInterfaceConfigurations = {new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), +PropertiesType = {NvaNicType.PrivateNic}, +Name = "dataInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet2"), +PropertiesType = {NvaNicType.PublicNic}, +Name = "managementInterface", +}, new NvaInterfaceConfigurationsProperties +{ +SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet3"), +PropertiesType = {NvaNicType.AdditionalPublicNic}, +Name = "myAdditionalPublicInterface", +}}, + Location = new AzureLocation("West US"), + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkVirtualApplianceName, data); + NetworkVirtualApplianceResource 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 + NetworkVirtualApplianceData 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_CreateNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualAppliancePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualAppliancePut.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -116,7 +500,7 @@ public async Task CreateOrUpdate_CreateNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSaaSNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSaaSPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSaaSPut.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -163,7 +547,7 @@ public async Task CreateOrUpdate_CreateSaaSNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -196,7 +580,7 @@ public async Task Get_GetNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllNetworkVirtualApplianceForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceListByResourceGroup.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -231,7 +615,7 @@ public async Task GetAll_ListAllNetworkVirtualApplianceForAGivenResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -260,7 +644,7 @@ public async Task Exists_GetNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs index 90c8e94cb953..fc7e75df70e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkVirtualApplianceConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NetworkVirtualApplianceConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionPut.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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 @@ -79,7 +79,7 @@ public async Task CreateOrUpdate_NetworkVirtualApplianceConnectionPut() [Ignore("Only validating compilation of examples")] public async Task Get_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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 @@ -113,7 +113,7 @@ public async Task Get_NetworkVirtualApplianceConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NetworkVirtualApplianceConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionList.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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 @@ -149,7 +149,7 @@ public async Task GetAll_NetworkVirtualApplianceConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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 @@ -179,7 +179,7 @@ public async Task Exists_NetworkVirtualApplianceConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs index 94c52d061477..d81347fcb1b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkVirtualApplianceConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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_NetworkVirtualApplianceConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NetworkVirtualApplianceConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionDelete.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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_NetworkVirtualApplianceConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NetworkVirtualApplianceConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceConnectionPut.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs index 069effefe444..e76b05d176bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkVirtualApplianceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_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_GetNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceDelete.json // this example is just showing the usage of "NetworkVirtualAppliances_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_DeleteNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceUpdateTags.json // this example is just showing the usage of "NetworkVirtualAppliances_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateNetworkVirtualAppliance() [Ignore("Only validating compilation of examples")] public async Task Restart_RestartAllNetworkVirtualApplianceVMsInVMScaleSet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceEmptyRestart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceEmptyRestart.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -141,7 +141,7 @@ public async Task Restart_RestartAllNetworkVirtualApplianceVMsInVMScaleSet() [Ignore("Only validating compilation of examples")] public async Task Restart_RestartSpecificNetworkVirtualApplianceVMsInVMScaleSet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSpecificRestart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSpecificRestart.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -168,7 +168,7 @@ public async Task Restart_RestartSpecificNetworkVirtualApplianceVMsInVMScaleSet( [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimagesSpecificNetworkVirtualApplianceVMsInVMScaleSet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSpecificReimage.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSpecificReimage.json // this example is just showing the usage of "NetworkVirtualAppliances_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +195,7 @@ public async Task Reimage_ReimagesSpecificNetworkVirtualApplianceVMsInVMScaleSet [Ignore("Only validating compilation of examples")] public async Task GetBootDiagnosticLogs_RetrieveBootDiagnosticLogsForAGivenNVAVMSSInstance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceBootDiagnostics.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceBootDiagnostics.json // this example is just showing the usage of "NetworkVirtualAppliances_GetBootDiagnosticLogs" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs index 149327d3830e..d44438801e0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkVirtualApplianceSkuCollection [Ignore("Only validating compilation of examples")] public async Task Get_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_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_NetworkVirtualApplianceSkuGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NetworkVirtualApplianceSkuListResult() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSkuList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSkuList.json // this example is just showing the usage of "VirtualApplianceSkus_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 @@ -86,7 +86,7 @@ public async Task GetAll_NetworkVirtualApplianceSkuListResult() [Ignore("Only validating compilation of examples")] public async Task Exists_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_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 @@ -114,7 +114,7 @@ public async Task Exists_NetworkVirtualApplianceSkuGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs index 459cd839099f..44277e82c3bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkVirtualApplianceSkuResource [Ignore("Only validating compilation of examples")] public async Task Get_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherCollection.cs index 57bc9969a618..a027bce3629d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkWatcherCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherCreate.json // this example is just showing the usage of "NetworkWatchers_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateNetworkWatcher() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_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 @@ -91,7 +91,7 @@ public async Task Get_GetNetworkWatcher() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkWatchers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherList.json // this example is just showing the usage of "NetworkWatchers_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 @@ -126,7 +126,7 @@ public async Task GetAll_ListNetworkWatchers() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_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 @@ -155,7 +155,7 @@ public async Task Exists_GetNetworkWatcher() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherResource.cs index e80fa274ac03..cf972027a21b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_NetworkWatcherResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkWatcherResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_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_GetNetworkWatcher() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherDelete.json // this example is just showing the usage of "NetworkWatchers_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteNetworkWatcher() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateNetworkWatcherTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherUpdateTags.json // this example is just showing the usage of "NetworkWatchers_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_UpdateNetworkWatcherTags() [Ignore("Only validating compilation of examples")] public async Task GetTopology_GetTopology() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherTopologyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherTopologyGet.json // this example is just showing the usage of "NetworkWatchers_GetTopology" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetTopology_GetTopology() [Ignore("Only validating compilation of examples")] public async Task VerifyIPFlow_IpFlowVerify() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherIpFlowVerify.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherIpFlowVerify.json // this example is just showing the usage of "NetworkWatchers_VerifyIPFlow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,7 +180,7 @@ public async Task VerifyIPFlow_IpFlowVerify() [Ignore("Only validating compilation of examples")] public async Task GetNextHop_GetNextHop() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherNextHopGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherNextHopGet.json // this example is just showing the usage of "NetworkWatchers_GetNextHop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetNextHop_GetNextHop() [Ignore("Only validating compilation of examples")] public async Task GetVmSecurityRules_GetSecurityGroupView() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherSecurityGroupViewGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherSecurityGroupViewGet.json // this example is just showing the usage of "NetworkWatchers_GetVmSecurityRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -239,7 +239,7 @@ public async Task GetVmSecurityRules_GetSecurityGroupView() [Ignore("Only validating compilation of examples")] public async Task GetTroubleshooting_GetTroubleshooting() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherTroubleshootGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherTroubleshootGet.json // this example is just showing the usage of "NetworkWatchers_GetTroubleshooting" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task GetTroubleshooting_GetTroubleshooting() [Ignore("Only validating compilation of examples")] public async Task GetTroubleshootingResult_GetTroubleshootResult() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherTroubleshootResultQuery.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherTroubleshootResultQuery.json // this example is just showing the usage of "NetworkWatchers_GetTroubleshootingResult" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -295,7 +295,7 @@ public async Task GetTroubleshootingResult_GetTroubleshootResult() [Ignore("Only validating compilation of examples")] public async Task SetFlowLogConfiguration_ConfigureFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogConfigure.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogConfigure.json // this example is just showing the usage of "NetworkWatchers_SetFlowLogConfiguration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -332,7 +332,7 @@ public async Task SetFlowLogConfiguration_ConfigureFlowLog() [Ignore("Only validating compilation of examples")] public async Task GetFlowLogStatus_GetFlowLogStatus() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherFlowLogStatusQuery.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherFlowLogStatusQuery.json // this example is just showing the usage of "NetworkWatchers_GetFlowLogStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -360,7 +360,7 @@ public async Task GetFlowLogStatus_GetFlowLogStatus() [Ignore("Only validating compilation of examples")] public async Task CheckConnectivity_CheckConnectivity() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherConnectivityCheck.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherConnectivityCheck.json // this example is just showing the usage of "NetworkWatchers_CheckConnectivity" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -395,7 +395,7 @@ public async Task CheckConnectivity_CheckConnectivity() [Ignore("Only validating compilation of examples")] public async Task GetAzureReachabilityReport_GetAzureReachabilityReport() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherAzureReachabilityReportGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherAzureReachabilityReportGet.json // this example is just showing the usage of "NetworkWatchers_GetAzureReachabilityReport" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -430,7 +430,7 @@ public async Task GetAzureReachabilityReport_GetAzureReachabilityReport() [Ignore("Only validating compilation of examples")] public async Task GetAvailableProviders_GetAvailableProvidersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherAvailableProvidersListGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherAvailableProvidersListGet.json // this example is just showing the usage of "NetworkWatchers_ListAvailableProviders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -464,7 +464,7 @@ public async Task GetAvailableProviders_GetAvailableProvidersList() [Ignore("Only validating compilation of examples")] public async Task GetNetworkConfigurationDiagnostic_NetworkConfigurationDiagnostic() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json // this example is just showing the usage of "NetworkWatchers_GetNetworkConfigurationDiagnostic" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleCollection.cs index faf3e59ec46c..928a1c1b2896 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_OutboundRuleCollection [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_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_LoadBalancerOutboundRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_LoadBalancerOutboundRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerOutboundRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerOutboundRuleList.json // this example is just showing the usage of "LoadBalancerOutboundRules_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 @@ -89,7 +89,7 @@ public async Task GetAll_LoadBalancerOutboundRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_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 @@ -119,7 +119,7 @@ public async Task Exists_LoadBalancerOutboundRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleResource.cs index 87443a51c500..62d74a9d4636 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_OutboundRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OutboundRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayCollection.cs index 8d40a925dd60..9fb42ddac098 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_P2SVpnGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_P2SVpnGatewayPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayPut.json // this example is just showing the usage of "P2sVpnGateways_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 @@ -100,7 +100,7 @@ public async Task CreateOrUpdate_P2SVpnGatewayPut() [Ignore("Only validating compilation of examples")] public async Task Get_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_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 @@ -133,7 +133,7 @@ public async Task Get_P2SVpnGatewayGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_P2SVpnGatewayListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayListByResourceGroup.json // this example is just showing the usage of "P2sVpnGateways_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 @@ -168,7 +168,7 @@ public async Task GetAll_P2SVpnGatewayListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_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 @@ -197,7 +197,7 @@ public async Task Exists_P2SVpnGatewayGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayResource.cs index e71c5dac0c6e..1c470ad91c64 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_P2SVpnGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_P2SVpnGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_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_P2SVpnGatewayGet() [Ignore("Only validating compilation of examples")] public async Task Delete_P2SVpnGatewayDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayDelete.json // this example is just showing the usage of "P2sVpnGateways_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_P2SVpnGatewayDelete() [Ignore("Only validating compilation of examples")] public async Task Update_P2SVpnGatewayUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayUpdateTags.json // this example is just showing the usage of "P2sVpnGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_P2SVpnGatewayUpdate() [Ignore("Only validating compilation of examples")] public async Task Reset_ResetP2SVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayReset.json // this example is just showing the usage of "P2SVpnGateways_Reset" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Reset_ResetP2SVpnGateway() [Ignore("Only validating compilation of examples")] public async Task GenerateVpnProfile_GenerateP2SVpnGatewayVPNProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGenerateVpnProfile.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGenerateVpnProfile.json // this example is just showing the usage of "P2sVpnGateways_GenerateVpnProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +177,7 @@ public async Task GenerateVpnProfile_GenerateP2SVpnGatewayVPNProfile() [Ignore("Only validating compilation of examples")] public async Task GetP2SVpnConnectionHealth_P2SVpnGatewayGetConnectionHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGetConnectionHealth.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGetConnectionHealth.json // this example is just showing the usage of "P2sVpnGateways_GetP2SVpnConnectionHealth" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,7 +208,7 @@ public async Task GetP2SVpnConnectionHealth_P2SVpnGatewayGetConnectionHealth() [Ignore("Only validating compilation of examples")] public async Task GetP2SVpnConnectionHealthDetailed_P2SVpnGatewayGetConnectionHealthDetailed() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json // this example is just showing the usage of "P2sVpnGateways_GetP2SVpnConnectionHealthDetailed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -240,7 +240,7 @@ public async Task GetP2SVpnConnectionHealthDetailed_P2SVpnGatewayGetConnectionHe [Ignore("Only validating compilation of examples")] public async Task DisconnectP2SVpnConnections_DisconnectVpnConnectionsFromP2sVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json // this example is just showing the usage of "P2sVpnGateways_DisconnectP2SVpnConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureCollection.cs index 550496f2e128..3d9743e98906 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PacketCaptureCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureCreate.json // this example is just showing the usage of "PacketCaptures_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_CreatePacketCapture() [Ignore("Only validating compilation of examples")] public async Task Get_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_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_GetPacketCapture() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPacketCaptures() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCapturesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCapturesList.json // this example is just showing the usage of "PacketCaptures_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_ListPacketCaptures() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_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_GetPacketCapture() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureResource.cs index d157541f7f7e..d245697b6c33 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PacketCaptureResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PacketCaptureResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_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_GetPacketCapture() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureDelete.json // this example is just showing the usage of "PacketCaptures_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_DeletePacketCapture() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureCreate.json // this example is just showing the usage of "PacketCaptures_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 @@ -127,7 +127,7 @@ public async Task Update_CreatePacketCapture() [Ignore("Only validating compilation of examples")] public async Task Stop_StopPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureStop.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureStop.json // this example is just showing the usage of "PacketCaptures_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 @@ -154,7 +154,7 @@ public async Task Stop_StopPacketCapture() [Ignore("Only validating compilation of examples")] public async Task GetStatus_QueryPacketCaptureStatus() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherPacketCaptureQueryStatus.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherPacketCaptureQueryStatus.json // this example is just showing the usage of "PacketCaptures_GetStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs index 7a543100cdd6..599dd1a15bc3 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_PeerExpressRouteCircuitConnectionCollection [Ignore("Only validating compilation of examples")] public async Task Get_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_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 @@ -54,7 +54,7 @@ public async Task Get_PeerExpressRouteCircuitConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPeerExpressRouteCircuitConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PeerExpressRouteCircuitConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PeerExpressRouteCircuitConnectionList.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_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_ListPeerExpressRouteCircuitConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_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 @@ -122,7 +122,7 @@ public async Task Exists_PeerExpressRouteCircuitConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs index 1047d4def37f..0c0a96649e88 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_PeerExpressRouteCircuitConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs index 22558e6807a8..129e15d2fb05 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs @@ -19,7 +19,7 @@ public partial class Sample_PolicySignaturesOverridesForIdpsResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicySignatureOverridesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicySignatureOverridesGet.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesOverrides_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 @@ -49,7 +49,7 @@ public async Task Get_GetSignatureOverrides() [Ignore("Only validating compilation of examples")] public async Task Update_PatchSignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicySignatureOverridesPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicySignatureOverridesPatch.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesOverrides_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_PatchSignatureOverrides() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutSignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicySignatureOverridesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicySignatureOverridesPut.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesOverrides_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs index 71dc9d28bd0b..b27747e2d751 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PrivateDnsZoneGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupCreate.json // this example is just showing the usage of "PrivateDnsZoneGroups_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 @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_CreatePrivateDnsZoneGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_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 @@ -96,7 +96,7 @@ public async Task Get_GetPrivateDnsZoneGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPrivateEndpointsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupList.json // this example is just showing the usage of "PrivateDnsZoneGroups_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_ListPrivateEndpointsInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_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 @@ -162,7 +162,7 @@ public async Task Exists_GetPrivateDnsZoneGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs index 9e4a23c76cc1..dc84618eedac 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PrivateDnsZoneGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_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_GetPrivateDnsZoneGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupDelete.json // this example is just showing the usage of "PrivateDnsZoneGroups_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_DeletePrivateDnsZoneGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDnsZoneGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDnsZoneGroupCreate.json // this example is just showing the usage of "PrivateDnsZoneGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointCollection.cs index 73791c4c7f34..22c220226bfc 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_PrivateEndpointCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointCreate.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -78,7 +78,7 @@ public async Task CreateOrUpdate_CreatePrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointCreateWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointCreateWithASG.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -130,7 +130,7 @@ public async Task CreateOrUpdate_CreatePrivateEndpointWithApplicationSecurityGro [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointCreateForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointCreateForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -186,7 +186,7 @@ public async Task CreateOrUpdate_CreatePrivateEndpointWithManualApprovalConnecti [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -219,7 +219,7 @@ public async Task Get_GetPrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -252,7 +252,7 @@ public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -285,7 +285,7 @@ public async Task Get_GetPrivateEndpointWithManualApprovalConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPrivateEndpointsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointList.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -320,7 +320,7 @@ public async Task GetAll_ListPrivateEndpointsInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -349,7 +349,7 @@ public async Task Exists_GetPrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -378,7 +378,7 @@ public async Task Exists_GetPrivateEndpointWithApplicationSecurityGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -407,7 +407,7 @@ public async Task Exists_GetPrivateEndpointWithManualApprovalConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -448,7 +448,7 @@ public async Task GetIfExists_GetPrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -489,7 +489,7 @@ public async Task GetIfExists_GetPrivateEndpointWithApplicationSecurityGroups() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointResource.cs index 951f7a629e31..dd17c295a346 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateEndpointResource.cs @@ -21,7 +21,7 @@ public partial class Sample_PrivateEndpointResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_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_GetPrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -81,7 +81,7 @@ public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -111,7 +111,7 @@ public async Task Get_GetPrivateEndpointWithManualApprovalConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointDelete.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -137,7 +137,7 @@ public async Task Delete_DeletePrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointCreate.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -190,7 +190,7 @@ public async Task Update_CreatePrivateEndpoint() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointCreateWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointCreateWithASG.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -239,7 +239,7 @@ public async Task Update_CreatePrivateEndpointWithApplicationSecurityGroups() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointCreateForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointCreateForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceCollection.cs index d18ecbcdec63..99c4042df0bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_PrivateLinkServiceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceCreate.json // this example is just showing the usage of "PrivateLinkServices_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 @@ -77,7 +77,7 @@ public async Task CreateOrUpdate_CreatePrivateLinkService() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_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 @@ -110,7 +110,7 @@ public async Task Get_GetPrivateLinkService() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPrivateLinkServiceInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceList.json // this example is just showing the usage of "PrivateLinkServices_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 @@ -145,7 +145,7 @@ public async Task GetAll_ListPrivateLinkServiceInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_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 @@ -174,7 +174,7 @@ public async Task Exists_GetPrivateLinkService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceResource.cs index 252e89394c7b..895dfd62e6bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PrivateLinkServiceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PrivateLinkServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_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_GetPrivateLinkService() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceDelete.json // this example is just showing the usage of "PrivateLinkServices_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_DeletePrivateLinkService() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceCreate.json // this example is just showing the usage of "PrivateLinkServices_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeCollection.cs index 4a3a33665d55..4d00bbdb9a83 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ProbeCollection [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_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_LoadBalancerProbeGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_LoadBalancerProbeList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerProbeList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerProbeList.json // this example is just showing the usage of "LoadBalancerProbes_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 @@ -89,7 +89,7 @@ public async Task GetAll_LoadBalancerProbeList() [Ignore("Only validating compilation of examples")] public async Task Exists_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_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 @@ -119,7 +119,7 @@ public async Task Exists_LoadBalancerProbeGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeResource.cs index b6bd06180410..4f026a8491c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ProbeResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ProbeResource [Ignore("Only validating compilation of examples")] public async Task Get_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressCollection.cs index 39b844ed5f6b..06a54cd47289 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_PublicIPAddressCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPAddressDNS() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressCreateDns.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressCreateDns.json // this example is just showing the usage of "PublicIPAddresses_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_CreatePublicIPAddressDNS() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPAddressDNSWithDomainNameLabelScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressDNSWithDomainNameLabelScop [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPAddressAllocationMethod() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressCreateCustomizedValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressCreateCustomizedValues.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -152,7 +152,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressAllocationMethod() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPAddressDefaults() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressCreateDefaults.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressCreateDefaults.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -190,7 +190,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressDefaults() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPAddressDefaultsWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressCreateDefaultsStandardV2Sku.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -228,7 +228,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressDefaultsWithStandardV2Sku( [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -261,7 +261,7 @@ public async Task Get_GetPublicIPAddress() [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPAddressWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGetStandardV2Sku.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -294,7 +294,7 @@ public async Task Get_GetPublicIPAddressWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListResourceGroupPublicIPAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressList.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -329,7 +329,7 @@ public async Task GetAll_ListResourceGroupPublicIPAddresses() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -358,7 +358,7 @@ public async Task Exists_GetPublicIPAddress() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPublicIPAddressWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGetStandardV2Sku.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -387,7 +387,7 @@ public async Task Exists_GetPublicIPAddressWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -428,7 +428,7 @@ public async Task GetIfExists_GetPublicIPAddress() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPublicIPAddressWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGetStandardV2Sku.json // this example is just showing the usage of "PublicIPAddresses_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressResource.cs index f939f1799f68..66dc61e084f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPAddressResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PublicIPAddressResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_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_GetPublicIPAddress() [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPAddressWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGetStandardV2Sku.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -80,7 +80,7 @@ public async Task Get_GetPublicIPAddressWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressDelete.json // this example is just showing the usage of "PublicIPAddresses_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 @@ -106,7 +106,7 @@ public async Task Delete_DeletePublicIPAddress() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatePublicIPAddressTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressUpdateTags.json // this example is just showing the usage of "PublicIPAddresses_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Update_UpdatePublicIPAddressTags() [Ignore("Only validating compilation of examples")] public async Task DdosProtectionStatus_GetDdosProtectionStatusOfAPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressGetDdosProtectionStatus.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressGetDdosProtectionStatus.json // this example is just showing the usage of "PublicIPAddresses_DdosProtectionStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixCollection.cs index 916d2fff1423..69176b96644c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_PublicIPPrefixCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPPrefixAllocationMethod() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixCreateCustomizedValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixCreateCustomizedValues.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -66,7 +66,7 @@ public async Task CreateOrUpdate_CreatePublicIPPrefixAllocationMethod() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPPrefixDefaults() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixCreateDefaults.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixCreateDefaults.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -109,7 +109,7 @@ public async Task CreateOrUpdate_CreatePublicIPPrefixDefaults() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePublicIPPrefixDefaultsWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixCreateDefaultsStandardV2Sku.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -152,7 +152,7 @@ public async Task CreateOrUpdate_CreatePublicIPPrefixDefaultsWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -185,7 +185,7 @@ public async Task Get_GetPublicIPPrefix() [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPPrefixWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGetStandardV2Sku.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -218,7 +218,7 @@ public async Task Get_GetPublicIPPrefixWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListResourceGroupPublicIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixList.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -253,7 +253,7 @@ public async Task GetAll_ListResourceGroupPublicIPPrefixes() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -282,7 +282,7 @@ public async Task Exists_GetPublicIPPrefix() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPublicIPPrefixWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGetStandardV2Sku.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -311,7 +311,7 @@ public async Task Exists_GetPublicIPPrefixWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -352,7 +352,7 @@ public async Task GetIfExists_GetPublicIPPrefix() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPublicIPPrefixWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGetStandardV2Sku.json // this example is just showing the usage of "PublicIPPrefixes_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixResource.cs index ae3536ca9082..472232330fb0 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_PublicIPPrefixResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PublicIPPrefixResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_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_GetPublicIPPrefix() [Ignore("Only validating compilation of examples")] public async Task Get_GetPublicIPPrefixWithStandardV2Sku() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixGetStandardV2Sku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixGetStandardV2Sku.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -80,7 +80,7 @@ public async Task Get_GetPublicIPPrefixWithStandardV2Sku() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixDelete.json // this example is just showing the usage of "PublicIPPrefixes_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 @@ -106,7 +106,7 @@ public async Task Delete_DeletePublicIPPrefix() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatePublicIPPrefixTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixUpdateTags.json // this example is just showing the usage of "PublicIPPrefixes_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentCollection.cs index f45468aed0a3..e7d151596354 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ReachabilityAnalysisIntentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReachabilityAnalysisIntentCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentPut.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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_ReachabilityAnalysisIntentCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ReachabilityAnalysisIntentGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentGet.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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_ReachabilityAnalysisIntentGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ReachabilityAnalysisIntentList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentList.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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_ReachabilityAnalysisIntentList() [Ignore("Only validating compilation of examples")] public async Task Exists_ReachabilityAnalysisIntentGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentGet.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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_ReachabilityAnalysisIntentGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReachabilityAnalysisIntentGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentGet.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentResource.cs index d30a4ea9650f..f76ef4afdceb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisIntentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ReachabilityAnalysisIntentResource [Ignore("Only validating compilation of examples")] public async Task Get_ReachabilityAnalysisIntentGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentGet.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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_ReachabilityAnalysisIntentGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ReachabilityAnalysisIntentDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentDelete.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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 @@ -80,7 +80,7 @@ public async Task Delete_ReachabilityAnalysisIntentDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ReachabilityAnalysisIntentCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisIntentPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisIntentPut.json // this example is just showing the usage of "ReachabilityAnalysisIntents_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 diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunCollection.cs index dd6b9df207b0..53d6dba2fbd4 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ReachabilityAnalysisRunCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReachabilityAnalysisRunCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunPut.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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_ReachabilityAnalysisRunCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ReachabilityAnalysisRunGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunGet.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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_ReachabilityAnalysisRunGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ReachabilityAnalysisRunList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunList.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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_ReachabilityAnalysisRunList() [Ignore("Only validating compilation of examples")] public async Task Exists_ReachabilityAnalysisRunGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunGet.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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_ReachabilityAnalysisRunGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReachabilityAnalysisRunGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunGet.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunResource.cs index 04dd1d0902d7..34e3b406ef9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ReachabilityAnalysisRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ReachabilityAnalysisRunResource [Ignore("Only validating compilation of examples")] public async Task Get_ReachabilityAnalysisRunGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunGet.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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_ReachabilityAnalysisRunGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ReachabilityAnalysisRunDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunDelete.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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 @@ -80,7 +80,7 @@ public async Task Delete_ReachabilityAnalysisRunDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ReachabilityAnalysisRunCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ReachabilityAnalysisRunPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ReachabilityAnalysisRunPut.json // this example is just showing the usage of "ReachabilityAnalysisRuns_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 diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 827ecbe100ae..591160422a40 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetAvailableResourceGroupDelegations_GetAvailableDelegationsInTheResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AvailableDelegationsResourceGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AvailableDelegationsResourceGroupGet.json // this example is just showing the usage of "AvailableResourceGroupDelegations_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 @@ -50,7 +50,7 @@ public async Task GetAvailableResourceGroupDelegations_GetAvailableDelegationsIn [Ignore("Only validating compilation of examples")] public async Task GetAvailableServiceAliasesByResourceGroup_GetAvailableServiceAliasesInTheResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AvailableServiceAliasesListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AvailableServiceAliasesListByResourceGroup.json // this example is just showing the usage of "AvailableServiceAliases_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 @@ -79,7 +79,7 @@ public async Task GetAvailableServiceAliasesByResourceGroup_GetAvailableServiceA [Ignore("Only validating compilation of examples")] public async Task GetAvailablePrivateEndpointTypesByResourceGroup_GetAvailablePrivateEndpointTypesInTheResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json // this example is just showing the usage of "AvailablePrivateEndpointTypes_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 @@ -108,7 +108,7 @@ public async Task GetAvailablePrivateEndpointTypesByResourceGroup_GetAvailablePr [Ignore("Only validating compilation of examples")] public async Task CheckPrivateLinkServiceVisibilityByResourceGroupPrivateLinkService_CheckPrivateLinkServiceVisibility() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json // this example is just showing the usage of "PrivateLinkServices_CheckPrivateLinkServiceVisibilityByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task CheckPrivateLinkServiceVisibilityByResourceGroupPrivateLinkSer [Ignore("Only validating compilation of examples")] public async Task GetAutoApprovedPrivateLinkServicesByResourceGroupPrivateLinkServices_GetListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json // this example is just showing the usage of "PrivateLinkServices_ListAutoApprovedPrivateLinkServicesByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteCollection.cs index 806052ff5d97..c04791866d57 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteCreate.json // this example is just showing the usage of "Routes_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateRoute() [Ignore("Only validating compilation of examples")] public async Task Get_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_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_GetRoute() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteList.json // this example is just showing the usage of "Routes_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_ListRoutes() [Ignore("Only validating compilation of examples")] public async Task Exists_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_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_GetRoute() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterCollection.cs index 09881cb6ec9f..b95128a04225 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_RouteFilterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RouteFilterCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterCreate.json // this example is just showing the usage of "RouteFilters_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 @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_RouteFilterCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_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 @@ -103,7 +103,7 @@ public async Task Get_RouteFilterGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RouteFilterListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterListByResourceGroup.json // this example is just showing the usage of "RouteFilters_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 @@ -138,7 +138,7 @@ public async Task GetAll_RouteFilterListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_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_RouteFilterGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterResource.cs index 20767b4741a9..de2b961b37a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteFilterResource [Ignore("Only validating compilation of examples")] public async Task Get_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_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_RouteFilterGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RouteFilterDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterDelete.json // this example is just showing the usage of "RouteFilters_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_RouteFilterDelete() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateRouteFilterTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterUpdateTags.json // this example is just showing the usage of "RouteFilters_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleCollection.cs index ad35ad80c929..7a88adddc9cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteFilterRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RouteFilterRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleCreate.json // this example is just showing the usage of "RouteFilterRules_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 @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_RouteFilterRuleCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_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_RouteFilterRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RouteFilterRuleListByRouteFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleListByRouteFilter.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleListByRouteFilter.json // this example is just showing the usage of "RouteFilterRules_ListByRouteFilter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetAll_RouteFilterRuleListByRouteFilter() [Ignore("Only validating compilation of examples")] public async Task Exists_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_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 @@ -161,7 +161,7 @@ public async Task Exists_RouteFilterRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleResource.cs index c3afbce67ea3..ab175c0ccfae 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteFilterRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteFilterRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_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_RouteFilterRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RouteFilterRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleDelete.json // this example is just showing the usage of "RouteFilterRules_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_RouteFilterRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RouteFilterRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterRuleCreate.json // this example is just showing the usage of "RouteFilterRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapCollection.cs index 8e0ba1f33760..4000198deaf1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteMapCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RouteMapPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapPut.json // this example is just showing the usage of "RouteMaps_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 @@ -82,7 +82,7 @@ public async Task CreateOrUpdate_RouteMapPut() [Ignore("Only validating compilation of examples")] public async Task Get_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_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 @@ -116,7 +116,7 @@ public async Task Get_RouteMapGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RouteMapList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapList.json // this example is just showing the usage of "RouteMaps_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 @@ -152,7 +152,7 @@ public async Task GetAll_RouteMapList() [Ignore("Only validating compilation of examples")] public async Task Exists_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_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 @@ -182,7 +182,7 @@ public async Task Exists_RouteMapGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapResource.cs index ef99cb824fa7..0b9e6b9488ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteMapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteMapResource [Ignore("Only validating compilation of examples")] public async Task Get_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_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_RouteMapGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RouteMapDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapDelete.json // this example is just showing the usage of "RouteMaps_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_RouteMapDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RouteMapPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteMapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteMapPut.json // this example is just showing the usage of "RouteMaps_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteResource.cs index b0e7e870bf21..cb12a688f96f 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteResource [Ignore("Only validating compilation of examples")] public async Task Get_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_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_GetRoute() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteDelete.json // this example is just showing the usage of "Routes_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_DeleteRoute() [Ignore("Only validating compilation of examples")] public async Task Update_CreateRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableRouteCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableRouteCreate.json // this example is just showing the usage of "Routes_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableCollection.cs index c25c40ae9b43..1ebeeb6a5236 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_RouteTableCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableCreate.json // this example is just showing the usage of "RouteTables_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateRouteTable() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateRouteTableWithRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableCreateWithRoute.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableCreateWithRoute.json // this example is just showing the usage of "RouteTables_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 @@ -104,7 +104,7 @@ public async Task CreateOrUpdate_CreateRouteTableWithRoute() [Ignore("Only validating compilation of examples")] public async Task Get_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_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 @@ -137,7 +137,7 @@ public async Task Get_GetRouteTable() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRouteTablesInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableList.json // this example is just showing the usage of "RouteTables_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 @@ -172,7 +172,7 @@ public async Task GetAll_ListRouteTablesInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_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 @@ -201,7 +201,7 @@ public async Task Exists_GetRouteTable() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableResource.cs index 0780294fdd32..0e36ad215d86 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RouteTableResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteTableResource [Ignore("Only validating compilation of examples")] public async Task Get_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_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_GetRouteTable() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableDelete.json // this example is just showing the usage of "RouteTables_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_DeleteRouteTable() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateRouteTableTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableUpdateTags.json // this example is just showing the usage of "RouteTables_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentCollection.cs index a9bdd10c36dd..4702b5ae0f19 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RoutingIntentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentPut.json // this example is just showing the usage of "RoutingIntent_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_RouteTablePut() [Ignore("Only validating compilation of examples")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_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_RouteTableGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RoutingIntentList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentList.json // this example is just showing the usage of "RoutingIntent_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_RoutingIntentList() [Ignore("Only validating compilation of examples")] public async Task Exists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_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_RouteTableGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentResource.cs index 4a59cdb294d4..329d8fbb6b40 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_RoutingIntentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RoutingIntentResource [Ignore("Only validating compilation of examples")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_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_RouteTableGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RouteTableDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentDelete.json // this example is just showing the usage of "RoutingIntent_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_RouteTableDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RoutingIntentPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RoutingIntentPut.json // this example is just showing the usage of "RoutingIntent_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionCollection.cs index d61007e8c155..eca1cf79d244 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionPut.json // this example is just showing the usage of "ScopeConnections_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateOrUpdateNetworkManagerScopeConnection() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_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_GetNetworkManagerScopeConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionList.json // this example is just showing the usage of "ScopeConnections_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_ListNetworkManagerScopeConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_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_GetNetworkManagerScopeConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionResource.cs index 1c54ad2f27fe..4a02ca7dbef1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ScopeConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_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_GetNetworkManagerScopeConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionDelete.json // this example is just showing the usage of "ScopeConnections_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteNetworkManagerScopeConnection() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerScopeConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerScopeConnectionPut.json // this example is just showing the usage of "ScopeConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs index 0da97965154c..8b7b9ee7c647 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityAdminConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateManualModeSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json // this example is just showing the usage of "SecurityAdminConfigurations_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateManualModeSecurityAdminConfiguration() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkManagerSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationPut.json // this example is just showing the usage of "SecurityAdminConfigurations_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 @@ -100,7 +100,7 @@ public async Task CreateOrUpdate_CreateNetworkManagerSecurityAdminConfiguration( [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_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 @@ -134,7 +134,7 @@ public async Task Get_GetSecurityAdminConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSecurityAdminConfigurationsInANetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationList.json // this example is just showing the usage of "SecurityAdminConfigurations_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 @@ -170,7 +170,7 @@ public async Task GetAll_ListSecurityAdminConfigurationsInANetworkManager() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_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 @@ -200,7 +200,7 @@ public async Task Exists_GetSecurityAdminConfigurations() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs index 8b669ab00a31..fc31b158083e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityAdminConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_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_GetSecurityAdminConfigurations() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkManagerSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json // this example is just showing the usage of "SecurityAdminConfigurations_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_DeleteNetworkManagerSecurityAdminConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_CreateManualModeSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json // this example is just showing the usage of "SecurityAdminConfigurations_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 @@ -116,7 +116,7 @@ public async Task Update_CreateManualModeSecurityAdminConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_CreateNetworkManagerSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerSecurityAdminConfigurationPut.json // this example is just showing the usage of "SecurityAdminConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs index a0ff94eef36e..ff118f6d5da2 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SecurityPartnerProviderCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderPut.json // this example is just showing the usage of "SecurityPartnerProviders_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateSecurityPartnerProvider() [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_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 @@ -98,7 +98,7 @@ public async Task Get_GetSecurityPartnerProvider() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllSecurityPartnerProvidersForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderListByResourceGroup.json // this example is just showing the usage of "SecurityPartnerProviders_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 @@ -133,7 +133,7 @@ public async Task GetAll_ListAllSecurityPartnerProvidersForAGivenResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_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 @@ -162,7 +162,7 @@ public async Task Exists_GetSecurityPartnerProvider() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderResource.cs index 7fbbaa0502ee..b01092d12160 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityPartnerProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityPartnerProviderResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_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_GetSecurityPartnerProvider() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderDelete.json // this example is just showing the usage of "SecurityPartnerProviders_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_DeleteSecurityPartnerProvider() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateSecurityPartnerProviderTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderUpdateTags.json // this example is just showing the usage of "SecurityPartnerProviders_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleCollection.cs index 0dbc51037dfb..f2dd078981e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSecurityRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleCreate.json // this example is just showing the usage of "SecurityRules_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 @@ -66,7 +66,7 @@ public async Task CreateOrUpdate_CreateSecurityRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_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 @@ -100,7 +100,7 @@ public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNetworkSecurityRulesInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleList.json // this example is just showing the usage of "SecurityRules_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 @@ -136,7 +136,7 @@ public async Task GetAll_ListNetworkSecurityRulesInNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_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 @@ -166,7 +166,7 @@ public async Task Exists_GetNetworkSecurityRuleInNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleResource.cs index 8a083442b806..967febda55bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SecurityRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_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_GetNetworkSecurityRuleInNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkSecurityRuleFromNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleDelete.json // this example is just showing the usage of "SecurityRules_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_DeleteNetworkSecurityRuleFromNetworkSecurityGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSecurityRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupRuleCreate.json // this example is just showing the usage of "SecurityRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs index f9c3a4ed91b9..3fb9dc864903 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceEndpointPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyCreate.json // this example is just showing the usage of "ServiceEndpointPolicies_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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateServiceEndpointPolicy() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServiceEndpointPolicyWithDefinition() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyCreateWithDefinition.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyCreateWithDefinition.json // this example is just showing the usage of "ServiceEndpointPolicies_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 @@ -103,7 +103,7 @@ public async Task CreateOrUpdate_CreateServiceEndpointPolicyWithDefinition() [Ignore("Only validating compilation of examples")] public async Task Get_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_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 @@ -136,7 +136,7 @@ public async Task Get_GetServiceEndPointPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListResourceGroupServiceEndpointPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyList.json // this example is just showing the usage of "ServiceEndpointPolicies_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 @@ -171,7 +171,7 @@ public async Task GetAll_ListResourceGroupServiceEndpointPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_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 @@ -200,7 +200,7 @@ public async Task Exists_GetServiceEndPointPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs index 530bc1876693..b584a649fa1e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceEndpointPolicyDefinitionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServiceEndpointPolicyDefinition() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionCreate.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateServiceEndpointPolicyDefinition() [Ignore("Only validating compilation of examples")] public async Task Get_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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_GetServiceEndpointDefinitionInServiceEndpointPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServiceEndpointDefinitionsInServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionList.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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 @@ -130,7 +130,7 @@ public async Task GetAll_ListServiceEndpointDefinitionsInServiceEndPointPolicy() [Ignore("Only validating compilation of examples")] public async Task Exists_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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_GetServiceEndpointDefinitionInServiceEndpointPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs index ea1737ce40e9..cafe957dd39a 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceEndpointPolicyDefinitionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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_GetServiceEndpointDefinitionInServiceEndpointPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionDelete.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteServiceEndpointPolicyDefinitionsFromServiceEndpoi [Ignore("Only validating compilation of examples")] public async Task Update_CreateServiceEndpointPolicyDefinition() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDefinitionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDefinitionCreate.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs index 69e71152d9dc..9492b97fcf44 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceEndpointPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_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_GetServiceEndPointPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyDelete.json // this example is just showing the usage of "ServiceEndpointPolicies_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_DeleteServiceEndpointPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateServiceEndpointPolicyTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyUpdateTags.json // this example is just showing the usage of "ServiceEndpointPolicies_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrCollection.cs index ab9d28ec0e80..7421f32b88bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticCidrCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_StaticCidrsCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Create.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Create.json // this example is just showing the usage of "StaticCidrs_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 @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_StaticCidrsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_StaticCidrsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Get.json // this example is just showing the usage of "StaticCidrs_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 @@ -91,7 +91,7 @@ public async Task Get_StaticCidrsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_StaticCidrsList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_List.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_List.json // this example is just showing the usage of "StaticCidrs_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 @@ -128,7 +128,7 @@ public async Task GetAll_StaticCidrsList() [Ignore("Only validating compilation of examples")] public async Task Exists_StaticCidrsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Get.json // this example is just showing the usage of "StaticCidrs_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_StaticCidrsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_StaticCidrsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Get.json // this example is just showing the usage of "StaticCidrs_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrResource.cs index e126f31f4144..25127a77e40b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_StaticCidrResource.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticCidrResource [Ignore("Only validating compilation of examples")] public async Task Get_StaticCidrsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Get.json // this example is just showing the usage of "StaticCidrs_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_StaticCidrsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_StaticCidrsDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Delete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Delete.json // this example is just showing the usage of "StaticCidrs_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_StaticCidrsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_StaticCidrsCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/StaticCidrs_Create.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/StaticCidrs_Create.json // this example is just showing the usage of "StaticCidrs_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 diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetCollection.cs index 14124d7a8536..2a3b95f1601f 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubnetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreate.json // this example is just showing the usage of "Subnets_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateSubnet() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateWithDelegation.json // this example is just showing the usage of "Subnets_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 @@ -98,7 +98,7 @@ public async Task CreateOrUpdate_CreateSubnetWithADelegation() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSubnetWithServiceEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateServiceEndpoint.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateServiceEndpoint.json // this example is just showing the usage of "Subnets_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 @@ -141,7 +141,7 @@ public async Task CreateOrUpdate_CreateSubnetWithServiceEndpoints() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSubnetWithServiceEndpointsWithNetworkIdentifier() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json // this example is just showing the usage of "Subnets_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 @@ -185,7 +185,7 @@ public async Task CreateOrUpdate_CreateSubnetWithServiceEndpointsWithNetworkIden [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateWithSharingScope.json // this example is just showing the usage of "Subnets_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 @@ -224,7 +224,7 @@ public async Task CreateOrUpdate_CreateSubnetWithSharingScope() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_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 @@ -258,7 +258,7 @@ public async Task Get_GetSubnet() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_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 @@ -292,7 +292,7 @@ public async Task Get_GetSubnetWithADelegation() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_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 @@ -326,7 +326,7 @@ public async Task Get_GetSubnetWithSharingScope() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSubnets() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetList.json // this example is just showing the usage of "Subnets_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 @@ -362,7 +362,7 @@ public async Task GetAll_ListSubnets() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_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 @@ -392,7 +392,7 @@ public async Task Exists_GetSubnet() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_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 @@ -422,7 +422,7 @@ public async Task Exists_GetSubnetWithADelegation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_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 @@ -452,7 +452,7 @@ public async Task Exists_GetSubnetWithSharingScope() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_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 @@ -494,7 +494,7 @@ public async Task GetIfExists_GetSubnet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_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 @@ -536,7 +536,7 @@ public async Task GetIfExists_GetSubnetWithADelegation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetResource.cs index fde6473d8384..d42ae1ece3c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubnetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SubnetResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_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_GetSubnet() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_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 @@ -82,7 +82,7 @@ public async Task Get_GetSubnetWithADelegation() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_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 @@ -113,7 +113,7 @@ public async Task Get_GetSubnetWithSharingScope() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetDelete.json // this example is just showing the usage of "Subnets_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 @@ -140,7 +140,7 @@ public async Task Delete_DeleteSubnet() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreate.json // this example is just showing the usage of "Subnets_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 @@ -176,7 +176,7 @@ public async Task Update_CreateSubnet() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateWithDelegation.json // this example is just showing the usage of "Subnets_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 @@ -212,7 +212,7 @@ public async Task Update_CreateSubnetWithADelegation() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSubnetWithServiceEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateServiceEndpoint.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateServiceEndpoint.json // this example is just showing the usage of "Subnets_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 @@ -252,7 +252,7 @@ public async Task Update_CreateSubnetWithServiceEndpoints() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSubnetWithServiceEndpointsWithNetworkIdentifier() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json // this example is just showing the usage of "Subnets_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 @@ -293,7 +293,7 @@ public async Task Update_CreateSubnetWithServiceEndpointsWithNetworkIdentifier() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetCreateWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetCreateWithSharingScope.json // this example is just showing the usage of "Subnets_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 @@ -329,7 +329,7 @@ public async Task Update_CreateSubnetWithSharingScope() [Ignore("Only validating compilation of examples")] public async Task PrepareNetworkPolicies_PrepareNetworkPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetPrepareNetworkPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetPrepareNetworkPolicies.json // this example is just showing the usage of "Subnets_PrepareNetworkPolicies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -360,7 +360,7 @@ public async Task PrepareNetworkPolicies_PrepareNetworkPolicies() [Ignore("Only validating compilation of examples")] public async Task UnprepareNetworkPolicies_UnprepareNetworkPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SubnetUnprepareNetworkPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SubnetUnprepareNetworkPolicies.json // this example is just showing the usage of "Subnets_UnprepareNetworkPolicies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -391,7 +391,7 @@ public async Task UnprepareNetworkPolicies_UnprepareNetworkPolicies() [Ignore("Only validating compilation of examples")] public async Task GetResourceNavigationLinks_GetResourceNavigationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetResourceNavigationLinks.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetResourceNavigationLinks.json // this example is just showing the usage of "ResourceNavigationLinks_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 @@ -421,7 +421,7 @@ public async Task GetResourceNavigationLinks_GetResourceNavigationLinks() [Ignore("Only validating compilation of examples")] public async Task GetServiceAssociationLinks_GetServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetServiceAssociationLinks.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetServiceAssociationLinks.json // this example is just showing the usage of "ServiceAssociationLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs index a562a456d783..b5726b4815d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionNetworkManagerConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionPut.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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 @@ -57,7 +57,7 @@ public async Task CreateOrUpdate_CreateOrUpdateSubscriptionNetworkManagerConnect [Ignore("Only validating compilation of examples")] public async Task Get_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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 @@ -89,7 +89,7 @@ public async Task Get_GetSubscriptionNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionList.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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 @@ -123,7 +123,7 @@ public async Task GetAll_ListSubscriptionNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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 @@ -151,7 +151,7 @@ public async Task Exists_GetSubscriptionNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs index 2df0b3cd20c6..66d4127924ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SubscriptionNetworkManagerConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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 @@ -48,7 +48,7 @@ public async Task Get_GetSubscriptionNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionDelete.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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 @@ -73,7 +73,7 @@ public async Task Delete_DeleteSubscriptionNetworkManagerConnection() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerConnectionSubscriptionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerConnectionSubscriptionPut.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 66b0fc4d0dae..ca2db7b19dde 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetApplicationGateways_ListsAllApplicationGatewaysInASubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayListAll.json // this example is just showing the usage of "ApplicationGateways_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetApplicationGateways_ListsAllApplicationGatewaysInASubscript [Ignore("Only validating compilation of examples")] public async Task GetAvailableServerVariablesApplicationGateways_GetAvailableServerVariables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableServerVariablesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableServerVariablesGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableServerVariables" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAvailableServerVariablesApplicationGateways_GetAvailableSer [Ignore("Only validating compilation of examples")] public async Task GetAvailableRequestHeadersApplicationGateways_GetAvailableRequestHeaders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableRequestHeaders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAvailableRequestHeadersApplicationGateways_GetAvailableRequ [Ignore("Only validating compilation of examples")] public async Task GetAvailableResponseHeadersApplicationGateways_GetAvailableResponseHeaders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableResponseHeaders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAvailableResponseHeadersApplicationGateways_GetAvailableRes [Ignore("Only validating compilation of examples")] public async Task GetAppGatewayAvailableWafRuleSets_GetAvailableWafRuleSets() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableWafRuleSets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAppGatewayAvailableWafRuleSets_GetAvailableWafRuleSets() [Ignore("Only validating compilation of examples")] public async Task GetApplicationGatewayAvailableSslOptions_GetAvailableSslOptions() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableSslOptionsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableSslOptionsGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableSslOptions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +184,7 @@ public async Task GetApplicationGatewayAvailableSslOptions_GetAvailableSslOption [Ignore("Only validating compilation of examples")] public async Task GetApplicationGatewayAvailableSslPredefinedPolicies_GetAvailableSslPredefinedPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableSslPredefinedPolicies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetApplicationGatewayAvailableSslPredefinedPolicies_GetAvailab [Ignore("Only validating compilation of examples")] public async Task GetApplicationGatewaySslPredefinedPolicy_GetAvailableSslPredefinedPolicyByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json // this example is just showing the usage of "ApplicationGateways_GetSslPredefinedPolicy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task GetApplicationGatewaySslPredefinedPolicy_GetAvailableSslPredef [Ignore("Only validating compilation of examples")] public async Task GetApplicationSecurityGroups_ListAllApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ApplicationSecurityGroupListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ApplicationSecurityGroupListAll.json // this example is just showing the usage of "ApplicationSecurityGroups_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task GetApplicationSecurityGroups_ListAllApplicationSecurityGroups( [Ignore("Only validating compilation of examples")] public async Task GetAvailableDelegations_GetAvailableDelegations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AvailableDelegationsSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AvailableDelegationsSubscriptionGet.json // this example is just showing the usage of "AvailableDelegations_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 @@ -295,7 +295,7 @@ public async Task GetAvailableDelegations_GetAvailableDelegations() [Ignore("Only validating compilation of examples")] public async Task GetAvailableServiceAliases_GetAvailableServiceAliases() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AvailableServiceAliasesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AvailableServiceAliasesList.json // this example is just showing the usage of "AvailableServiceAliases_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 @@ -323,7 +323,7 @@ public async Task GetAvailableServiceAliases_GetAvailableServiceAliases() [Ignore("Only validating compilation of examples")] public async Task GetAzureFirewalls_ListAllAzureFirewallsForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallListBySubscription.json // this example is just showing the usage of "AzureFirewalls_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -354,7 +354,7 @@ public async Task GetAzureFirewalls_ListAllAzureFirewallsForAGivenSubscription() [Ignore("Only validating compilation of examples")] public async Task GetAzureFirewallFqdnTags_ListAllAzureFirewallFQDNTagsForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AzureFirewallFqdnTagsListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AzureFirewallFqdnTagsListBySubscription.json // this example is just showing the usage of "AzureFirewallFqdnTags_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -381,7 +381,7 @@ public async Task GetAzureFirewallFqdnTags_ListAllAzureFirewallFQDNTagsForAGiven [Ignore("Only validating compilation of examples")] public async Task GetBastionHosts_ListAllBastionHostsForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/BastionHostListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/BastionHostListBySubscription.json // this example is just showing the usage of "BastionHosts_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 @@ -412,7 +412,7 @@ public async Task GetBastionHosts_ListAllBastionHostsForAGivenSubscription() [Ignore("Only validating compilation of examples")] public async Task CheckDnsNameAvailability_CheckDnsNameAvailability() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CheckDnsNameAvailability.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CheckDnsNameAvailability.json // this example is just showing the usage of "CheckDnsNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -438,7 +438,7 @@ public async Task CheckDnsNameAvailability_CheckDnsNameAvailability() [Ignore("Only validating compilation of examples")] public async Task GetCustomIPPrefixes_ListAllCustomIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CustomIpPrefixListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CustomIpPrefixListAll.json // this example is just showing the usage of "CustomIPPrefixes_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -469,7 +469,7 @@ public async Task GetCustomIPPrefixes_ListAllCustomIPPrefixes() [Ignore("Only validating compilation of examples")] public async Task GetDdosProtectionPlans_ListAllDDoSProtectionPlans() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DdosProtectionPlanListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DdosProtectionPlanListAll.json // this example is just showing the usage of "DdosProtectionPlans_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 @@ -500,7 +500,7 @@ public async Task GetDdosProtectionPlans_ListAllDDoSProtectionPlans() [Ignore("Only validating compilation of examples")] public async Task GetDscpConfigurations_ListAllNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/DscpConfigurationListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/DscpConfigurationListAll.json // this example is just showing the usage of "DscpConfiguration_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -531,7 +531,7 @@ public async Task GetDscpConfigurations_ListAllNetworkInterfaces() [Ignore("Only validating compilation of examples")] public async Task GetAvailableEndpointServices_EndpointServicesList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/EndpointServicesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/EndpointServicesList.json // this example is just showing the usage of "AvailableEndpointServices_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 @@ -559,7 +559,7 @@ public async Task GetAvailableEndpointServices_EndpointServicesList() [Ignore("Only validating compilation of examples")] public async Task GetExpressRouteCircuits_ListExpressRouteCircuitsInASubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCircuitListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCircuitListBySubscription.json // this example is just showing the usage of "ExpressRouteCircuits_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -590,7 +590,7 @@ public async Task GetExpressRouteCircuits_ListExpressRouteCircuitsInASubscriptio [Ignore("Only validating compilation of examples")] public async Task GetExpressRouteServiceProviders_ListExpressRouteProviders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteProviderList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteProviderList.json // this example is just showing the usage of "ExpressRouteServiceProviders_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 @@ -617,7 +617,7 @@ public async Task GetExpressRouteServiceProviders_ListExpressRouteProviders() [Ignore("Only validating compilation of examples")] public async Task GetExpressRouteCrossConnections_ExpressRouteCrossConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteCrossConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteCrossConnectionList.json // this example is just showing the usage of "ExpressRouteCrossConnections_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 @@ -648,7 +648,7 @@ public async Task GetExpressRouteCrossConnections_ExpressRouteCrossConnectionLis [Ignore("Only validating compilation of examples")] public async Task GetExpressRoutePorts_ExpressRoutePortList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRoutePortList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRoutePortList.json // this example is just showing the usage of "ExpressRoutePorts_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 @@ -679,7 +679,7 @@ public async Task GetExpressRoutePorts_ExpressRoutePortList() [Ignore("Only validating compilation of examples")] public async Task GetFirewallPolicies_ListAllFirewallPoliciesForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/FirewallPolicyListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/FirewallPolicyListBySubscription.json // this example is just showing the usage of "FirewallPolicies_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -710,7 +710,7 @@ public async Task GetFirewallPolicies_ListAllFirewallPoliciesForAGivenSubscripti [Ignore("Only validating compilation of examples")] public async Task GetIPAllocations_ListAllIpAllocations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpAllocationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpAllocationList.json // this example is just showing the usage of "IpAllocations_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 @@ -741,7 +741,7 @@ public async Task GetIPAllocations_ListAllIpAllocations() [Ignore("Only validating compilation of examples")] public async Task GetIPGroups_ListIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/IpGroupsListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/IpGroupsListBySubscription.json // this example is just showing the usage of "IpGroups_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 @@ -772,7 +772,7 @@ public async Task GetIPGroups_ListIpGroups() [Ignore("Only validating compilation of examples")] public async Task GetLoadBalancers_ListAllLoadBalancers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancerListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancerListAll.json // this example is just showing the usage of "LoadBalancers_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -803,7 +803,7 @@ public async Task GetLoadBalancers_ListAllLoadBalancers() [Ignore("Only validating compilation of examples")] public async Task SwapPublicIPAddressesLoadBalancer_SwapVIPsBetweenTwoLoadBalancers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/LoadBalancersSwapPublicIpAddresses.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/LoadBalancersSwapPublicIpAddresses.json // this example is just showing the usage of "LoadBalancers_SwapPublicIPAddresses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -840,7 +840,7 @@ public async Task SwapPublicIPAddressesLoadBalancer_SwapVIPsBetweenTwoLoadBalanc [Ignore("Only validating compilation of examples")] public async Task GetNatGateways_ListAllNatGateways() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatGatewayListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatGatewayListAll.json // this example is just showing the usage of "NatGateways_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -871,7 +871,7 @@ public async Task GetNatGateways_ListAllNatGateways() [Ignore("Only validating compilation of examples")] public async Task GetNetworkInterfaces_ListAllNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkInterfaceListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkInterfaceListAll.json // this example is just showing the usage of "NetworkInterfaces_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -902,7 +902,7 @@ public async Task GetNetworkInterfaces_ListAllNetworkInterfaces() [Ignore("Only validating compilation of examples")] public async Task GetNetworkManagers_NetworkManagersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerListAll.json // this example is just showing the usage of "NetworkManagers_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 @@ -933,7 +933,7 @@ public async Task GetNetworkManagers_NetworkManagersList() [Ignore("Only validating compilation of examples")] public async Task GetNetworkProfiles_ListAllNetworkProfiles() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkProfileListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkProfileListAll.json // this example is just showing the usage of "NetworkProfiles_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -964,7 +964,7 @@ public async Task GetNetworkProfiles_ListAllNetworkProfiles() [Ignore("Only validating compilation of examples")] public async Task GetNetworkSecurityGroups_ListAllNetworkSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityGroupListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityGroupListAll.json // this example is just showing the usage of "NetworkSecurityGroups_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -995,7 +995,7 @@ public async Task GetNetworkSecurityGroups_ListAllNetworkSecurityGroups() [Ignore("Only validating compilation of examples")] public async Task GetNetworkSecurityPerimeters_NetworkSecurityPerimetersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkSecurityPerimeterListAll.json // this example is just showing the usage of "NetworkSecurityPerimeters_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 @@ -1026,7 +1026,7 @@ public async Task GetNetworkSecurityPerimeters_NetworkSecurityPerimetersList() [Ignore("Only validating compilation of examples")] public async Task GetNetworkSecurityPerimeterAssociableResourceTypes_NetworkSecurityPerimeterAssociableResourceTypes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PerimeterAssociableResourcesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PerimeterAssociableResourcesList.json // this example is just showing the usage of "NetworkSecurityPerimeterAssociableResourceTypes_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 @@ -1050,11 +1050,39 @@ public async Task GetNetworkSecurityPerimeterAssociableResourceTypes_NetworkSecu Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetNetworkSecurityPerimeterServiceTags_NSPServiceTagsList() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NspServiceTagsList.json + // this example is just showing the usage of "NetworkSecurityPerimeterServiceTags_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(); + // 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 = "subId"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + AzureLocation location = new AzureLocation("westus"); + await foreach (NetworkSecurityPerimeterServiceTags item in subscriptionResource.GetNetworkSecurityPerimeterServiceTagsAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetNetworkVirtualAppliances_ListAllNetworkVirtualAppliancesForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceListBySubscription.json // this example is just showing the usage of "NetworkVirtualAppliances_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 @@ -1085,7 +1113,7 @@ public async Task GetNetworkVirtualAppliances_ListAllNetworkVirtualAppliancesFor [Ignore("Only validating compilation of examples")] public async Task GetNetworkWatchers_ListAllNetworkWatchers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkWatcherListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkWatcherListAll.json // this example is just showing the usage of "NetworkWatchers_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1116,7 +1144,7 @@ public async Task GetNetworkWatchers_ListAllNetworkWatchers() [Ignore("Only validating compilation of examples")] public async Task GetPrivateEndpoints_ListAllPrivateEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateEndpointListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateEndpointListAll.json // this example is just showing the usage of "PrivateEndpoints_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 @@ -1147,7 +1175,7 @@ public async Task GetPrivateEndpoints_ListAllPrivateEndpoints() [Ignore("Only validating compilation of examples")] public async Task GetAvailablePrivateEndpointTypes_GetAvailablePrivateEndpointTypes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AvailablePrivateEndpointTypesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AvailablePrivateEndpointTypesGet.json // this example is just showing the usage of "AvailablePrivateEndpointTypes_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 @@ -1175,7 +1203,7 @@ public async Task GetAvailablePrivateEndpointTypes_GetAvailablePrivateEndpointTy [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinkServices_ListAllPrivateListService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PrivateLinkServiceListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PrivateLinkServiceListAll.json // this example is just showing the usage of "PrivateLinkServices_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 @@ -1206,7 +1234,7 @@ public async Task GetPrivateLinkServices_ListAllPrivateListService() [Ignore("Only validating compilation of examples")] public async Task CheckPrivateLinkServiceVisibilityPrivateLinkService_CheckPrivateLinkServiceVisibility() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/CheckPrivateLinkServiceVisibility.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/CheckPrivateLinkServiceVisibility.json // this example is just showing the usage of "PrivateLinkServices_CheckPrivateLinkServiceVisibility" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1236,7 +1264,7 @@ public async Task CheckPrivateLinkServiceVisibilityPrivateLinkService_CheckPriva [Ignore("Only validating compilation of examples")] public async Task GetAutoApprovedPrivateLinkServicesPrivateLinkServices_GetListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/AutoApprovedPrivateLinkServicesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/AutoApprovedPrivateLinkServicesGet.json // this example is just showing the usage of "PrivateLinkServices_ListAutoApprovedPrivateLinkServices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1264,7 +1292,7 @@ public async Task GetAutoApprovedPrivateLinkServicesPrivateLinkServices_GetListO [Ignore("Only validating compilation of examples")] public async Task GetPublicIPAddresses_ListAllPublicIPAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpAddressListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpAddressListAll.json // this example is just showing the usage of "PublicIPAddresses_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1295,7 +1323,7 @@ public async Task GetPublicIPAddresses_ListAllPublicIPAddresses() [Ignore("Only validating compilation of examples")] public async Task GetPublicIPPrefixes_ListAllPublicIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PublicIpPrefixListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/PublicIpPrefixListAll.json // this example is just showing the usage of "PublicIPPrefixes_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1326,7 +1354,7 @@ public async Task GetPublicIPPrefixes_ListAllPublicIPPrefixes() [Ignore("Only validating compilation of examples")] public async Task GetRouteFilters_RouteFilterList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteFilterList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteFilterList.json // this example is just showing the usage of "RouteFilters_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 @@ -1357,7 +1385,7 @@ public async Task GetRouteFilters_RouteFilterList() [Ignore("Only validating compilation of examples")] public async Task GetRouteTables_ListAllRouteTables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/RouteTableListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/RouteTableListAll.json // this example is just showing the usage of "RouteTables_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1388,7 +1416,7 @@ public async Task GetRouteTables_ListAllRouteTables() [Ignore("Only validating compilation of examples")] public async Task GetSecurityPartnerProviders_ListAllSecurityPartnerProvidersForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/SecurityPartnerProviderListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/SecurityPartnerProviderListBySubscription.json // this example is just showing the usage of "SecurityPartnerProviders_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 @@ -1419,7 +1447,7 @@ public async Task GetSecurityPartnerProviders_ListAllSecurityPartnerProvidersFor [Ignore("Only validating compilation of examples")] public async Task GetBgpServiceCommunities_ServiceCommunityList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceCommunityList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceCommunityList.json // this example is just showing the usage of "BgpServiceCommunities_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 @@ -1446,7 +1474,7 @@ public async Task GetBgpServiceCommunities_ServiceCommunityList() [Ignore("Only validating compilation of examples")] public async Task GetServiceEndpointPoliciesByServiceEndpointPolicy_ListAllServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceEndpointPolicyListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceEndpointPolicyListAll.json // this example is just showing the usage of "ServiceEndpointPolicies_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 @@ -1477,7 +1505,7 @@ public async Task GetServiceEndpointPoliciesByServiceEndpointPolicy_ListAllServi [Ignore("Only validating compilation of examples")] public async Task GetServiceTag_GetListOfServiceTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceTagsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceTagsList.json // this example is just showing the usage of "ServiceTags_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 @@ -1502,7 +1530,7 @@ public async Task GetServiceTag_GetListOfServiceTags() [Ignore("Only validating compilation of examples")] public async Task GetAllServiceTagInformation_GetListOfServiceTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceTagInformationListResult.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceTagInformationListResult.json // this example is just showing the usage of "ServiceTagInformation_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 @@ -1530,7 +1558,7 @@ public async Task GetAllServiceTagInformation_GetListOfServiceTags() [Ignore("Only validating compilation of examples")] public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithNoAddressPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json // this example is just showing the usage of "ServiceTagInformation_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 @@ -1559,7 +1587,7 @@ public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithNoAddressP [Ignore("Only validating compilation of examples")] public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithTagName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ServiceTagInformationListResultWithTagname.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ServiceTagInformationListResultWithTagname.json // this example is just showing the usage of "ServiceTagInformation_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 @@ -1588,7 +1616,7 @@ public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithTagName() [Ignore("Only validating compilation of examples")] public async Task GetUsages_ListUsages() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/UsageList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/UsageList.json // this example is just showing the usage of "Usages_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 @@ -1616,7 +1644,7 @@ public async Task GetUsages_ListUsages() [Ignore("Only validating compilation of examples")] public async Task GetUsages_ListUsagesSpacedLocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/UsageListSpacedLocation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/UsageListSpacedLocation.json // this example is just showing the usage of "Usages_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 @@ -1644,7 +1672,7 @@ public async Task GetUsages_ListUsagesSpacedLocation() [Ignore("Only validating compilation of examples")] public async Task GetVirtualNetworks_ListAllVirtualNetworks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkListAll.json // this example is just showing the usage of "VirtualNetworks_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1675,7 +1703,7 @@ public async Task GetVirtualNetworks_ListAllVirtualNetworks() [Ignore("Only validating compilation of examples")] public async Task GetVirtualNetworkTaps_ListAllVirtualNetworkTaps() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapListAll.json // this example is just showing the usage of "VirtualNetworkTaps_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1706,7 +1734,7 @@ public async Task GetVirtualNetworkTaps_ListAllVirtualNetworkTaps() [Ignore("Only validating compilation of examples")] public async Task GetVirtualRouters_ListAllVirtualRoutersForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterListBySubscription.json // this example is just showing the usage of "VirtualRouters_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 @@ -1737,7 +1765,7 @@ public async Task GetVirtualRouters_ListAllVirtualRoutersForAGivenSubscription() [Ignore("Only validating compilation of examples")] public async Task GetVirtualWans_VirtualWANList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANList.json // this example is just showing the usage of "VirtualWans_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 @@ -1768,7 +1796,7 @@ public async Task GetVirtualWans_VirtualWANList() [Ignore("Only validating compilation of examples")] public async Task GetVpnSites_VpnSiteList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteList.json // this example is just showing the usage of "VpnSites_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 @@ -1799,7 +1827,7 @@ public async Task GetVpnSites_VpnSiteList() [Ignore("Only validating compilation of examples")] public async Task GetVpnServerConfigurations_VpnServerConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationList.json // this example is just showing the usage of "VpnServerConfigurations_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 @@ -1830,7 +1858,7 @@ public async Task GetVpnServerConfigurations_VpnServerConfigurationList() [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubs_VirtualHubList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubList.json // this example is just showing the usage of "VirtualHubs_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 @@ -1861,7 +1889,7 @@ public async Task GetVirtualHubs_VirtualHubList() [Ignore("Only validating compilation of examples")] public async Task GetVpnGateways_VpnGatewayListBySubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayList.json // this example is just showing the usage of "VpnGateways_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 @@ -1892,7 +1920,7 @@ public async Task GetVpnGateways_VpnGatewayListBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetP2SVpnGateways_P2SVpnGatewayListBySubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/P2SVpnGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/P2SVpnGatewayList.json // this example is just showing the usage of "P2sVpnGateways_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 @@ -1923,7 +1951,7 @@ public async Task GetP2SVpnGateways_P2SVpnGatewayListBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetExpressRouteGateways_ExpressRouteGatewayListBySubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ExpressRouteGatewayListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ExpressRouteGatewayListBySubscription.json // this example is just showing the usage of "ExpressRouteGateways_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 @@ -1954,7 +1982,7 @@ public async Task GetExpressRouteGateways_ExpressRouteGatewayListBySubscription( [Ignore("Only validating compilation of examples")] public async Task GetWebApplicationFirewallPolicies_ListsAllWAFPoliciesInASubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafListAllPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafListAllPolicies.json // this example is just showing the usage of "WebApplicationFirewallPolicies_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs index 1548bb968e8c..8bfd2f0ea9b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualApplianceSiteCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSitePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSitePut.json // this example is just showing the usage of "VirtualApplianceSites_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateNetworkVirtualApplianceSite() [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_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_GetNetworkVirtualApplianceSite() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSiteList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSiteList.json // this example is just showing the usage of "VirtualApplianceSites_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_ListAllNetworkVirtualApplianceSitesForAGivenNetworkVirt [Ignore("Only validating compilation of examples")] public async Task Exists_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_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_GetNetworkVirtualApplianceSite() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteResource.cs index d7204a527363..b48a737e6361 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualApplianceSiteResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualApplianceSiteResource [Ignore("Only validating compilation of examples")] public async Task Get_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_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_GetNetworkVirtualApplianceSite() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSiteDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSiteDelete.json // this example is just showing the usage of "VirtualApplianceSites_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_DeleteNetworkVirtualApplianceSite() [Ignore("Only validating compilation of examples")] public async Task Update_CreateNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkVirtualApplianceSitePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkVirtualApplianceSitePut.json // this example is just showing the usage of "VirtualApplianceSites_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubCollection.cs index 80ae86dfbb30..543e4bb30169 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VirtualHubPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubPut.json // this example is just showing the usage of "VirtualHubs_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_VirtualHubPut() [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_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 @@ -98,7 +98,7 @@ public async Task Get_VirtualHubGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VirtualHubListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubListByResourceGroup.json // this example is just showing the usage of "VirtualHubs_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 @@ -133,7 +133,7 @@ public async Task GetAll_VirtualHubListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_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 @@ -162,7 +162,7 @@ public async Task Exists_VirtualHubGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubResource.cs index cd4c38121d72..dbfefa8d2b46 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubResource [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_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_VirtualHubGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VirtualHubDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubDelete.json // this example is just showing the usage of "VirtualHubs_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_VirtualHubDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VirtualHubUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubUpdateTags.json // this example is just showing the usage of "VirtualHubs_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_VirtualHubUpdate() [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForAConnectionResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/EffectiveRoutesListForConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/EffectiveRoutesListForConnection.json // this example is just showing the usage of "VirtualHubs_GetEffectiveVirtualHubRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetVirtualHubEffectiveRoutes_EffectiveRoutesForAConnectionReso [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForARouteTableResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/EffectiveRoutesListForRouteTable.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/EffectiveRoutesListForRouteTable.json // this example is just showing the usage of "VirtualHubs_GetEffectiveVirtualHubRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForARouteTableReso [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForTheVirtualHub() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/EffectiveRoutesListForVirtualHub.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/EffectiveRoutesListForVirtualHub.json // this example is just showing the usage of "VirtualHubs_GetEffectiveVirtualHubRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetVirtualHubEffectiveRoutes_EffectiveRoutesForTheVirtualHub() [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubInboundRoutes_InboundRoutesForTheVirtualHubOnAParticularConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetInboundRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetInboundRoutes.json // this example is just showing the usage of "VirtualHubs_GetInboundRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task GetVirtualHubInboundRoutes_InboundRoutesForTheVirtualHubOnAPar [Ignore("Only validating compilation of examples")] public async Task GetVirtualHubOutboundRoutes_OutboundRoutesForTheVirtualHubOnAParticularConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetOutboundRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetOutboundRoutes.json // this example is just showing the usage of "VirtualHubs_GetOutboundRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs index 1d6297c23f0f..2ad545d58c10 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubRouteTableV2Collection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Put.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Put.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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 @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task GetAll_VirtualHubRouteTableV2List() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2List.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2List.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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_VirtualHubRouteTableV2List() [Ignore("Only validating compilation of examples")] public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs index 0ef1185c9e6c..a15fbf2c0a0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubRouteTableV2Resource [Ignore("Only validating compilation of examples")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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_VirtualHubVirtualHubRouteTableV2Get() [Ignore("Only validating compilation of examples")] public async Task Delete_VirtualHubRouteTableV2Delete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Delete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Delete.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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_VirtualHubRouteTableV2Delete() [Ignore("Only validating compilation of examples")] public async Task Update_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualHubRouteTableV2Put.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualHubRouteTableV2Put.json // this example is just showing the usage of "VirtualHubRouteTableV2s_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkCollection.cs index 0495b4b678bc..afd696f7a24a 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreate.json // this example is just showing the usage of "VirtualNetworks_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 @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_CreateVirtualNetwork() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithBgpCommunities() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateWithBgpCommunities.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateWithBgpCommunities.json // this example is just showing the usage of "VirtualNetworks_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 @@ -112,7 +112,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithBgpCommunities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithDelegatedSubnets() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateSubnetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateSubnetWithDelegation.json // this example is just showing the usage of "VirtualNetworks_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 @@ -164,7 +164,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithDelegatedSubnets() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateWithEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateWithEncryption.json // this example is just showing the usage of "VirtualNetworks_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 @@ -215,7 +215,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithEncryption() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithIpamPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateWithIpamPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateWithIpamPool.json // this example is just showing the usage of "VirtualNetworks_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 @@ -270,7 +270,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithIpamPool() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateServiceEndpoints.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateServiceEndpoints.json // this example is just showing the usage of "VirtualNetworks_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 @@ -321,7 +321,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpoints() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json // this example is just showing the usage of "VirtualNetworks_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 @@ -376,7 +376,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpointsAndServ [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateSubnet.json // this example is just showing the usage of "VirtualNetworks_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 @@ -423,7 +423,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnet() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnetContainingAddressPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json // this example is just showing the usage of "VirtualNetworks_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 @@ -470,7 +470,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnetContainingAddress [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_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 @@ -503,7 +503,7 @@ public async Task Get_GetVirtualNetwork() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_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 @@ -536,7 +536,7 @@ public async Task Get_GetVirtualNetworkWithADelegatedSubnet() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_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 @@ -569,7 +569,7 @@ public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworksInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkList.json // this example is just showing the usage of "VirtualNetworks_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 @@ -604,7 +604,7 @@ public async Task GetAll_ListVirtualNetworksInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_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 @@ -633,7 +633,7 @@ public async Task Exists_GetVirtualNetwork() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_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 @@ -662,7 +662,7 @@ public async Task Exists_GetVirtualNetworkWithADelegatedSubnet() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_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 @@ -691,7 +691,7 @@ public async Task Exists_GetVirtualNetworkWithServiceAssociationLinks() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_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 @@ -732,7 +732,7 @@ public async Task GetIfExists_GetVirtualNetwork() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_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 @@ -773,7 +773,7 @@ public async Task GetIfExists_GetVirtualNetworkWithADelegatedSubnet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs index 9887dfbe047c..9d54b6b0b1e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayUpdate.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -133,7 +133,7 @@ public async Task CreateOrUpdate_UpdateVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkScalableGatewayUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkScalableGatewayUpdate.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -224,7 +224,7 @@ public async Task CreateOrUpdate_UpdateVirtualNetworkScalableGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -257,7 +257,7 @@ public async Task Get_GetVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -290,7 +290,7 @@ public async Task Get_GetVirtualNetworkScalableGateway() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworkGatewaysinResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayList.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -325,7 +325,7 @@ public async Task GetAll_ListVirtualNetworkGatewaysinResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -354,7 +354,7 @@ public async Task Exists_GetVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -383,7 +383,7 @@ public async Task Exists_GetVirtualNetworkScalableGateway() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -424,7 +424,7 @@ public async Task GetIfExists_GetVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs index b32322f985b6..74460dfa0ac0 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_VirtualNetworkGatewayConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkGatewayConnectionS2S() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionCreate.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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 @@ -126,7 +126,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkGatewayConnectionS2S() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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 Get_GetVirtualNetworkGatewayConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworkGatewayConnectionsinResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionsList.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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 @@ -194,7 +194,7 @@ public async Task GetAll_ListVirtualNetworkGatewayConnectionsinResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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 @@ -223,7 +223,7 @@ public async Task Exists_GetVirtualNetworkGatewayConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs index e65da95e4af6..ae7eaca99090 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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_GetVirtualNetworkGatewayConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionDelete.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_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_DeleteVirtualNetworkGatewayConnection() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVirtualNetworkGatewayConnectionTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_UpdateVirtualNetworkGatewayConnectionTags() [Ignore("Only validating compilation of examples")] public async Task VpnDeviceConfigurationScript_GetVPNDeviceConfigurationScript() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json // this example is just showing the usage of "VirtualNetworkGateways_VpnDeviceConfigurationScript" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task VpnDeviceConfigurationScript_GetVPNDeviceConfigurationScript() [Ignore("Only validating compilation of examples")] public async Task SetSharedKey_SetVirtualNetworkGatewayConnectionSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_SetSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task SetSharedKey_SetVirtualNetworkGatewayConnectionSharedKey() [Ignore("Only validating compilation of examples")] public async Task GetSharedKey_GetVirtualNetworkGatewayConnectionSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_GetSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSharedKey_GetVirtualNetworkGatewayConnectionSharedKey() [Ignore("Only validating compilation of examples")] public async Task ResetSharedKey_ResetVirtualNetworkGatewayConnectionSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_ResetSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -229,7 +229,7 @@ public async Task ResetSharedKey_ResetVirtualNetworkGatewayConnectionSharedKey() [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -260,7 +260,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayCo [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -287,7 +287,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayCo [Ignore("Only validating compilation of examples")] public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -318,7 +318,7 @@ public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGatewayConn [Ignore("Only validating compilation of examples")] public async Task GetIkeSas_GetVirtualNetworkGatewayConnectionIkeSa() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_GetIkeSas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -345,7 +345,7 @@ public async Task GetIkeSas_GetVirtualNetworkGatewayConnectionIkeSa() [Ignore("Only validating compilation of examples")] public async Task ResetConnection_ResetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayConnectionReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayConnectionReset.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_ResetConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs index 21863d33e1b6..2f7ffc7c56d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayNatRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VirtualNetworkGatewayNatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRulePut.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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 @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_VirtualNetworkGatewayNatRulePut() [Ignore("Only validating compilation of examples")] public async Task Get_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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 @@ -105,7 +105,7 @@ public async Task Get_VirtualNetworkGatewayNatRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VirtualNetworkGatewayNatRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRuleList.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_ListByVirtualNetworkGateway" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task GetAll_VirtualNetworkGatewayNatRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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 @@ -171,7 +171,7 @@ public async Task Exists_VirtualNetworkGatewayNatRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs index de52cdd36525..0d11d53e8de0 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayNatRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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_VirtualNetworkGatewayNatRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VirtualNetworkGatewayNatRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRuleDelete.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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_VirtualNetworkGatewayNatRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VirtualNetworkGatewayNatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayNatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayNatRulePut.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs index 26ede872309d..d99f1b5b6194 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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_GetVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -81,7 +81,7 @@ public async Task Get_GetVirtualNetworkScalableGateway() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayDelete.json // this example is just showing the usage of "VirtualNetworkGateways_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 @@ -107,7 +107,7 @@ public async Task Delete_DeleteVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVirtualNetworkGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayUpdateTags.json // this example is just showing the usage of "VirtualNetworkGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateVirtualNetworkGatewayTags() [Ignore("Only validating compilation of examples")] public async Task GetConnections_VirtualNetworkGatewaysListConnections() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewaysListConnections.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewaysListConnections.json // this example is just showing the usage of "VirtualNetworkGateways_ListConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task GetConnections_VirtualNetworkGatewaysListConnections() [Ignore("Only validating compilation of examples")] public async Task Reset_ResetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayReset.json // this example is just showing the usage of "VirtualNetworkGateways_Reset" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Reset_ResetVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task ResetVpnClientSharedKey_ResetVpnClientSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json // this example is just showing the usage of "VirtualNetworkGateways_ResetVpnClientSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task ResetVpnClientSharedKey_ResetVpnClientSharedKey() [Ignore("Only validating compilation of examples")] public async Task GenerateVpnClientPackage_GenerateVPNClientPackage() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json // this example is just showing the usage of "VirtualNetworkGateways_Generatevpnclientpackage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -260,7 +260,7 @@ public async Task GenerateVpnClientPackage_GenerateVPNClientPackage() [Ignore("Only validating compilation of examples")] public async Task GenerateVpnProfile_GenerateVirtualNetworkGatewayVPNProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json // this example is just showing the usage of "VirtualNetworkGateways_GenerateVpnProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -288,7 +288,7 @@ public async Task GenerateVpnProfile_GenerateVirtualNetworkGatewayVPNProfile() [Ignore("Only validating compilation of examples")] public async Task GetVpnProfilePackageUrl_GetVirtualNetworkGatewayVPNProfilePackageURL() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json // this example is just showing the usage of "VirtualNetworkGateways_GetVpnProfilePackageUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -315,7 +315,7 @@ public async Task GetVpnProfilePackageUrl_GetVirtualNetworkGatewayVPNProfilePack [Ignore("Only validating compilation of examples")] public async Task GetBgpPeerStatus_GetVirtualNetworkGatewayBGPPeerStatus() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json // this example is just showing the usage of "VirtualNetworkGateways_GetBgpPeerStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -342,7 +342,7 @@ public async Task GetBgpPeerStatus_GetVirtualNetworkGatewayBGPPeerStatus() [Ignore("Only validating compilation of examples")] public async Task SupportedVpnDevices_ListVirtualNetworkGatewaySupportedVPNDevices() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json // this example is just showing the usage of "VirtualNetworkGateways_SupportedVpnDevices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -368,7 +368,7 @@ public async Task SupportedVpnDevices_ListVirtualNetworkGatewaySupportedVPNDevic [Ignore("Only validating compilation of examples")] public async Task GetLearnedRoutes_GetVirtualNetworkGatewayLearnedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayLearnedRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayLearnedRoutes.json // this example is just showing the usage of "VirtualNetworkGateways_GetLearnedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -395,7 +395,7 @@ public async Task GetLearnedRoutes_GetVirtualNetworkGatewayLearnedRoutes() [Ignore("Only validating compilation of examples")] public async Task GetAdvertisedRoutes_GetVirtualNetworkGatewayAdvertisedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json // this example is just showing the usage of "VirtualNetworkGateways_GetAdvertisedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -423,7 +423,7 @@ public async Task GetAdvertisedRoutes_GetVirtualNetworkGatewayAdvertisedRoutes() [Ignore("Only validating compilation of examples")] public async Task GetResiliencyInformation_GetVirtualNetworkGatewayResiliencyInformation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetResiliencyInformation.json // this example is just showing the usage of "VirtualNetworkGateways_GetResiliencyInformation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -451,7 +451,7 @@ public async Task GetResiliencyInformation_GetVirtualNetworkGatewayResiliencyInf [Ignore("Only validating compilation of examples")] public async Task GetRoutesInformation_GetVirtualNetworkGatewayRoutesInformation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetRoutesInformation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetRoutesInformation.json // this example is just showing the usage of "VirtualNetworkGateways_GetRoutesInformation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -479,7 +479,7 @@ public async Task GetRoutesInformation_GetVirtualNetworkGatewayRoutesInformation [Ignore("Only validating compilation of examples")] public async Task SetVpnclientIPsecParameters_SetVirtualNetworkGatewayVpnClientIpsecParameters() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json // this example is just showing the usage of "VirtualNetworkGateways_SetVpnclientIPsecParameters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -515,7 +515,7 @@ public async Task SetVpnclientIPsecParameters_SetVirtualNetworkGatewayVpnClientI [Ignore("Only validating compilation of examples")] public async Task GetVpnclientIPsecParameters_GetVirtualNetworkGatewayVpnClientIpsecParameters() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json // this example is just showing the usage of "VirtualNetworkGateways_GetVpnclientIPsecParameters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -542,7 +542,7 @@ public async Task GetVpnclientIPsecParameters_GetVirtualNetworkGatewayVpnClientI [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json // this example is just showing the usage of "VirtualNetworkGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -573,7 +573,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWi [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayStartPacketCapture.json // this example is just showing the usage of "VirtualNetworkGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -600,7 +600,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWi [Ignore("Only validating compilation of examples")] public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayStopPacketCapture.json // this example is just showing the usage of "VirtualNetworkGateways_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -631,7 +631,7 @@ public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGateway() [Ignore("Only validating compilation of examples")] public async Task GetFailoverAllTestDetails_VirtualNetworkGatewayGetFailoverAllTestsDetails() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetFailoverAllTestsDetails.json // this example is just showing the usage of "VirtualNetworkGateways_GetFailoverAllTestDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -660,7 +660,7 @@ public async Task GetFailoverAllTestDetails_VirtualNetworkGatewayGetFailoverAllT [Ignore("Only validating compilation of examples")] public async Task GetFailoverSingleTestDetails_VirtualNetworkGatewayGetFailoverSingleTestDetails() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetFailoverSingleTestDetails.json // this example is just showing the usage of "VirtualNetworkGateways_GetFailoverSingleTestDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -689,7 +689,7 @@ public async Task GetFailoverSingleTestDetails_VirtualNetworkGatewayGetFailoverS [Ignore("Only validating compilation of examples")] public async Task StartExpressRouteSiteFailoverSimulation_VirtualNetworkGatewayStartSiteFailoverSimulation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayStartSiteFailoverSimulation.json // this example is just showing the usage of "VirtualNetworkGateways_StartExpressRouteSiteFailoverSimulation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -717,7 +717,7 @@ public async Task StartExpressRouteSiteFailoverSimulation_VirtualNetworkGatewayS [Ignore("Only validating compilation of examples")] public async Task StopExpressRouteSiteFailoverSimulation_VirtualNetworkGatewayStopSiteFailoverSimulation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayStopSiteFailoverSimulation.json // this example is just showing the usage of "VirtualNetworkGateways_StopExpressRouteSiteFailoverSimulation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -760,7 +760,7 @@ public async Task StopExpressRouteSiteFailoverSimulation_VirtualNetworkGatewaySt [Ignore("Only validating compilation of examples")] public async Task GetVpnclientConnectionHealth_GetVirtualNetworkGatewayVpnclientConnectionHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json // this example is just showing the usage of "VirtualNetworkGateways_GetVpnclientConnectionHealth" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -787,7 +787,7 @@ public async Task GetVpnclientConnectionHealth_GetVirtualNetworkGatewayVpnclient [Ignore("Only validating compilation of examples")] public async Task DisconnectVirtualNetworkGatewayVpnConnections_DisconnectVpnConnectionsFromVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json // this example is just showing the usage of "VirtualNetworkGateways_DisconnectVirtualNetworkGatewayVpnConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -817,7 +817,7 @@ public async Task DisconnectVirtualNetworkGatewayVpnConnections_DisconnectVpnCon [Ignore("Only validating compilation of examples")] public async Task InvokePrepareMigration_VirtualNetworkGatewayPrepareMigration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayPrepareMigration.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayPrepareMigration.json // this example is just showing the usage of "VirtualNetworkGateways_InvokePrepareMigration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -847,7 +847,7 @@ public async Task InvokePrepareMigration_VirtualNetworkGatewayPrepareMigration() [Ignore("Only validating compilation of examples")] public async Task InvokeExecuteMigration_VirtualNetworkGatewayExecuteMigration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayExecuteMigration.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayExecuteMigration.json // this example is just showing the usage of "VirtualNetworkGateways_InvokeExecuteMigration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -873,7 +873,7 @@ public async Task InvokeExecuteMigration_VirtualNetworkGatewayExecuteMigration() [Ignore("Only validating compilation of examples")] public async Task InvokeCommitMigration_VirtualNetworkGatewayCommitMigration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayCommitMigration.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayCommitMigration.json // this example is just showing the usage of "VirtualNetworkGateways_InvokeCommitMigration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -899,7 +899,7 @@ public async Task InvokeCommitMigration_VirtualNetworkGatewayCommitMigration() [Ignore("Only validating compilation of examples")] public async Task InvokeAbortMigration_VirtualNetworkGatewayAbortMigration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGatewayAbortMigration.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGatewayAbortMigration.json // this example is just showing the usage of "VirtualNetworkGateways_InvokeAbortMigration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs index 289eee9e8a4c..059903a75a0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkPeeringCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_CreateV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -110,7 +110,7 @@ public async Task CreateOrUpdate_CreatePeering() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatePeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_CreatePeeringWithRemoteVirtualNetworkEncryption [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -200,7 +200,7 @@ public async Task CreateOrUpdate_CreateSubnetPeering() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SyncPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -244,7 +244,7 @@ public async Task CreateOrUpdate_SyncPeering() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SyncV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -290,7 +290,7 @@ public async Task CreateOrUpdate_SyncV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SyncSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -336,7 +336,7 @@ public async Task CreateOrUpdate_SyncSubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Get_GetV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -370,7 +370,7 @@ public async Task Get_GetV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Get_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -404,7 +404,7 @@ public async Task Get_GetPeering() [Ignore("Only validating compilation of examples")] public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -438,7 +438,7 @@ public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -472,7 +472,7 @@ public async Task Get_GetSubnetPeering() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringList.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -508,7 +508,7 @@ public async Task GetAll_ListPeerings() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPeeringsWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -544,7 +544,7 @@ public async Task GetAll_ListPeeringsWithRemoteVirtualNetworkEncryption() [Ignore("Only validating compilation of examples")] public async Task Exists_GetV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -574,7 +574,7 @@ public async Task Exists_GetV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -604,7 +604,7 @@ public async Task Exists_GetPeering() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -634,7 +634,7 @@ public async Task Exists_GetPeeringWithRemoteVirtualNetworkEncryption() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -664,7 +664,7 @@ public async Task Exists_GetSubnetPeering() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -706,7 +706,7 @@ public async Task GetIfExists_GetV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -748,7 +748,7 @@ public async Task GetIfExists_GetPeering() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -790,7 +790,7 @@ public async Task GetIfExists_GetPeeringWithRemoteVirtualNetworkEncryption() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs index ecb39eb8bc72..77fbc32f5d7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkPeeringResource [Ignore("Only validating compilation of examples")] public async Task Get_GetV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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_GetV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Get_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -82,7 +82,7 @@ public async Task Get_GetPeering() [Ignore("Only validating compilation of examples")] public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -113,7 +113,7 @@ public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() [Ignore("Only validating compilation of examples")] public async Task Get_GetSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -144,7 +144,7 @@ public async Task Get_GetSubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringDelete.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -171,7 +171,7 @@ public async Task Delete_DeletePeering() [Ignore("Only validating compilation of examples")] public async Task Update_CreateV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -215,7 +215,7 @@ public async Task Update_CreateV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -255,7 +255,7 @@ public async Task Update_CreatePeering() [Ignore("Only validating compilation of examples")] public async Task Update_CreatePeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -295,7 +295,7 @@ public async Task Update_CreatePeeringWithRemoteVirtualNetworkEncryption() [Ignore("Only validating compilation of examples")] public async Task Update_CreateSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -339,7 +339,7 @@ public async Task Update_CreateSubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Update_SyncPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -380,7 +380,7 @@ public async Task Update_SyncPeering() [Ignore("Only validating compilation of examples")] public async Task Update_SyncV6SubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkV6SubnetPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkV6SubnetPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_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 @@ -423,7 +423,7 @@ public async Task Update_SyncV6SubnetPeering() [Ignore("Only validating compilation of examples")] public async Task Update_SyncSubnetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkSubnetPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkSubnetPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkResource.cs index 156c566b5afa..40decea6719e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_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_GetVirtualNetwork() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_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 @@ -80,7 +80,7 @@ public async Task Get_GetVirtualNetworkWithADelegatedSubnet() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_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 @@ -110,7 +110,7 @@ public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkDelete.json // this example is just showing the usage of "VirtualNetworks_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 @@ -136,7 +136,7 @@ public async Task Delete_DeleteVirtualNetwork() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVirtualNetworkTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkUpdateTags.json // this example is just showing the usage of "VirtualNetworks_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task Update_UpdateVirtualNetworkTags() [Ignore("Only validating compilation of examples")] public async Task GetNetworkManagerEffectiveConnectivityConfigurations_ListEffectiveConnectivityConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json // this example is just showing the usage of "ListNetworkManagerEffectiveConnectivityConfigurations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetNetworkManagerEffectiveConnectivityConfigurations_ListEffec [Ignore("Only validating compilation of examples")] public async Task GetNetworkManagerEffectiveSecurityAdminRules_ListEffectiveSecurityAdminRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json // this example is just showing the usage of "ListNetworkManagerEffectiveSecurityAdminRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -240,7 +240,7 @@ public async Task GetNetworkManagerEffectiveSecurityAdminRules_ListEffectiveSecu [Ignore("Only validating compilation of examples")] public async Task CheckIPAddressAvailability_CheckIPAddressAvailability() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkCheckIPAddressAvailability.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkCheckIPAddressAvailability.json // this example is just showing the usage of "VirtualNetworks_CheckIPAddressAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task CheckIPAddressAvailability_CheckIPAddressAvailability() [Ignore("Only validating compilation of examples")] public async Task GetUsage_VnetGetUsage() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkListUsage.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkListUsage.json // this example is just showing the usage of "VirtualNetworks_ListUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapCollection.cs index c54bf4c75352..77dbe64eae43 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkTapCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapCreate.json // this example is just showing the usage of "VirtualNetworkTaps_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 @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkTap() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_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_GetVirtualNetworkTap() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworkTapsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapList.json // this example is just showing the usage of "VirtualNetworkTaps_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 @@ -130,7 +130,7 @@ public async Task GetAll_ListVirtualNetworkTapsInResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_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_GetVirtualNetworkTap() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapResource.cs index 09fd975fa2f7..1547c45e98ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualNetworkTapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkTapResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_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_GetVirtualNetworkTap() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualNetworkTapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapDelete.json // this example is just showing the usage of "VirtualNetworkTaps_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_DeleteVirtualNetworkTapResource() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVirtualNetworkTapTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualNetworkTapUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualNetworkTapUpdateTags.json // this example is just showing the usage of "VirtualNetworkTaps_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterCollection.cs index 7d5198761eb4..49e577b35dfc 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualRouterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPut.json // this example is just showing the usage of "VirtualRouters_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_CreateVirtualRouter() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_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 @@ -96,7 +96,7 @@ public async Task Get_GetVirtualRouter() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllVirtualRouterForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterListByResourceGroup.json // this example is just showing the usage of "VirtualRouters_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 @@ -131,7 +131,7 @@ public async Task GetAll_ListAllVirtualRouterForAGivenResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_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_GetVirtualRouter() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs index 4bd6452163d3..f967423470cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_VirtualRouterPeeringCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringPut.json // this example is just showing the usage of "VirtualRouterPeerings_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateVirtualRouterPeering() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_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_GetVirtualRouterPeering() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllVirtualRouterPeeringsForAGivenVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringList.json // this example is just showing the usage of "VirtualRouterPeerings_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_ListAllVirtualRouterPeeringsForAGivenVirtualRouter() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_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_GetVirtualRouterPeering() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringResource.cs index aa43cc56c299..bd570f66731c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterPeeringResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VirtualRouterPeeringResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_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_GetVirtualRouterPeering() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringDelete.json // this example is just showing the usage of "VirtualRouterPeerings_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteVirtualRouterPeering() [Ignore("Only validating compilation of examples")] public async Task Update_CreateVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPeeringPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPeeringPut.json // this example is just showing the usage of "VirtualRouterPeerings_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterResource.cs index a440ad655187..bb9d9a2d18b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualRouterResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VirtualRouterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_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 @@ -49,7 +49,7 @@ public async Task Get_GetVirtualRouter() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterDelete.json // this example is just showing the usage of "VirtualRouters_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 @@ -75,7 +75,7 @@ public async Task Delete_DeleteVirtualRouter() [Ignore("Only validating compilation of examples")] public async Task Update_CreateVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualRouterPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualRouterPut.json // this example is just showing the usage of "VirtualRouters_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanCollection.cs index bac53b769571..7b196e2371c1 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualWanCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VirtualWANCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANPut.json // this example is just showing the usage of "VirtualWans_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 @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_VirtualWANCreate() [Ignore("Only validating compilation of examples")] public async Task Get_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_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_VirtualWANGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VirtualWANListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANListByResourceGroup.json // this example is just showing the usage of "VirtualWans_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 @@ -132,7 +132,7 @@ public async Task GetAll_VirtualWANListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_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 @@ -161,7 +161,7 @@ public async Task Exists_VirtualWANGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanResource.cs index 592f3d86dbc4..1f421c4f6c8e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VirtualWanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualWanResource [Ignore("Only validating compilation of examples")] public async Task Get_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_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_VirtualWANGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VirtualWANDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANDelete.json // this example is just showing the usage of "VirtualWans_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_VirtualWANDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VirtualWANUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWANUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWANUpdateTags.json // this example is just showing the usage of "VirtualWans_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_VirtualWANUpdate() [Ignore("Only validating compilation of examples")] public async Task SupportedSecurityProviders_SupportedSecurityProviders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VirtualWanSupportedSecurityProviders.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VirtualWanSupportedSecurityProviders.json // this example is just showing the usage of "SupportedSecurityProviders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 SupportedSecurityProviders_SupportedSecurityProviders() [Ignore("Only validating compilation of examples")] public async Task GenerateVirtualWanVpnServerConfigurationVpnProfile_GenerateVirtualWanVpnServerConfigurationVpnProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json // this example is just showing the usage of "Generatevirtualwanvpnserverconfigurationvpnprofile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GenerateVirtualWanVpnServerConfigurationVpnProfile_GenerateVir [Ignore("Only validating compilation of examples")] public async Task DownloadVpnSitesConfiguration_VpnSitesConfigurationDownload() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSitesConfigurationDownload.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSitesConfigurationDownload.json // this example is just showing the usage of "VpnSitesConfiguration_Download" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +202,7 @@ public async Task DownloadVpnSitesConfiguration_VpnSitesConfigurationDownload() [Ignore("Only validating compilation of examples")] public async Task GetVpnServerConfigurationsAssociatedWithVirtualWan_GetVirtualWanVpnServerConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/GetVirtualWanVpnServerConfigurations.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/GetVirtualWanVpnServerConfigurations.json // this example is just showing the usage of "VpnServerConfigurationsAssociatedWithVirtualWan_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionCollection.cs index 6ebe99e4ca7d..a00208f61c92 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VpnConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionPut.json // this example is just showing the usage of "VpnConnections_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 @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_VpnConnectionPut() [Ignore("Only validating compilation of examples")] public async Task Get_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_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 @@ -125,7 +125,7 @@ public async Task Get_VpnConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VpnConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionList.json // this example is just showing the usage of "VpnConnections_ListByVpnGateway" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task GetAll_VpnConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_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 @@ -191,7 +191,7 @@ public async Task Exists_VpnConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionResource.cs index 660e3168570f..b8a603246568 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_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_VpnConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VpnConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionDelete.json // this example is just showing the usage of "VpnConnections_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_VpnConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VpnConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionPut.json // this example is just showing the usage of "VpnConnections_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 @@ -146,7 +146,7 @@ public async Task Update_VpnConnectionPut() [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionStartPacketCaptureFilterData.json // this example is just showing the usage of "VpnConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,7 +179,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithFilter [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionStartPacketCapture.json // this example is just showing the usage of "VpnConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithoutFil [Ignore("Only validating compilation of examples")] public async Task StopPacketCapture_StartPacketCaptureOnVpnConnectionWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnConnectionStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnConnectionStopPacketCapture.json // this example is just showing the usage of "VpnConnections_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayCollection.cs index f071458e782d..7bb690e9ca53 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_VpnGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VpnGatewayPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayPut.json // this example is just showing the usage of "VpnGateways_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 @@ -113,7 +113,7 @@ public async Task CreateOrUpdate_VpnGatewayPut() [Ignore("Only validating compilation of examples")] public async Task Get_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_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 @@ -146,7 +146,7 @@ public async Task Get_VpnGatewayGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VpnGatewayListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayListByResourceGroup.json // this example is just showing the usage of "VpnGateways_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 @@ -181,7 +181,7 @@ public async Task GetAll_VpnGatewayListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_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 @@ -210,7 +210,7 @@ public async Task Exists_VpnGatewayGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs index e762ded824ae..dbc68e86bb47 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnGatewayNatRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRulePut.json // this example is just showing the usage of "NatRules_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 @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_NatRulePut() [Ignore("Only validating compilation of examples")] public async Task Get_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_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 @@ -103,7 +103,7 @@ public async Task Get_NatRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NatRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRuleList.json // this example is just showing the usage of "NatRules_ListByVpnGateway" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task GetAll_NatRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_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 @@ -169,7 +169,7 @@ public async Task Exists_NatRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs index 43866f6d71d9..1f71c1466f22 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnGatewayNatRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_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_NatRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NatRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRuleDelete.json // this example is just showing the usage of "NatRules_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_NatRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/NatRulePut.json // this example is just showing the usage of "NatRules_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayResource.cs index c133c5d54af6..4c9c446134ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_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_VpnGatewayGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VpnGatewayDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayDelete.json // this example is just showing the usage of "VpnGateways_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_VpnGatewayDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VpnGatewayUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayUpdateTags.json // this example is just showing the usage of "VpnGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_VpnGatewayUpdate() [Ignore("Only validating compilation of examples")] public async Task Reset_ResetVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayReset.json // this example is just showing the usage of "VpnGateways_Reset" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Reset_ResetVpnGateway() [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayStartPacketCaptureFilterData.json // this example is just showing the usage of "VpnGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +177,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithFilter() [Ignore("Only validating compilation of examples")] public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayStartPacketCapture.json // this example is just showing the usage of "VpnGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithoutFilter [Ignore("Only validating compilation of examples")] public async Task StopPacketCapture_StopPacketCaptureOnVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnGatewayStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnGatewayStopPacketCapture.json // this example is just showing the usage of "VpnGateways_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnLinkConnectionSharedKeyResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnLinkConnectionSharedKeyResource.cs index 94de652b73fd..110555f9acdf 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnLinkConnectionSharedKeyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnLinkConnectionSharedKeyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnLinkConnectionSharedKeyResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteLinkConnectionDefaultSharedKeyGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionDefaultSharedKeyGet.json // this example is just showing the usage of "VpnLinkConnections_GetDefaultSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_VpnSiteLinkConnectionDefaultSharedKeyGet() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VpnSiteLinkConnectionDefaultSharedKeyPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionDefaultSharedKeyPut.json // this example is just showing the usage of "VpnLinkConnections_SetOrInitDefaultSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task CreateOrUpdate_VpnSiteLinkConnectionDefaultSharedKeyPut() [Ignore("Only validating compilation of examples")] public async Task GetDefaultSharedKey_VpnSiteLinkConnectionDefaultSharedKeyList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionDefaultSharedKeyList.json // this example is just showing the usage of "VpnLinkConnections_ListDefaultSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationCollection.cs index 8a5f3e6304ae..fd7013874c52 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnServerConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VpnServerConfigurationCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationPut.json // this example is just showing the usage of "VpnServerConfigurations_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 @@ -123,7 +123,7 @@ public async Task CreateOrUpdate_VpnServerConfigurationCreate() [Ignore("Only validating compilation of examples")] public async Task Get_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_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 @@ -156,7 +156,7 @@ public async Task Get_VpnServerConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VpnServerConfigurationListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationListByResourceGroup.json // this example is just showing the usage of "VpnServerConfigurations_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 @@ -191,7 +191,7 @@ public async Task GetAll_VpnServerConfigurationListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_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 @@ -220,7 +220,7 @@ public async Task Exists_VpnServerConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs index 1c76769ee09c..b5ef524547b6 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnServerConfigurationPolicyGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConfigurationPolicyGroupPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupPut.json // this example is just showing the usage of "ConfigurationPolicyGroups_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 @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_ConfigurationPolicyGroupPut() [Ignore("Only validating compilation of examples")] public async Task Get_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_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 @@ -105,7 +105,7 @@ public async Task Get_ConfigurationPolicyGroupGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ConfigurationPolicyGroupListByVpnServerConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json // this example is just showing the usage of "configurationPolicyGroups_ListByVpnServerConfiguration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task GetAll_ConfigurationPolicyGroupListByVpnServerConfiguration() [Ignore("Only validating compilation of examples")] public async Task Exists_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_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 @@ -171,7 +171,7 @@ public async Task Exists_ConfigurationPolicyGroupGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs index 2dc998ec650a..434ce7eecc5e 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnServerConfigurationPolicyGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_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_ConfigurationPolicyGroupGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConfigurationPolicyGroupDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupDelete.json // this example is just showing the usage of "ConfigurationPolicyGroups_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_ConfigurationPolicyGroupDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConfigurationPolicyGroupPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/ConfigurationPolicyGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/ConfigurationPolicyGroupPut.json // this example is just showing the usage of "ConfigurationPolicyGroups_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationResource.cs index 7e5cc20b0795..a256a3f22800 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnServerConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnServerConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_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_VpnServerConfigurationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VpnServerConfigurationDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationDelete.json // this example is just showing the usage of "VpnServerConfigurations_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_VpnServerConfigurationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VpnServerConfigurationUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnServerConfigurationUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnServerConfigurationUpdateTags.json // this example is just showing the usage of "VpnServerConfigurations_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteCollection.cs index 677ead5efd4e..f493915de805 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnSiteCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VpnSiteCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSitePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSitePut.json // this example is just showing the usage of "VpnSites_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 @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_VpnSiteCreate() [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_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 @@ -124,7 +124,7 @@ public async Task Get_VpnSiteGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VpnSiteListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteListByResourceGroup.json // this example is just showing the usage of "VpnSites_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 @@ -159,7 +159,7 @@ public async Task GetAll_VpnSiteListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_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 @@ -188,7 +188,7 @@ public async Task Exists_VpnSiteGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkCollection.cs index a4b8e33ccca4..4c7cfc012089 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkCollection [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_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_VpnSiteGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VpnSiteLinkListByVpnSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkListByVpnSite.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkListByVpnSite.json // this example is just showing the usage of "VpnSiteLinks_ListByVpnSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_VpnSiteLinkListByVpnSite() [Ignore("Only validating compilation of examples")] public async Task Exists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_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 @@ -119,7 +119,7 @@ public async Task Exists_VpnSiteGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs index 06b67f8e5af3..f0e3407ea4ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkConnectionCollection [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_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 @@ -54,7 +54,7 @@ public async Task Get_VpnSiteLinkConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VpnSiteLinkConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionList.json // this example is just showing the usage of "VpnLinkConnections_ListByVpnConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_VpnSiteLinkConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_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 @@ -122,7 +122,7 @@ public async Task Exists_VpnSiteLinkConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs index 93b369be0963..7e9455d33d7c 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_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_VpnSiteLinkConnectionGet() [Ignore("Only validating compilation of examples")] public async Task ResetConnectionVpnLinkConnection_ResetVpnLinkConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionReset.json // this example is just showing the usage of "VpnLinkConnections_ResetConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ResetConnectionVpnLinkConnection_ResetVpnLinkConnection() [Ignore("Only validating compilation of examples")] public async Task GetIkeSasVpnLinkConnection_GetVpnLinkConnectionIkeSa() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkConnectionGetIkeSas.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkConnectionGetIkeSas.json // this example is just showing the usage of "VpnLinkConnections_GetIkeSas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkResource.cs index 52162367d127..b39eddc34d35 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteResource.cs index ea0bd8f28b69..90a8457a5b05 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_VpnSiteResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnSiteResource [Ignore("Only validating compilation of examples")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_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_VpnSiteGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VpnSiteDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteDelete.json // this example is just showing the usage of "VpnSites_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_VpnSiteDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VpnSiteUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/VpnSiteUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/VpnSiteUpdateTags.json // this example is just showing the usage of "VpnSites_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs index b822c820d974..95b0b7cc0c54 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_WebApplicationFirewallPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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 @@ -230,7 +230,7 @@ public async Task CreateOrUpdate_CreatesOrUpdatesAWAFPolicyWithinAResourceGroup( [Ignore("Only validating compilation of examples")] public async Task Get_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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 @@ -263,7 +263,7 @@ public async Task Get_GetsAWAFPolicyWithinAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAllWAFPoliciesInAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafListPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafListPolicies.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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 @@ -298,7 +298,7 @@ public async Task GetAll_ListsAllWAFPoliciesInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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 @@ -327,7 +327,7 @@ public async Task Exists_GetsAWAFPolicyWithinAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs index 94e15edd2124..916cfbe1a3e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_WebApplicationFirewallPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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_GetsAWAFPolicyWithinAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyDelete.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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_DeletesAWAFPolicyWithinAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-10-01/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "WebApplicationFirewallPolicies_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/openai/Azure.AI.OpenAI/tests/Samples/04_Audio.cs b/sdk/openai/Azure.AI.OpenAI/tests/Samples/04_Audio.cs new file mode 100644 index 000000000000..ac32ef96b627 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/tests/Samples/04_Audio.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.IO; +using Azure.Identity; +using OpenAI.Audio; + +namespace Azure.AI.OpenAI.Samples; + +public partial class AzureOpenAISamples +{ + public void AudioTranscription() + { + #region Snippet:AudioTranscription + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + AudioClient audioClient = azureClient.GetAudioClient("my-whisper-deployment"); + + // Load an audio file from your local system + string audioFilePath = "path/to/your/audio/file.wav"; + + // Transcribe the audio to text + AudioTranscription transcription = audioClient.TranscribeAudio(audioFilePath); + + Console.WriteLine($"Transcribed text: {transcription.Text}"); + #endregion + } + + public void AudioTranscriptionWithOptions() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + AudioClient audioClient = azureClient.GetAudioClient("my-whisper-deployment"); + + #region Snippet:AudioTranscriptionWithOptions + string audioFilePath = "path/to/your/audio/file.wav"; + + // Configure transcription options for enhanced output + AudioTranscriptionOptions options = new() + { + ResponseFormat = AudioTranscriptionFormat.Verbose, + Temperature = 0.2f, + Language = "en", // Specify the language if known for better accuracy + Prompt = "This is a recording about artificial intelligence and machine learning.", // Context hint + }; + + AudioTranscription transcription = audioClient.TranscribeAudio(audioFilePath, options); + + Console.WriteLine($"Transcribed text: {transcription.Text}"); + Console.WriteLine($"Language detected: {transcription.Language}"); + Console.WriteLine($"Duration: {transcription.Duration}"); + + // Access word-level timestamps if using verbose format + if (transcription.Words != null) + { + Console.WriteLine("Word-level timestamps:"); + foreach (var word in transcription.Words) + { + Console.WriteLine($" {word.Word}: timestamps available"); + } + } + #endregion + } + + public void AudioTranslation() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + AudioClient audioClient = azureClient.GetAudioClient("my-whisper-deployment"); + + #region Snippet:AudioTranslation + // Load an audio file in any supported language + string audioFilePath = "path/to/your/foreign/audio/file.wav"; + + // Translate the audio to English text + AudioTranslation translation = audioClient.TranslateAudio(audioFilePath); + + Console.WriteLine($"Translated to English: {translation.Text}"); + #endregion + } + + public void AudioTranslationWithOptions() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + AudioClient audioClient = azureClient.GetAudioClient("my-whisper-deployment"); + + #region Snippet:AudioTranslationWithOptions + string audioFilePath = "path/to/your/foreign/audio/file.wav"; + + // Configure translation options for enhanced output + AudioTranslationOptions options = new() + { + ResponseFormat = AudioTranslationFormat.Verbose, + Temperature = 0.1f, // Lower temperature for more deterministic translation + Prompt = "This is a technical presentation about computer science.", // Context for better translation + }; + + AudioTranslation translation = audioClient.TranslateAudio(audioFilePath, options); + + Console.WriteLine($"Translated text: {translation.Text}"); + Console.WriteLine($"Duration: {translation.Duration}"); + #endregion + } + +#if !AZURE_OPENAI_GA + public void TextToSpeech() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + AudioClient audioClient = azureClient.GetAudioClient("my-tts-deployment"); + + #region Snippet:TextToSpeech + string textToSpeak = "Hello! Welcome to Azure OpenAI text-to-speech. This technology can convert written text into natural-sounding speech."; + + // Generate speech from text + BinaryData speechData = audioClient.GenerateSpeech(textToSpeak, GeneratedSpeechVoice.Alloy); + + // Save the audio to a file + string outputPath = "generated_speech.mp3"; + File.WriteAllBytes(outputPath, speechData.ToArray()); + + Console.WriteLine($"Speech generated and saved to: {outputPath}"); + #endregion + } + + public void TextToSpeechWithOptions() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + AudioClient audioClient = azureClient.GetAudioClient("my-tts-deployment"); + + #region Snippet:TextToSpeechWithOptions + string textToSpeak = "This is a demonstration of advanced text-to-speech capabilities with customized voice settings."; + + // Generate speech with specific voice + BinaryData speechData = audioClient.GenerateSpeech(textToSpeak, GeneratedSpeechVoice.Nova); + + // Save with descriptive filename + string outputPath = $"speech_nova_{DateTime.Now:yyyyMMdd_HHmmss}.mp3"; + File.WriteAllBytes(outputPath, speechData.ToArray()); + + Console.WriteLine($"Speech generated with Nova voice"); + Console.WriteLine($"Saved to: {outputPath}"); + #endregion + } + + public void AudioWorkflowExample() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + AudioClient whisperClient = azureClient.GetAudioClient("my-whisper-deployment"); + AudioClient ttsClient = azureClient.GetAudioClient("my-tts-deployment"); + + #region Snippet:AudioWorkflowExample + // Complete workflow: audio processing pipeline + string inputAudioPath = "path/to/meeting/recording.wav"; + + // Step 1: Transcribe the meeting recording + Console.WriteLine("Transcribing meeting recording..."); + AudioTranscriptionOptions transcriptionOptions = new() + { + ResponseFormat = AudioTranscriptionFormat.Verbose, + Language = "en", + Prompt = "This is a business meeting discussing project updates and next steps.", + }; + + AudioTranscription transcription = whisperClient.TranscribeAudio(inputAudioPath, transcriptionOptions); + Console.WriteLine($"Meeting transcribed: {transcription.Text.Length} characters"); + + // Step 2: Extract key points or summary (this would typically involve chat completion) + string summary = "Key meeting outcomes: Project milestone achieved, budget approved, next review scheduled for next week."; + + // Step 3: Convert summary back to speech for accessibility + Console.WriteLine("Generating audio summary..."); + + BinaryData summaryAudio = ttsClient.GenerateSpeech(summary, GeneratedSpeechVoice.Echo); + + // Step 4: Save outputs + File.WriteAllText("meeting_transcript.txt", transcription.Text); + File.WriteAllText("meeting_summary.txt", summary); + File.WriteAllBytes("meeting_summary.mp3", summaryAudio.ToArray()); + + Console.WriteLine("Audio workflow completed:"); + Console.WriteLine("- meeting_transcript.txt: Full transcription"); + Console.WriteLine("- meeting_summary.txt: Key points summary"); + Console.WriteLine("- meeting_summary.mp3: Audio summary"); + #endregion + } +#endif +} \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Samples/05_Images.cs b/sdk/openai/Azure.AI.OpenAI/tests/Samples/05_Images.cs new file mode 100644 index 000000000000..e914bc8de01e --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/tests/Samples/05_Images.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.IO; +using Azure.Identity; +using OpenAI.Images; + +namespace Azure.AI.OpenAI.Samples; + +public partial class AzureOpenAISamples +{ + public void BasicImageGeneration() + { + #region Snippet:BasicImageGeneration + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + ImageClient imageClient = azureClient.GetImageClient("my-dalle-deployment"); + + // Generate a single image from a text prompt + string prompt = "A serene mountain landscape at sunset with a crystal-clear lake reflecting the sky"; + + GeneratedImage image = imageClient.GenerateImage(prompt); + + Console.WriteLine($"Generated image URL: {image.ImageUri}"); + Console.WriteLine($"Revised prompt: {image.RevisedPrompt}"); + #endregion + } + + public void ImageGenerationWithOptions() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + ImageClient imageClient = azureClient.GetImageClient("my-dalle-deployment"); + + #region Snippet:ImageGenerationWithOptions + string prompt = "A futuristic cityscape with flying cars and neon lights, cyberpunk style, high detail"; + + // Configure image generation with specific options + ImageGenerationOptions options = new() + { + Quality = GeneratedImageQuality.Standard, + Size = GeneratedImageSize.W1024xH1024, + Style = GeneratedImageStyle.Vivid, + ResponseFormat = GeneratedImageFormat.Uri, + }; + + GeneratedImage image = imageClient.GenerateImage(prompt, options); + + Console.WriteLine($"High-quality image generated: {image.ImageUri}"); + Console.WriteLine($"Revised prompt: {image.RevisedPrompt}"); + Console.WriteLine($"Size: {options.Size}"); + Console.WriteLine($"Quality: {options.Quality}"); + #endregion + } + + public void MultipleImageGeneration() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + ImageClient imageClient = azureClient.GetImageClient("my-dalle-deployment"); + + #region Snippet:MultipleImageGeneration + string prompt = "A cozy coffee shop interior with warm lighting, wooden furniture, and plants"; + + // Generate multiple variations of the same concept + ImageGenerationOptions options = new() + { + Size = GeneratedImageSize.W1024xH1024, + Quality = GeneratedImageQuality.Standard, + }; + + GeneratedImage image1 = imageClient.GenerateImage(prompt, options); + GeneratedImage image2 = imageClient.GenerateImage(prompt, options); + GeneratedImage image3 = imageClient.GenerateImage(prompt, options); + + Console.WriteLine($"Generated 3 image variations:"); + Console.WriteLine($"Image 1: {image1.ImageUri}"); + Console.WriteLine($"Image 2: {image2.ImageUri}"); + Console.WriteLine($"Image 3: {image3.ImageUri}"); + + // All images use the same base prompt + Console.WriteLine($"Base prompt used: {prompt}"); + #endregion + } + + public void ImageGenerationWithBase64() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + ImageClient imageClient = azureClient.GetImageClient("my-dalle-deployment"); + + #region Snippet:ImageGenerationWithBase64 + string prompt = "A professional headshot photo of a business person in a modern office setting"; + + // Generate image as base64 data instead of URL + ImageGenerationOptions options = new() + { + Size = GeneratedImageSize.W1024xH1024, + Quality = GeneratedImageQuality.Standard, + ResponseFormat = GeneratedImageFormat.Bytes, // Return as bytes + }; + + GeneratedImage image = imageClient.GenerateImage(prompt, options); + + // Save bytes directly to file + byte[] imageBytes = image.ImageBytes.ToArray(); + string filename = $"generated_headshot_{DateTime.Now:yyyyMMdd_HHmmss}.png"; + File.WriteAllBytes(filename, imageBytes); + + Console.WriteLine($"Image saved locally as: {filename}"); + Console.WriteLine($"Image size: {imageBytes.Length} bytes"); + #endregion + } + + public void CreativeImageWorkflow() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + ImageClient imageClient = azureClient.GetImageClient("my-dalle-deployment"); + + #region Snippet:CreativeImageWorkflow + // Creative workflow: Generate marketing materials for a fictional product + string[] prompts = { + "A sleek smartphone on a minimalist white background, product photography style", + "The same smartphone being used by a young professional in a modern office", + "A dramatic artistic shot of the smartphone with colorful lighting effects" + }; + + string[] contexts = { "product", "lifestyle", "artistic" }; + + Console.WriteLine("Generating marketing image set..."); + + for (int i = 0; i < prompts.Length; i++) + { + ImageGenerationOptions options = new() + { + Size = GeneratedImageSize.W1024xH1024, + Quality = GeneratedImageQuality.Standard, + Style = i == 2 ? GeneratedImageStyle.Vivid : GeneratedImageStyle.Natural, + ResponseFormat = GeneratedImageFormat.Bytes, + }; + + GeneratedImage image = imageClient.GenerateImage(prompts[i], options); + + // Save each image with descriptive naming + byte[] imageBytes = image.ImageBytes.ToArray(); + string filename = $"marketing_{contexts[i]}_{DateTime.Now:yyyyMMdd_HHmmss}.png"; + File.WriteAllBytes(filename, imageBytes); + + Console.WriteLine($"Generated {contexts[i]} image: {filename}"); + Console.WriteLine($" Revised prompt: {image.RevisedPrompt}"); + Console.WriteLine(); + } + + Console.WriteLine("Marketing image set complete! Use these images for:"); + Console.WriteLine("- Product catalog (product image)"); + Console.WriteLine("- Website hero section (lifestyle image)"); + Console.WriteLine("- Social media campaigns (artistic image)"); + #endregion + } + + public void ImageGenerationBestPractices() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + ImageClient imageClient = azureClient.GetImageClient("my-dalle-deployment"); + + #region Snippet:ImageGenerationBestPractices + // Best practices for prompt engineering and image generation + + // 1. Detailed and specific prompts yield better results + string detailedPrompt = "A macro photograph of a dewdrop on a green leaf, " + + "shot with shallow depth of field, golden hour lighting, " + + "nature photography, high resolution, crisp details"; + + // 2. Use appropriate quality settings for your use case + ImageGenerationOptions qualityOptions = new() + { + Quality = GeneratedImageQuality.Standard, // Use Standard for most applications + Size = GeneratedImageSize.W1024xH1024, // Standard size for most applications + Style = GeneratedImageStyle.Natural, // Natural for realistic images + }; + + GeneratedImage professionalImage = imageClient.GenerateImage(detailedPrompt, qualityOptions); + + // 3. For social media or web use, standard quality may suffice + string socialPrompt = "A cheerful illustration of people enjoying coffee together, cartoon style"; + + ImageGenerationOptions webOptions = new() + { + Quality = GeneratedImageQuality.Standard, // Standard quality for web + Size = GeneratedImageSize.W1024xH1024, + Style = GeneratedImageStyle.Vivid, // Vivid for eye-catching social content + }; + + GeneratedImage socialImage = imageClient.GenerateImage(socialPrompt, webOptions); + + Console.WriteLine("Professional image (HD quality):"); + Console.WriteLine($" URL: {professionalImage.ImageUri}"); + Console.WriteLine($" Revised: {professionalImage.RevisedPrompt}"); + + Console.WriteLine("\nSocial media image (Standard quality):"); + Console.WriteLine($" URL: {socialImage.ImageUri}"); + Console.WriteLine($" Revised: {socialImage.RevisedPrompt}"); + + Console.WriteLine("\nTips for better image generation:"); + Console.WriteLine("- Be specific about style, lighting, and composition"); + Console.WriteLine("- Include art/photography terminology for desired aesthetic"); + Console.WriteLine("- Use HD quality for professional/print applications"); + Console.WriteLine("- Choose Vivid style for colorful, eye-catching images"); + Console.WriteLine("- Choose Natural style for realistic, photographic images"); + #endregion + } +} \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Samples/06_Embeddings.cs b/sdk/openai/Azure.AI.OpenAI/tests/Samples/06_Embeddings.cs new file mode 100644 index 000000000000..655cec24464a --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/tests/Samples/06_Embeddings.cs @@ -0,0 +1,286 @@ +// 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.Identity; +using OpenAI.Embeddings; + +namespace Azure.AI.OpenAI.Samples; + +public partial class AzureOpenAISamples +{ + public void BasicEmbeddings() + { + #region Snippet:BasicEmbeddings + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + EmbeddingClient embeddingClient = azureClient.GetEmbeddingClient("my-text-embedding-deployment"); + + // Generate embeddings for a single text + string text = "Azure OpenAI provides powerful AI capabilities for developers."; + + OpenAIEmbedding embedding = embeddingClient.GenerateEmbedding(text); + + var floats = embedding.ToFloats(); + Console.WriteLine($"Generated embedding with {floats.Length} dimensions"); + Console.WriteLine($"First few values: [{string.Join(", ", floats.Span.Slice(0, Math.Min(5, floats.Length)).ToArray().Select(v => v.ToString("F4")))}...]"); + #endregion + } + + public void BatchEmbeddings() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + EmbeddingClient embeddingClient = azureClient.GetEmbeddingClient("my-text-embedding-deployment"); + + #region Snippet:BatchEmbeddings + // Generate embeddings for multiple texts in a single request + string[] texts = { + "Machine learning is a subset of artificial intelligence.", + "Natural language processing helps computers understand human language.", + "Computer vision enables machines to interpret visual information.", + "Deep learning uses neural networks with multiple layers." + }; + + OpenAIEmbeddingCollection embeddings = embeddingClient.GenerateEmbeddings(texts); + + Console.WriteLine($"Generated {embeddings.Count} embeddings:"); + for (int i = 0; i < embeddings.Count; i++) + { + var floats = embeddings[i].ToFloats(); + Console.WriteLine($"Text {i + 1}: \"{texts[i]}\""); + Console.WriteLine($" Embedding dimensions: {floats.Length}"); + Console.WriteLine($" First few values: [{string.Join(", ", floats.Span.Slice(0, Math.Min(3, floats.Length)).ToArray().Select(v => v.ToString("F4")))}...]"); + } + #endregion + } + + public void SemanticSearch() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + EmbeddingClient embeddingClient = azureClient.GetEmbeddingClient("my-text-embedding-deployment"); + + #region Snippet:SemanticSearch + // Create a knowledge base of documents + string[] documents = { + "The Azure cloud platform provides scalable computing resources and services for businesses.", + "Machine learning algorithms can analyze large datasets to identify patterns and make predictions.", + "Cybersecurity measures protect digital systems from unauthorized access and data breaches.", + "Sustainable energy solutions include solar panels, wind turbines, and battery storage systems.", + "Quantum computing uses quantum mechanical phenomena to process information in novel ways.", + "Blockchain technology creates immutable ledgers for secure and transparent transactions.", + "Artificial intelligence enables machines to simulate human cognitive functions." + }; + + // Generate embeddings for all documents + Console.WriteLine("Creating knowledge base embeddings..."); + OpenAIEmbeddingCollection documentEmbeddings = embeddingClient.GenerateEmbeddings(documents); + + // User query + string query = "What are cloud computing services?"; + Console.WriteLine($"\nUser query: \"{query}\""); + + // Generate embedding for the query + OpenAIEmbedding queryEmbedding = embeddingClient.GenerateEmbedding(query); + + // Calculate cosine similarity between query and each document + var similarities = new List<(int Index, double Similarity, string Document)>(); + + for (int i = 0; i < documentEmbeddings.Count; i++) + { + double similarity = CalculateCosineSimilarity( + queryEmbedding.ToFloats().ToArray(), + documentEmbeddings[i].ToFloats().ToArray()); + + similarities.Add((i, similarity, documents[i])); + } + + // Sort by similarity (highest first) + similarities.Sort((a, b) => b.Similarity.CompareTo(a.Similarity)); + + Console.WriteLine("\nMost relevant documents:"); + for (int i = 0; i < Math.Min(3, similarities.Count); i++) + { + var result = similarities[i]; + Console.WriteLine($"{i + 1}. Similarity: {result.Similarity:F4}"); + Console.WriteLine($" Document: {result.Document}"); + Console.WriteLine(); + } + #endregion + } + + public void TextClustering() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + EmbeddingClient embeddingClient = azureClient.GetEmbeddingClient("my-text-embedding-deployment"); + + #region Snippet:TextClustering + // Sample customer feedback texts for clustering + string[] customerFeedback = { + "The delivery was very fast and the product arrived in perfect condition.", + "Customer service was unhelpful and took too long to respond to my inquiry.", + "Great product quality but the price is a bit high for what you get.", + "Shipping took forever and the package was damaged when it arrived.", + "Excellent customer support team, they resolved my issue quickly.", + "The product exceeded my expectations and works exactly as advertised.", + "Website is difficult to navigate and the checkout process is confusing.", + "Fast shipping and excellent packaging, will definitely order again.", + "Product quality is poor and not worth the money spent.", + "Outstanding service and quick delivery, highly recommend!" + }; + + Console.WriteLine("Generating embeddings for customer feedback analysis..."); + OpenAIEmbeddingCollection feedbackEmbeddings = embeddingClient.GenerateEmbeddings(customerFeedback); + + // Simple clustering: find feedback items that are similar to each other + Console.WriteLine("\nFinding similar feedback clusters:"); + + var processed = new bool[customerFeedback.Length]; + int clusterNumber = 1; + + for (int i = 0; i < customerFeedback.Length; i++) + { + if (processed[i]) continue; + + var cluster = new List<(int Index, string Text, double Similarity)>(); + cluster.Add((i, customerFeedback[i], 1.0)); + processed[i] = true; + + // Find similar items + for (int j = i + 1; j < customerFeedback.Length; j++) + { + if (processed[j]) continue; + + double similarity = CalculateCosineSimilarity( + feedbackEmbeddings[i].ToFloats().ToArray(), + feedbackEmbeddings[j].ToFloats().ToArray()); + + // Group items with similarity > 0.8 (adjust threshold as needed) + if (similarity > 0.8) + { + cluster.Add((j, customerFeedback[j], similarity)); + processed[j] = true; + } + } + + // Only show clusters with multiple items + if (cluster.Count > 1) + { + Console.WriteLine($"\nCluster {clusterNumber}:"); + foreach (var item in cluster.OrderByDescending(x => x.Similarity)) + { + Console.WriteLine($" {item.Text} (similarity: {item.Similarity:F3})"); + } + clusterNumber++; + } + } + + Console.WriteLine("\nClustering complete! This helps identify:"); + Console.WriteLine("- Common themes in customer feedback"); + Console.WriteLine("- Similar complaints or compliments"); + Console.WriteLine("- Areas for business improvement"); + #endregion + } + + public void EmbeddingBasedRecommendations() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + EmbeddingClient embeddingClient = azureClient.GetEmbeddingClient("my-text-embedding-deployment"); + + #region Snippet:EmbeddingBasedRecommendations + // Product catalog with descriptions + var products = new Dictionary + { + ["laptop-gaming"] = "High-performance gaming laptop with RTX graphics card, 16GB RAM, and fast SSD storage for gaming enthusiasts.", + ["laptop-business"] = "Professional business laptop with long battery life, lightweight design, and enterprise security features.", + ["smartphone-camera"] = "Smartphone with advanced camera system, multiple lenses, and AI photography features for content creators.", + ["smartphone-budget"] = "Affordable smartphone with essential features, good battery life, and reliable performance for everyday use.", + ["headphones-noise"] = "Premium noise-canceling headphones with superior audio quality and comfort for long listening sessions.", + ["headphones-sports"] = "Wireless sports earbuds with secure fit, sweat resistance, and motivating sound for workouts.", + ["tablet-creative"] = "Professional tablet with stylus support, high-resolution display, and creative apps for digital artists.", + ["tablet-reading"] = "Lightweight tablet perfect for reading e-books, browsing the web, and consuming media content." + }; + + // Generate embeddings for all product descriptions + Console.WriteLine("Building product recommendation system..."); + var productNames = products.Keys.ToArray(); + var productDescriptions = products.Values.ToArray(); + + OpenAIEmbeddingCollection productEmbeddings = embeddingClient.GenerateEmbeddings(productDescriptions); + + // Customer preference query + string customerQuery = "I need a device for creating digital art and design work"; + Console.WriteLine($"\nCustomer query: \"{customerQuery}\""); + + OpenAIEmbedding queryEmbedding = embeddingClient.GenerateEmbedding(customerQuery); + + // Calculate relevance scores + var recommendations = new List<(string Product, string Description, double Score)>(); + + for (int i = 0; i < productEmbeddings.Count; i++) + { + double score = CalculateCosineSimilarity( + queryEmbedding.ToFloats().ToArray(), + productEmbeddings[i].ToFloats().ToArray()); + + recommendations.Add((productNames[i], productDescriptions[i], score)); + } + + // Sort by relevance score + recommendations.Sort((a, b) => b.Score.CompareTo(a.Score)); + + Console.WriteLine("\nRecommended products:"); + for (int i = 0; i < Math.Min(3, recommendations.Count); i++) + { + var rec = recommendations[i]; + Console.WriteLine($"{i + 1}. {rec.Product} (relevance: {rec.Score:F3})"); + Console.WriteLine($" {rec.Description}"); + Console.WriteLine(); + } + + Console.WriteLine("Recommendation system can be used for:"); + Console.WriteLine("- E-commerce product suggestions"); + Console.WriteLine("- Content recommendation engines"); + Console.WriteLine("- Personalized search results"); + #endregion + } + + #region Helper Methods + /// + /// Calculates cosine similarity between two vectors + /// + private static double CalculateCosineSimilarity(float[] vectorA, float[] vectorB) + { + if (vectorA.Length != vectorB.Length) + throw new ArgumentException("Vectors must have the same length"); + + double dotProduct = 0; + double magnitudeA = 0; + double magnitudeB = 0; + + for (int i = 0; i < vectorA.Length; i++) + { + dotProduct += vectorA[i] * vectorB[i]; + magnitudeA += vectorA[i] * vectorA[i]; + magnitudeB += vectorB[i] * vectorB[i]; + } + + magnitudeA = Math.Sqrt(magnitudeA); + magnitudeB = Math.Sqrt(magnitudeB); + + return dotProduct / (magnitudeA * magnitudeB); + } + #endregion +} \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Samples/07_Files.cs b/sdk/openai/Azure.AI.OpenAI/tests/Samples/07_Files.cs new file mode 100644 index 000000000000..45eb6db8e4c4 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/tests/Samples/07_Files.cs @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Azure.Identity; +using OpenAI.Files; + +namespace Azure.AI.OpenAI.Samples; + +public partial class AzureOpenAISamples +{ + public void BasicFileUpload() + { + #region Snippet:BasicFileUpload + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable AOAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. + OpenAIFileClient fileClient = azureClient.GetOpenAIFileClient(); + #pragma warning restore AOAI001 + + // Create sample data for upload + string fileContent = "Sample data for processing:\n" + + "Question: What is machine learning?\n" + + "Answer: Machine learning is a method of data analysis that automates analytical model building.\n" + + "Question: What is AI?\n" + + "Answer: AI is intelligence demonstrated by machines."; + + BinaryData data = BinaryData.FromString(fileContent); + + // Upload file for use with assistants + OpenAIFile uploadedFile = fileClient.UploadFile( + data, + "sample_qa_data.txt", + FileUploadPurpose.Assistants); + + Console.WriteLine($"File uploaded successfully:"); + Console.WriteLine($" ID: {uploadedFile.Id}"); + Console.WriteLine($" Filename: {uploadedFile.Filename}"); + Console.WriteLine($" Size: {uploadedFile.SizeInBytes} bytes"); + Console.WriteLine($" Purpose: {uploadedFile.Purpose}"); + #endregion + } + + public void FileUploadForBatch() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable AOAI001 + OpenAIFileClient fileClient = azureClient.GetOpenAIFileClient(); + #pragma warning restore AOAI001 + + #region Snippet:FileUploadForBatch + // Create JSONL content for batch processing + var batchRequests = new StringBuilder(); + batchRequests.AppendLine("{\"custom_id\": \"request-1\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-35-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"What is the capital of France?\"}]}}"); + batchRequests.AppendLine("{\"custom_id\": \"request-2\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-35-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"What is the largest planet in our solar system?\"}]}}"); + batchRequests.AppendLine("{\"custom_id\": \"request-3\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-35-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Explain photosynthesis in one sentence.\"}]}}"); + + BinaryData batchData = BinaryData.FromString(batchRequests.ToString()); + + // Upload file for batch processing + OpenAIFile batchFile = fileClient.UploadFile( + batchData, + "batch_requests.jsonl", + FileUploadPurpose.Batch); + + Console.WriteLine($"Batch file uploaded:"); + Console.WriteLine($" ID: {batchFile.Id}"); + Console.WriteLine($" Filename: {batchFile.Filename}"); + Console.WriteLine($" Purpose: {batchFile.Purpose}"); + #endregion + } + + public void FileManagement() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable AOAI001 + OpenAIFileClient fileClient = azureClient.GetOpenAIFileClient(); + #pragma warning restore AOAI001 + + #region Snippet:FileManagement + // List all uploaded files + Console.WriteLine("Listing all uploaded files:"); + OpenAIFileCollection files = fileClient.GetFiles(); + + foreach (OpenAIFile file in files) + { + Console.WriteLine($" {file.Id}: {file.Filename} ({file.SizeInBytes} bytes, {file.Purpose})"); + } + + // Upload a sample file for demonstration + string sampleContent = "This is a sample file for management demonstration."; + BinaryData sampleData = BinaryData.FromString(sampleContent); + + OpenAIFile newFile = fileClient.UploadFile( + sampleData, + "management_demo.txt", + FileUploadPurpose.Assistants); + + Console.WriteLine($"\nUploaded new file: {newFile.Id}"); + + // Retrieve specific file information + OpenAIFile retrievedFile = fileClient.GetFile(newFile.Id); + Console.WriteLine($"\nRetrieved file details:"); + Console.WriteLine($" ID: {retrievedFile.Id}"); + Console.WriteLine($" Filename: {retrievedFile.Filename}"); + + // Download file content + BinaryData downloadedContent = fileClient.DownloadFile(newFile.Id); + string contentText = downloadedContent.ToString(); + Console.WriteLine($"\nDownloaded content: \"{contentText}\""); + + // Clean up: delete the file + FileDeletionResult deletionResult = fileClient.DeleteFile(newFile.Id); + Console.WriteLine($"\nFile deletion result:"); + Console.WriteLine($" Deleted: {deletionResult.Deleted}"); + Console.WriteLine($" File ID: {deletionResult.FileId}"); + #endregion + } + + public void DocumentProcessingWorkflow() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable AOAI001 + OpenAIFileClient fileClient = azureClient.GetOpenAIFileClient(); + #pragma warning restore AOAI001 + + #region Snippet:DocumentProcessingWorkflow + // Scenario: Process multiple documents for an AI assistant + + // Sample documents with different types of content + var documents = new Dictionary + { + ["company_policies.txt"] = + "Employee Handbook\n" + + "1. Work Hours: 9 AM to 5 PM\n" + + "2. Remote Work: Available 2 days per week\n" + + "3. Vacation Policy: 20 days annually\n" + + "4. Dress Code: Business casual", + + ["product_specs.txt"] = + "Product Specifications\n" + + "Model: CloudWidget Pro\n" + + "CPU: 8-core processor\n" + + "Memory: 16GB RAM\n" + + "Storage: 512GB SSD\n" + + "Operating System: Windows 11", + + ["faq_responses.txt"] = + "Frequently Asked Questions\n" + + "Q: How do I reset my password?\n" + + "A: Use the 'Forgot Password' link on the login page.\n" + + "Q: What are the system requirements?\n" + + "A: See the product specifications document.\n" + + "Q: How do I contact support?\n" + + "A: Email support@company.com or call 1-800-SUPPORT" + }; + + Console.WriteLine("Starting document processing workflow..."); + var uploadedFiles = new List(); + + // Step 1: Upload all documents + foreach (var doc in documents) + { + Console.WriteLine($"Uploading {doc.Key}..."); + BinaryData docData = BinaryData.FromString(doc.Value); + + OpenAIFile uploadedFile = fileClient.UploadFile( + docData, + doc.Key, + FileUploadPurpose.Assistants); + + uploadedFiles.Add(uploadedFile); + Console.WriteLine($" Uploaded: {uploadedFile.Id}"); + } + + // Step 2: Verify all files are processed + Console.WriteLine("\nVerifying file processing status..."); + foreach (var file in uploadedFiles) + { + // Note: GetFile may fail immediately after upload. In production code, + // consider adding retries with small delays (e.g., 1-2 seconds) if needed. + OpenAIFile currentFile = fileClient.GetFile(file.Id); + Console.WriteLine($" {currentFile.Filename}: File uploaded successfully"); + } + + // Step 3: Create a summary of uploaded content + Console.WriteLine("\nDocument processing summary:"); + Console.WriteLine($"Total files uploaded: {uploadedFiles.Count}"); + + long totalSize = 0; + foreach (var file in uploadedFiles) + { + totalSize += file.SizeInBytes ?? 0; // Handle nullable SizeInBytes + } + + Console.WriteLine($"Total storage used: {totalSize} bytes"); + Console.WriteLine("\nFiles are now ready for use with:"); + Console.WriteLine("- AI Assistants for Q&A"); + Console.WriteLine("- Retrieval-augmented generation (RAG)"); + Console.WriteLine("- Document analysis and summarization"); + + // Note: In a real scenario, you might not delete these files immediately + // as they would be used by assistants or other AI services + + Console.WriteLine("\nWorkflow complete! Files available for AI processing."); + #endregion + } + + public void FileContentPreparation() + { + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable AOAI001 + OpenAIFileClient fileClient = azureClient.GetOpenAIFileClient(); + #pragma warning restore AOAI001 + + #region Snippet:FileContentPreparation + // Best practices for preparing file content for AI processing + + Console.WriteLine("Demonstrating file content preparation best practices..."); + + // 1. Structured text data for better AI comprehension + var structuredContent = new StringBuilder(); + structuredContent.AppendLine("# Customer Service Knowledge Base"); + structuredContent.AppendLine(); + structuredContent.AppendLine("## Billing Questions"); + structuredContent.AppendLine("**Question**: How do I view my bill?"); + structuredContent.AppendLine("**Answer**: Log into your account and click on 'Billing' in the navigation menu."); + structuredContent.AppendLine(); + structuredContent.AppendLine("**Question**: When is my payment due?"); + structuredContent.AppendLine("**Answer**: Payments are due on the 15th of each month."); + structuredContent.AppendLine(); + structuredContent.AppendLine("## Technical Support"); + structuredContent.AppendLine("**Question**: How do I troubleshoot connection issues?"); + structuredContent.AppendLine("**Answer**: First, check your internet connection, then restart the application."); + + BinaryData structuredData = BinaryData.FromString(structuredContent.ToString()); + OpenAIFile structuredFile = fileClient.UploadFile( + structuredData, + "structured_kb.md", + FileUploadPurpose.Assistants); + + Console.WriteLine($"Uploaded structured content: {structuredFile.Id}"); + + // 2. CSV data for tabular information + var csvContent = new StringBuilder(); + csvContent.AppendLine("Product,Category,Price,InStock"); + csvContent.AppendLine("Laptop Pro,Electronics,1299.99,true"); + csvContent.AppendLine("Wireless Mouse,Electronics,29.99,true"); + csvContent.AppendLine("Office Chair,Furniture,199.99,false"); + csvContent.AppendLine("Standing Desk,Furniture,399.99,true"); + + BinaryData csvData = BinaryData.FromString(csvContent.ToString()); + OpenAIFile csvFile = fileClient.UploadFile( + csvData, + "product_catalog.csv", + FileUploadPurpose.Assistants); + + Console.WriteLine($"Uploaded CSV data: {csvFile.Id}"); + + // 3. JSON data for complex structured information + string jsonContent = @"{ + ""configurations"": [ + { + ""environment"": ""production"", + ""settings"": { + ""timeout"": 30, + ""retries"": 3, + ""logging"": ""info"" + } + }, + { + ""environment"": ""development"", + ""settings"": { + ""timeout"": 10, + ""retries"": 1, + ""logging"": ""debug"" + } + } + ], + ""features"": { + ""authentication"": true, + ""analytics"": true, + ""notifications"": false + } +}"; + + BinaryData jsonData = BinaryData.FromString(jsonContent); + OpenAIFile jsonFile = fileClient.UploadFile( + jsonData, + "app_config.json", + FileUploadPurpose.Assistants); + + Console.WriteLine($"Uploaded JSON configuration: {jsonFile.Id}"); + + Console.WriteLine("\nFile preparation best practices:"); + Console.WriteLine("✓ Use clear structure with headers and sections"); + Console.WriteLine("✓ Include context and descriptions"); + Console.WriteLine("✓ Format tabular data as CSV for easy parsing"); + Console.WriteLine("✓ Use JSON for complex nested data"); + Console.WriteLine("✓ Keep file sizes reasonable (< 512MB)"); + Console.WriteLine("✓ Use descriptive filenames"); + #endregion + } +} \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Samples/08_Batch.cs b/sdk/openai/Azure.AI.OpenAI/tests/Samples/08_Batch.cs new file mode 100644 index 000000000000..0dfc841bbe60 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/tests/Samples/08_Batch.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.IO; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Azure.Identity; +using OpenAI.Batch; +using OpenAI.Files; + +namespace Azure.AI.OpenAI.Samples; + +public partial class AzureOpenAISamples +{ + public async Task BasicBatchProcessing() + { + #region Snippet:BasicBatchProcessing + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable OPENAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. + BatchClient batchClient = azureClient.GetBatchClient(); + #pragma warning restore OPENAI001 + + #pragma warning disable AOAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. + OpenAIFileClient fileClient = azureClient.GetOpenAIFileClient(); + #pragma warning restore AOAI001 + + // Step 1: Create batch request file in JSONL format + var batchRequests = new StringBuilder(); + batchRequests.AppendLine("{\"custom_id\": \"request-1\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-35-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Summarize the benefits of renewable energy.\"}], \"max_tokens\": 100}}"); + batchRequests.AppendLine("{\"custom_id\": \"request-2\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-35-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"Explain the water cycle in simple terms.\"}], \"max_tokens\": 100}}"); + batchRequests.AppendLine("{\"custom_id\": \"request-3\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-35-turbo\", \"messages\": [{\"role\": \"user\", \"content\": \"What are the main causes of climate change?\"}], \"max_tokens\": 100}}"); + + // Step 2: Upload the batch file + BinaryData batchFileData = BinaryData.FromString(batchRequests.ToString()); + OpenAIFile inputFile = await fileClient.UploadFileAsync( + batchFileData, + "batch_requests.jsonl", + FileUploadPurpose.Batch); + + Console.WriteLine($"Uploaded batch file: {inputFile.Id}"); + + // Step 3: Create batch request using the low-level protocol API + var createBatchRequestContent = BinaryContent.Create(BinaryData.FromString($@"{{ + ""input_file_id"": ""{inputFile.Id}"", + ""endpoint"": ""/v1/chat/completions"", + ""completion_window"": ""24h"" + }}")); + + CreateBatchOperation batch = await batchClient.CreateBatchAsync(createBatchRequestContent, waitUntilCompleted: false); + + Console.WriteLine($"Created batch job: {batch.BatchId}"); + Console.WriteLine("Batch processing initiated. Use the batch ID to monitor progress."); + #endregion + } + + public async Task BatchMonitoringExample() + { + #region Snippet:BatchMonitoringExample + AzureOpenAIClient azureClient = new( + new Uri("https://your-azure-openai-resource.com"), + new DefaultAzureCredential()); + + #pragma warning disable OPENAI001 + BatchClient batchClient = azureClient.GetBatchClient(); + #pragma warning restore OPENAI001 + + // Assume we have a batch ID from a previous operation + string batchId = "batch_abc123"; // Replace with actual batch ID + + try + { + // Get batch information using the low-level API + var getBatchResponse = await batchClient.GetBatchAsync(batchId, options: null); + var batchContent = getBatchResponse.GetRawResponse().Content.ToString(); + + Console.WriteLine("Batch Status Information:"); + Console.WriteLine(batchContent); + + // The response contains JSON with status, progress, and file IDs + // Parse this to extract specific information as needed + + Console.WriteLine("\nBatch monitoring workflow:"); + Console.WriteLine("1. Check batch status periodically"); + Console.WriteLine("2. Download results when completed"); + Console.WriteLine("3. Handle any errors appropriately"); + } + catch (Exception ex) + { + Console.WriteLine($"Error retrieving batch information: {ex.Message}"); + } + #endregion + } +} \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.sln b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.sln deleted file mode 100644 index 840be72bea43..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting.NUnit", "src\Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj", "{CF3C8F52-D3FD-4338-9432-58FF4BF4475E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests", "tests\Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj", "{081210F2-A9F8-4137-97F4-5D5EF238B553}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF3C8F52-D3FD-4338-9432-58FF4BF4475E}.Release|Any CPU.Build.0 = Release|Any CPU - {081210F2-A9F8-4137-97F4-5D5EF238B553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {081210F2-A9F8-4137-97F4-5D5EF238B553}.Debug|Any CPU.Build.0 = Debug|Any CPU - {081210F2-A9F8-4137-97F4-5D5EF238B553}.Release|Any CPU.ActiveCfg = Release|Any CPU - {081210F2-A9F8-4137-97F4-5D5EF238B553}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/CHANGELOG.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/CHANGELOG.md deleted file mode 100644 index 3f5377f83349..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/CHANGELOG.md +++ /dev/null @@ -1,55 +0,0 @@ -# Release History - -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.4 (2025-01-17) - -### Features Added - -- Warning message when MPT access token is close to expiry - -### Bugs Fixed - -- Max character limits in reporting API calls - -### Other Changes - -- Improved error messaging for reporting and scalable failures - -## 1.0.0-beta.3 (2024-11-18) - -### Features Added - -- Added a runName field which allows customers to customize the display name when using the reporting feature. -- Added stacktrace into error list. - -### Bugs Fixed - -- Fixed a bug where the upload buffer and upload file methods were not awaited, which sometimes resulted in 404 errors in the web application. -- Fixed a bug where the authentication error occurred when the scalable scenario was disabled in Playwright testing. -- Fixed a bug where the GetConnectOptionsAsync method did not use the runsetting defaults in Playwright testing. - -### Other Changes - -- Populated NumberOfTestWorkers from runsettings. - -## 1.0.0-beta.2 (2024-11-05) - -### Features Added - -- Added support for publishing test results and artifacts to the service from the client. - -## 1.0.0-beta.1 (2024-10-23) - -### Features Added - -- Added authentication using Microsoft Entra ID for the service. -- Added reporting capabilities for the service. You can now publish the reports and artifacts generated by Playwright OSS to the service. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md deleted file mode 100644 index 45f55b84f438..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# Microsoft Azure Playwright Testing NUnit client library for .NET - -Microsoft Playwright Testing is a fully managed service that uses the cloud to enable you to run Playwright tests with much higher parallelization across different operating system-browser combinations simultaneously. This means faster test runs with broader scenario coverage, which helps speed up delivery of features without sacrificing quality. The service also enables you to publish test results and related artifacts to the service and view them in the service portal enabling faster and easier troubleshooting. With Microsoft Playwright Testing service, you can release features faster and more confidently. - -Ready to get started? Jump into our [quickstart guide]! - -## Useful links -- [Quickstart: Run end-to-end tests at scale](https://aka.ms/mpt/quickstart) -- [View Microsoft Playwright Testing service demo](https://youtu.be/GenC1jAeTZE) -- [Documentation](https://aka.ms/mpt/docs) -- [Pricing](https://aka.ms/mpt/pricing) -- [Share feedback](https://aka.ms/mpt/feedback) - -## Getting started - -### Install the package - -Install the client library for .NET with [NuGet](https://www.nuget.org/): - -```dotnetcli -dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.NUnit --prerelease -``` - -### Prerequisites - -- An [Azure subscription](https://azure.microsoft.com/free/dotnet/) -- Your Azure account must be assigned the [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner), [Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#contributor), or one of the [classic administrator roles](https://learn.microsoft.com/azure/role-based-access-control/rbac-and-directory-admin-roles#classic-subscription-administrator-roles). - -### Authenticate the client - -To learn more about options for Microsoft Entra Id authentication, refer to [Azure.Identity credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#credentials). You can also refer to [our samples] on how to configurate different Azure Identity credentials. - -#### Create a Workspace - -1. Sign in to the [Playwright portal](https://aka.ms/mpt/portal) with your Azure account. - -2. Create the Workspace - - ![Create new workspace](https://github.com/microsoft/playwright-testing-service/assets/12104064/d571e86b-9d43-48ac-a2b7-63afb9bb86a8) - - |Field |Description | - |---------|---------| - |**Workspace Name** | A unique name to identify your workspace.
The name can't contain special characters or whitespace. | - |**Azure Subscription** | Select an Azure subscription where you want to create the workspace. | - |**Region** | This is where test run data will be stored for your workspace. | - - > [!NOTE] - > If you don't see this screen, select an existing workspace and go to the next section. - ``` - -### Set up Microsoft Playwright Testing - -Create a file `PlaywrightServiceSetup.cs` in the root directory with the below content - -```C# Snippet:Sample2_SetDefaultAuthenticationMechanism -using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; - -namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace - -[SetUpFixture] -public class PlaywrightServiceSetup : PlaywrightServiceNUnit {}; -``` - -> [!NOTE] -> Make sure your project uses `Microsoft.Playwright.NUnit` version 1.37 or above. - -### Obtain region endpoint - -1. In the [Playwright portal](https://aka.ms/mpt/portal), copy the command under **Add region endpoint in your set up**. - - ![Set workspace endpoint](https://github.com/microsoft/playwright-testing-service/assets/12104064/d81ca629-2b23-4d34-8b70-67b6f7061a83) - - The endpoint URL corresponds to the workspace region. You might see a different endpoint URL in the Playwright portal, depending on the region you selected when creating the workspace. - -### Set up environment - -Ensure that the `PLAYWRIGHT_SERVICE_URL` that you obtained in previous step is available in your environment. - -### Run the tests - -Run Playwright tests against browsers managed by the service using the configuration you created above. - -```dotnetcli -dotnet test --logger "microsoft-playwright-testing" -``` - -## Key concepts - -Key concepts of the Microsoft Playwright Testing NUnit SDK for .NET can be found [here](https://aka.ms/mpt/what-is-mpt) - -## Examples - -Code samples for using this SDK can be found in the following locations -- [.NET Microsoft Playwright Testing NUnit Library Code Samples](https://aka.ms/mpt/sample) - -## Troubleshooting - -- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). -- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. - -## Next steps - -- Run tests in a [CI/CD pipeline.](https://aka.ms/mpt/configure-pipeline) - -- Learn how to [manage access](https://aka.ms/mpt/manage-access) to the created workspace. - -- Experiment with different number of workers to [determine the optimal configuration of your test suite](https://aka.ms/mpt/parallelism). - -## Contributing -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. For -details, visit [cla.microsoft.com][cla]. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. -For more information see the [Code of Conduct FAQ][coc_faq] or contact -[opencode@microsoft.com][coc_contact] with any additional questions or comments. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.net8.0.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.net8.0.cs deleted file mode 100644 index 64cd0a6c655d..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.net8.0.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Azure.Developer.MicrosoftPlaywrightTesting.NUnit -{ - [NUnit.Framework.SetUpFixtureAttribute] - public partial class PlaywrightServiceNUnit : Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightService - { - public PlaywrightServiceNUnit(Azure.Core.TokenCredential? credential = null) : base (default(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions), default(Azure.Core.TokenCredential), default(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface.IFrameworkLogger)) { } - public static Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions playwrightServiceOptions { get { throw null; } } - [NUnit.Framework.OneTimeSetUpAttribute] - public System.Threading.Tasks.Task SetupAsync() { throw null; } - [NUnit.Framework.OneTimeTearDownAttribute] - public void Teardown() { } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.netstandard2.0.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.netstandard2.0.cs deleted file mode 100644 index 64cd0a6c655d..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/api/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.netstandard2.0.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Azure.Developer.MicrosoftPlaywrightTesting.NUnit -{ - [NUnit.Framework.SetUpFixtureAttribute] - public partial class PlaywrightServiceNUnit : Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightService - { - public PlaywrightServiceNUnit(Azure.Core.TokenCredential? credential = null) : base (default(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions), default(Azure.Core.TokenCredential), default(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface.IFrameworkLogger)) { } - public static Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions playwrightServiceOptions { get { throw null; } } - [NUnit.Framework.OneTimeSetUpAttribute] - public System.Threading.Tasks.Task SetupAsync() { throw null; } - [NUnit.Framework.OneTimeTearDownAttribute] - public void Teardown() { } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/README.md deleted file mode 100644 index 218796676686..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/README.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -page_type: sample -languages: -- csharp -products: -- azure -- playwright-testing -name: Azure.Developer.MicrosoftPlaywrightTesting.NUnit samples for .NET -description: Samples for the Azure.Developer.MicrosoftPlaywrightTesting.NUnit client library ---- - -# Azure.Developer.MicrosoftPlaywrightTesting.NUnit samples for .NET - -- [Customising service parameters] -- [Set default authentication mechanism] \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md deleted file mode 100644 index 1b38fca7dbab..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md +++ /dev/null @@ -1,113 +0,0 @@ -## Learn about different available service parameters and how to use them - -Follow the steps listed in this [README] to integrate your existing Playwright test suite with the Microsoft Playwright Testing service. - -This guide explains the different options available to you in the Azure.Developer.MicrosoftPlaywrightTesting.NUnit package and how to use them. - -### Using .runsettings file - -1. Create a `.runsettings` file in the root directory: - -```xml - - - - - - - - - - - - - - - - - - -``` - - > [!NOTE] - > You can also modify the runid by setting the environment variable `PLAYWRIGHT_SERVICE_RUN_ID`. - -2. Run tests using the above `.runsettings` file: - -```dotnetcli -dotnet test --settings .runsettings -``` - -#### Known issue: Minimal support for Azure Identity library credentials - -This issue only impacts the reporting feature. Currently, the service provides minimal support for the following [Azure Credential types.](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes) - -Along with this, we also support passing a Managed Identity ClientId to be used along with `DefaultAzureCredential` and `ManagedIdentityCredential`. - -If you only want to use cloud-hosted browsers along with your tests, you can disable the reporting feature by removing the logger from the runsettings file and then modify the `PlaywrightServiceSetup.cs` file as per the following. - -```C# Snippet:Sample1_CustomisingServiceParameters -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; -using Azure.Identity; - -namespace PlaywrightTests.Sample1; // Remember to change this as per your project namespace - -[SetUpFixture] -public class PlaywrightServiceSetup : PlaywrightServiceNUnit -{ - public static readonly TokenCredential managedIdentityCredential = new ManagedIdentityCredential(); - - public PlaywrightServiceSetup() : base(managedIdentityCredential) {} -} -``` - -## Options - -1. **`Os`**: - - **Description**: This setting allows you to choose the operating system where the browsers running Playwright tests will be hosted. - - **Available Options**: - - `System.Runtime.InteropServices.OSPlatform.Windows` for Windows OS. - - `System.Runtime.InteropServices.OSPlatform.LINUX` for Linux OS. - - **Default Value**: `System.Runtime.InteropServices.OSPlatform.LINUX` - -2. **`RunId`**: - - **Description**: This setting allows you to set a unique ID for every test run to distinguish them in the service portal. - -3. **`ExposeNetwork`**: - - **Description**: This settings exposes network available on the connecting client to the browser being connected to. - -4. **`ServiceAuthType`** - - **Description**: This setting allows you to specify the default authentication mechanism to be used for sending requests to the service. - - **Available Options**: - - `ServiceAuthType.EntraId` for Microsoft Entra ID authentication. - - `ServiceAuthType.AccessToken` for MPT Access Token authentication. - - **Default Value**: `ServiceAuthType.EntraId` - -5. **`UseCloudHostedBrowsers`** - - **Description**: This setting allows you to select whether to use cloud-hosted browsers to run your Playwright tests. Reporting features remain available even if you disable this setting. - - **Default Value**: `true` - -6. **`AzureTokenCredentialType`**: - - **Description**: This setting allows you to select the authentication method you want to use with Entra. - - **Available Options**: - - `AzureTokenCredentialType.EnvironmentCredential` - - `AzureTokenCredentialType.WorkloadIdentityCredential` - - `AzureTokenCredentialType.ManagedIdentityCredential` - - `AzureTokenCredentialType.SharedTokenCacheCredential` - - `AzureTokenCredentialType.VisualStudioCredential` - - `AzureTokenCredentialType.VisualStudioCodeCredential` - - `AzureTokenCredentialType.AzureCliCredential` - - `AzureTokenCredentialType.AzurePowerShellCredential` - - `AzureTokenCredentialType.AzureDeveloperCliCredential` - - `AzureTokenCredentialType.InteractiveBrowserCredential` - - `AzureTokenCredentialType.DefaultAzureCredential` - - **Default Value**: `AzureTokenCredentialType.DefaultAzureCredential` - -7. **`ManagedIdentityClientId`** - - **Description**: This setting allows you to specify the managed identity client id to be used for Microsoft Entra Id authentication. - -8. **`EnableGitHubSummary`**: - - **Description**: This setting allows you to configure the Microsoft Playwright Testing service reporter. You can choose whether to include the test run summary in the GitHub summary when running in GitHub Actions. - - **Default Value**: `true` - diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md deleted file mode 100644 index 4aa5d76732fd..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md +++ /dev/null @@ -1,57 +0,0 @@ -# How to authenticate to Microsoft Playwright Testing service using service access token. - -Follow the steps listed in this [README] to integrate your existing Playwright test suite with the Microsoft Playwright Testing service. - -This guide will walk you through the steps to integrate your Playwright project where you are launching browsers from within the tests with the service. - -### Setup Microsoft Playwright Testing - -1. Create a file `PlaywrightServiceSetup.cs` in the root directory with the following - -```C# Snippet:Sample2_SetDefaultAuthenticationMechanism -using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; - -namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace - -[SetUpFixture] -public class PlaywrightServiceSetup : PlaywrightServiceNUnit {}; -``` - -2. Create a .runsettings file to modify default authentication mechanism. - -```xml - - - - - - - -``` - -> [!NOTE] -> Make sure your project uses Microsoft.Playwright.NUnit version 1.37 or above. - -### Obtain region endpoint - -1. In the [Playwright portal](https://aka.ms/mpt/portal), copy the command under **Add region endpoint in your set up**. - - ![Set workspace endpoint](https://github.com/microsoft/playwright-testing-service/assets/12104064/d81ca629-2b23-4d34-8b70-67b6f7061a83) - - The endpoint URL corresponds to the workspace region. You might see a different endpoint URL in the Playwright portal, depending on the region you selected when creating the workspace. - -### Set up environment - -Ensure that the `PLAYWRIGHT_SERVICE_URL` that you obtained in previous step is available in your environment. - -### Authenticate the client - -To learn more about options for Microsoft Entra Id authentication, refer to [Azure.Identity credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#credentials). You can also refer to [our samples] on how to configurate different Azure Identity credentials. - -### Run the tests - -Run Playwright tests against browsers managed by the service using the configuration you created above. - -```dotnetcli -dotnet test --settings .runsettings -``` diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj deleted file mode 100644 index 3899341013bd..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - Azure, Cloud, Playwright, Playwright Service, Reporting, Playwright Testing - - Package to integrate your Playwright test suite with Microsoft Playwright Testing - service - - 1.0.0-beta.5 - true - $(RequiredTargetFrameworks) - enable - - - - - - \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/NUnitFrameworkLogger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/NUnitFrameworkLogger.cs deleted file mode 100644 index 806da1719711..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/NUnitFrameworkLogger.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using NUnit.Framework; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.NUnit -{ - internal class NUnitFrameworkLogger : IFrameworkLogger - { - public void Debug(string message) - { - TestContext.WriteLine($"[MPT-NUnit]: {message}"); - } - - public void Error(string message) - { - TestContext.Error.WriteLine($"[MPT-NUnit]: {message}"); - } - - public void Info(string message) - { - TestContext.Progress.WriteLine($"[MPT-NUnit]: {message}"); - } - - public void Warning(string message) - { - TestContext.Progress.WriteLine($"[MPT-NUnit]: {message}"); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/PlaywrightServiceNUnit.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/PlaywrightServiceNUnit.cs deleted file mode 100644 index 547be80ea777..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/src/PlaywrightServiceNUnit.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using NUnit.Framework; -using System.Threading.Tasks; -using System.Runtime.InteropServices; -using System; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.NUnit; - -/// -/// NUnit setup fixture to initialize Playwright Service. -/// -[SetUpFixture] -public class PlaywrightServiceNUnit : PlaywrightService -{ - private static NUnitFrameworkLogger nunitFrameworkLogger { get; } = new(); - /// - /// Initializes a new instance of the class. - /// - /// The azure token credential to use for authentication. - public PlaywrightServiceNUnit(TokenCredential? credential = null) - : base(playwrightServiceOptions, credential: credential, frameworkLogger: nunitFrameworkLogger) - { - } - - /// - /// Creates a new instance of based on the runsettings file. - /// - public static PlaywrightServiceOptions playwrightServiceOptions { get; } = new( - os: GetOsPlatform(TestContext.Parameters.Get(RunSettingKey.Os)), - runId: TestContext.Parameters.Get(RunSettingKey.RunId), - exposeNetwork: TestContext.Parameters.Get(RunSettingKey.ExposeNetwork), - serviceAuth: TestContext.Parameters.Get(RunSettingKey.ServiceAuthType), - useCloudHostedBrowsers: TestContext.Parameters.Get(RunSettingKey.UseCloudHostedBrowsers), - azureTokenCredentialType: TestContext.Parameters.Get(RunSettingKey.AzureTokenCredentialType), - managedIdentityClientId: TestContext.Parameters.Get(RunSettingKey.ManagedIdentityClientId) - ); - - /// - /// Setup the resources utilized by Playwright service. - /// - /// - [OneTimeSetUp] - public async Task SetupAsync() - { - if (!UseCloudHostedBrowsers) - return; - nunitFrameworkLogger.Info("\nRunning tests using Microsoft Playwright Testing service.\n"); - - await InitializeAsync().ConfigureAwait(false); - } - - /// - /// Tear down resources utilized by Playwright service. - /// - [OneTimeTearDown] - public void Teardown() - { - Cleanup(); - } - - private static OSPlatform? GetOsPlatform(string? os) - { - if (string.IsNullOrEmpty(os)) - { - return null; - } - else if (os!.Equals("Windows", StringComparison.OrdinalIgnoreCase)) - { - return OSPlatform.Windows; - } - else if (os.Equals("Linux", StringComparison.OrdinalIgnoreCase)) - { - return OSPlatform.Linux; - } - return null; - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj deleted file mode 100644 index 876d71881eb3..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/Azure.Developer.MicrosoftPlaywrightTesting.NUnit.Tests.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - enable - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/README.md deleted file mode 100644 index ecd5c103e8fe..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Source files in this directory are written as tests from which samples are extracted. -They are not intended to be viewed directly and help ensure our samples compile and work correctly. -See our [list of samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples) for more explanation about how to use this client library. \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample1_CustomisingServiceParameters.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample1_CustomisingServiceParameters.cs deleted file mode 100644 index faa0cf5fa671..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample1_CustomisingServiceParameters.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#region Snippet:Sample1_CustomisingServiceParameters -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; -using Azure.Identity; - -namespace PlaywrightTests.Sample1; // Remember to change this as per your project namespace - -[SetUpFixture] -#if SNIPPET -public class PlaywrightServiceSetup : PlaywrightServiceNUnit -#else -public class Sample1ServiceSetup : PlaywrightServiceNUnit -#endif -{ - public static readonly TokenCredential managedIdentityCredential = new ManagedIdentityCredential(); - -#if SNIPPET - public PlaywrightServiceSetup() : base(managedIdentityCredential) {} -#else - public Sample1ServiceSetup() : base(managedIdentityCredential) {} -#endif -} -#endregion diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample2_SetDefaultAuthenticationMechanism.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample2_SetDefaultAuthenticationMechanism.cs deleted file mode 100644 index a62c8c9cc517..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/tests/samples/Sample2_SetDefaultAuthenticationMechanism.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#region Snippet:Sample2_SetDefaultAuthenticationMechanism -using Azure.Developer.MicrosoftPlaywrightTesting.NUnit; - -namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace - -[SetUpFixture] -#if SNIPPET -public class PlaywrightServiceSetup : PlaywrightServiceNUnit {}; -#else -public class Sample2ServiceSetup : PlaywrightServiceNUnit { }; -#endif -#endregion diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.sln b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.sln deleted file mode 100644 index 127dd846d079..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Developer.MicrosoftPlaywrightTesting.TestLogger", "src\Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj", "{2C1F9880-AD7D-433E-A73E-43F503772CD8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests", "tests\Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj", "{6C78D318-9B96-43B4-97A7-7B3C8088983C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2C1F9880-AD7D-433E-A73E-43F503772CD8}.Release|Any CPU.Build.0 = Release|Any CPU - {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6C78D318-9B96-43B4-97A7-7B3C8088983C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C3BE422E-8FFF-4EF8-BA89-186F153965D8} - EndGlobalSection -EndGlobal diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/CHANGELOG.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/CHANGELOG.md deleted file mode 100644 index 54afcfa4ff19..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/CHANGELOG.md +++ /dev/null @@ -1,51 +0,0 @@ -# Release History - -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.4 (2025-01-17) - -### Features Added - -- Warning message when MPT access token is close to expiry - -### Bugs Fixed - -- Max character limits in reporting API calls - -## 1.0.0-beta.3 (2024-11-18) - -### Features Added - -- Added a runName field which allows customers to customize the display name when using the reporting feature. -- Added stacktrace into error list. - -### Bugs Fixed - -- Fixed a bug where the upload buffer and upload file methods were not awaited, which sometimes resulted in 404 errors in the web application. -- Fixed a bug where the authentication error occurred when the scalable scenario was disabled in Playwright testing. -- Fixed a bug where the GetConnectOptionsAsync method did not use the runsetting defaults in Playwright testing. - -### Other Changes - -- Populated NumberOfTestWorkers from runsettings. - -## 1.0.0-beta.2 (2024-11-05) - -### Features Added - -- Added support for publishing test results and artifacts to the service from the client. - -## 1.0.0-beta.1 (2024-10-23) - -### Features Added - -- Added authentication using Microsoft Entra ID for the service. -- Added reporting capabilities for the service. You can now publish the reports and artifacts generated by Playwright OSS to the service. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.md deleted file mode 100644 index adfcc756d6d4..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# Microsoft Azure Playwright Testing client library for .NET - -Microsoft Playwright Testing is a fully managed service that uses the cloud to enable you to run Playwright tests with much higher parallelization across different operating system-browser combinations simultaneously. This means faster test runs with broader scenario coverage, which helps speed up delivery of features without sacrificing quality. The service also enables you to publish test results and related artifacts to the service and view them in the service portal enabling faster and easier troubleshooting. With Microsoft Playwright Testing service, you can release features faster and more confidently. - -## Getting started - -### Install the package - -Install the client library for .NET with [NuGet](https://www.nuget.org/): - -```dotnetcli -dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.TestLogger --prerelease -``` - -### Authenticate the client - -To learn more about options for Microsoft Entra Id authentication, refer to [Azure.Identity credentials](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#credentials). You can also refer to [our samples] on how to configurate different Azure Identity credentials. - -### Prerequisites - -- An [Azure subscription](https://azure.microsoft.com/free/dotnet/) -- Your Azure account must be assigned the [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner), [Contributor](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#contributor), or one of the [classic administrator roles](https://learn.microsoft.com/azure/role-based-access-control/rbac-and-directory-admin-roles#classic-subscription-administrator-roles). - -## Useful links -- [Quickstart: Run end-to-end tests at scale](https://aka.ms/mpt/quickstart) -- [Quickstart: Set up continuous end-to-end testing across different browsers and operating systems](https://aka.ms/mpt/ci) -- [Explore features and benefits](https://aka.ms/mpt/about) -- [View Microsoft Playwright Testing service demo](https://youtu.be/GenC1jAeTZE) -- [Documentation](https://aka.ms/mpt/docs) -- [Pricing](https://aka.ms/mpt/pricing) -- [Share feedback](https://aka.ms/mpt/feedback) - -## Key concepts - -Key concepts of the Microsoft Playwright Testing NUnit SDK for .NET can be found [here](https://aka.ms/mpt/what-is-mpt) - -## Examples - -Code samples for using this SDK can be found in the following locations -- [.NET Microsoft Playwright Testing NUnit Library Code Samples](https://aka.ms/mpt/sample) - -## Troubleshooting - -- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). -- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. - -## Next steps - -- Run tests in a [CI/CD pipeline.](https://aka.ms/mpt/configure-pipeline) - -- Learn how to [manage access](https://aka.ms/mpt/manage-access) to the created workspace. - -- Experiment with different number of workers to [determine the optimal configuration of your test suite](https://aka.ms/mpt/parallelism). - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. For -details, visit [cla.microsoft.com][cla]. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. -For more information see the [Code of Conduct FAQ][coc_faq] or contact -[opencode@microsoft.com][coc_contact] with any additional questions or comments. diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.net8.0.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.net8.0.cs deleted file mode 100644 index e9db853b9e0d..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.net8.0.cs +++ /dev/null @@ -1,79 +0,0 @@ -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger -{ - public partial class ConnectOptions where T : class, new() - { - public ConnectOptions() { } - public T? Options { get { throw null; } set { } } - public string? WsEndpoint { get { throw null; } set { } } - } - public partial class PlaywrightService - { - public PlaywrightService(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions playwrightServiceOptions, Azure.Core.TokenCredential? credential = null, Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface.IFrameworkLogger? frameworkLogger = null) { } - public PlaywrightService(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = default(bool?), Azure.Core.TokenCredential? credential = null, Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface.IFrameworkLogger? frameworkLogger = null) { } - public string? ExposeNetwork { get { throw null; } set { } } - public System.Runtime.InteropServices.OSPlatform? Os { get { throw null; } set { } } - public System.Threading.Timer? RotationTimer { get { throw null; } set { } } - public string? RunId { get { throw null; } set { } } - public string ServiceAuth { get { throw null; } set { } } - public static string? ServiceEndpoint { get { throw null; } } - public bool UseCloudHostedBrowsers { get { throw null; } set { } } - public void Cleanup() { } - public System.Threading.Tasks.Task> GetConnectOptionsAsync(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class, new() { throw null; } - public System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class PlaywrightServiceOptions - { - public PlaywrightServiceOptions(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, string? useCloudHostedBrowsers = null, string? azureTokenCredentialType = null, string? managedIdentityClientId = null) { } - } - public partial class RunSettingKey - { - public static readonly string AzureTokenCredentialType; - public static readonly string EnableGitHubSummary; - public static readonly string EnableResultPublish; - public static readonly string ExposeNetwork; - public static readonly string ManagedIdentityClientId; - public static readonly string NumberOfTestWorkers; - public static readonly string Os; - public static readonly string RunId; - public static readonly string RunName; - public static readonly string ServiceAuthType; - public static readonly string UseCloudHostedBrowsers; - public RunSettingKey() { } - } - public partial class ServiceAuthType - { - public static readonly string AccessToken; - public static readonly string EntraId; - public ServiceAuthType() { } - } - public partial class ServiceEnvironmentVariable - { - public static readonly string PlaywrightServiceAccessToken; - public static readonly string PlaywrightServiceExposeNetwork; - public static readonly string PlaywrightServiceOs; - public static readonly string PlaywrightServiceRunId; - public static readonly string PlaywrightServiceUri; - public ServiceEnvironmentVariable() { } - } -} -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client -{ - public partial class TestReportingClientOptions : Azure.Core.ClientOptions - { - public TestReportingClientOptions(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion version = Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion.V2024_09_01_Preview) { } - public enum ServiceVersion - { - V2024_09_01_Preview = 1, - } - } -} -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - public partial interface IFrameworkLogger - { - void Debug(string message); - void Error(string message); - void Info(string message); - void Warning(string message); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs deleted file mode 100644 index e9db853b9e0d..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs +++ /dev/null @@ -1,79 +0,0 @@ -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger -{ - public partial class ConnectOptions where T : class, new() - { - public ConnectOptions() { } - public T? Options { get { throw null; } set { } } - public string? WsEndpoint { get { throw null; } set { } } - } - public partial class PlaywrightService - { - public PlaywrightService(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.PlaywrightServiceOptions playwrightServiceOptions, Azure.Core.TokenCredential? credential = null, Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface.IFrameworkLogger? frameworkLogger = null) { } - public PlaywrightService(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = default(bool?), Azure.Core.TokenCredential? credential = null, Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface.IFrameworkLogger? frameworkLogger = null) { } - public string? ExposeNetwork { get { throw null; } set { } } - public System.Runtime.InteropServices.OSPlatform? Os { get { throw null; } set { } } - public System.Threading.Timer? RotationTimer { get { throw null; } set { } } - public string? RunId { get { throw null; } set { } } - public string ServiceAuth { get { throw null; } set { } } - public static string? ServiceEndpoint { get { throw null; } } - public bool UseCloudHostedBrowsers { get { throw null; } set { } } - public void Cleanup() { } - public System.Threading.Tasks.Task> GetConnectOptionsAsync(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class, new() { throw null; } - public System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class PlaywrightServiceOptions - { - public PlaywrightServiceOptions(System.Runtime.InteropServices.OSPlatform? os = default(System.Runtime.InteropServices.OSPlatform?), string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, string? useCloudHostedBrowsers = null, string? azureTokenCredentialType = null, string? managedIdentityClientId = null) { } - } - public partial class RunSettingKey - { - public static readonly string AzureTokenCredentialType; - public static readonly string EnableGitHubSummary; - public static readonly string EnableResultPublish; - public static readonly string ExposeNetwork; - public static readonly string ManagedIdentityClientId; - public static readonly string NumberOfTestWorkers; - public static readonly string Os; - public static readonly string RunId; - public static readonly string RunName; - public static readonly string ServiceAuthType; - public static readonly string UseCloudHostedBrowsers; - public RunSettingKey() { } - } - public partial class ServiceAuthType - { - public static readonly string AccessToken; - public static readonly string EntraId; - public ServiceAuthType() { } - } - public partial class ServiceEnvironmentVariable - { - public static readonly string PlaywrightServiceAccessToken; - public static readonly string PlaywrightServiceExposeNetwork; - public static readonly string PlaywrightServiceOs; - public static readonly string PlaywrightServiceRunId; - public static readonly string PlaywrightServiceUri; - public ServiceEnvironmentVariable() { } - } -} -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client -{ - public partial class TestReportingClientOptions : Azure.Core.ClientOptions - { - public TestReportingClientOptions(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion version = Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion.V2024_09_01_Preview) { } - public enum ServiceVersion - { - V2024_09_01_Preview = 1, - } - } -} -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - public partial interface IFrameworkLogger - { - void Debug(string message); - void Error(string message); - void Info(string message); - void Warning(string message); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/AssemblyInfo.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/AssemblyInfo.cs deleted file mode 100644 index a50e22574711..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/AssemblyInfo.cs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj deleted file mode 100644 index 123cb04e2432..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - Azure, Cloud, Playwright, Playwright Service, Reporting, Playwright Testing - - Package to integrate your Playwright test suite with Microsoft Playwright Testing - service - - 1.0.0-beta.5 - true - $(RequiredTargetFrameworks) - enable - true - - - - - - - - - \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/Internal/Argument.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/Internal/Argument.cs deleted file mode 100644 index 825022ea323c..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/Internal/Argument.cs +++ /dev/null @@ -1,129 +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; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client -{ - internal static class Argument - { - public static void AssertNotNull(T value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - } - - public static void AssertNotNull(T? value, string name) - where T : struct - { - if (!value.HasValue) - { - throw new ArgumentNullException(name); - } - } - - public static void AssertNotNullOrEmpty(IEnumerable value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (value is ICollection collectionOfT && collectionOfT.Count == 0) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - if (value is ICollection collection && collection.Count == 0) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - using IEnumerator e = value.GetEnumerator(); - if (!e.MoveNext()) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - } - - public static void AssertNotNullOrEmpty(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (value.Length == 0) - { - 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClient.cs deleted file mode 100644 index 12944db1f0f6..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClient.cs +++ /dev/null @@ -1,473 +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.Core.Pipeline; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client -{ - // Data plane generated client. - /// The TestReporting service client. - internal partial class TestReportingClient - { - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// The HTTP pipeline for sending and receiving REST requests and responses. - public virtual HttpPipeline Pipeline => _pipeline; - - /// Initializes a new instance of TestReportingClient for mocking. - protected TestReportingClient() - { - } - - /// Initializes a new instance of TestReportingClient. - /// server parameter. - /// is null. - public TestReportingClient(Uri endpoint) : this(endpoint, new TestReportingClientOptions()) - { - } - - /// Initializes a new instance of TestReportingClient. - /// server parameter. - /// The options for configuring the client. - /// is null. - public TestReportingClient(Uri endpoint, TestReportingClientOptions options) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - options ??= new TestReportingClientOptions(); - - ClientDiagnostics = new ClientDiagnostics(options, true); - _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), Array.Empty(), new ResponseClassifier()); - _endpoint = endpoint; - _apiVersion = options.Version; - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The content to send as the body of the request. - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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 UploadBatchTestResultsAsync(string workspaceId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.UploadBatchTestResults"); - scope.Start(); - try - { - using HttpMessage message = CreateUploadBatchTestResultsRequest(workspaceId, content, authorization, xCorrelationId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The content to send as the body of the request. - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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 Response UploadBatchTestResults(string workspaceId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.UploadBatchTestResults"); - scope.Start(); - try - { - using HttpMessage message = CreateUploadBatchTestResultsRequest(workspaceId, content, authorization, xCorrelationId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The to use. - /// The content to send as the body of the request. - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task PatchTestRunInfoAsync(string workspaceId, string testRunId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PatchTestRunInfo"); - scope.Start(); - try - { - using HttpMessage message = CreatePatchTestRunInfoRequest(workspaceId, testRunId, content, authorization, xCorrelationId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The to use. - /// The content to send as the body of the request. - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response PatchTestRunInfo(string workspaceId, string testRunId, RequestContent content, string authorization = null, string xCorrelationId = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PatchTestRunInfo"); - scope.Start(); - try - { - using HttpMessage message = CreatePatchTestRunInfoRequest(workspaceId, testRunId, content, authorization, xCorrelationId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The to use. - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task GetTestRunResultsUriAsync(string workspaceId, string testRunId, string authorization, string xCorrelationId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.GetTestRunResultsUri"); - scope.Start(); - try - { - using HttpMessage message = CreateGetTestRunResultsUriRequest(workspaceId, testRunId, authorization, xCorrelationId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The to use. - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response GetTestRunResultsUri(string workspaceId, string testRunId, string authorization, string xCorrelationId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.GetTestRunResultsUri"); - scope.Start(); - try - { - using HttpMessage message = CreateGetTestRunResultsUriRequest(workspaceId, testRunId, authorization, xCorrelationId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The to use. - /// The content to send as the body of the request. - /// Body Parameter content-type. Allowed values: "application/*+json" | "application/json" | "application/json-patch+json" | "text/json". - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task PostTestRunShardInfoAsync(string workspaceId, string testRunId, RequestContent content, ContentType contentType, string authorization = null, string xCorrelationId = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PostTestRunShardInfo"); - scope.Start(); - try - { - using HttpMessage message = CreatePostTestRunShardInfoRequest(workspaceId, testRunId, content, contentType, authorization, xCorrelationId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The to use. - /// The to use. - /// The content to send as the body of the request. - /// Body Parameter content-type. Allowed values: "application/*+json" | "application/json" | "application/json-patch+json" | "text/json". - /// access token. - /// Correlation-id used for tracing and debugging. - /// The request context, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response PostTestRunShardInfo(string workspaceId, string testRunId, RequestContent content, ContentType contentType, string authorization = null, string xCorrelationId = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); - Argument.AssertNotNullOrEmpty(testRunId, nameof(testRunId)); - - using var scope = ClientDiagnostics.CreateScope("TestReportingClient.PostTestRunShardInfo"); - scope.Start(); - try - { - using HttpMessage message = CreatePostTestRunShardInfoRequest(workspaceId, testRunId, content, contentType, authorization, xCorrelationId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - internal HttpMessage CreateUploadBatchTestResultsRequest(string workspaceId, RequestContent content, string authorization, string xCorrelationId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/workspaces/", false); - uri.AppendPath(workspaceId, true); - uri.AppendPath("/test-results/upload-batch", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (authorization != null) - { - request.Headers.Add("Authorization", authorization); - } - if (xCorrelationId != null) - { - request.Headers.Add("x-correlation-id", xCorrelationId); - } - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreatePatchTestRunInfoRequest(string workspaceId, string testRunId, RequestContent content, string authorization, string xCorrelationId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/workspaces/", false); - uri.AppendPath(workspaceId, true); - uri.AppendPath("/test-runs/", false); - uri.AppendPath(testRunId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (authorization != null) - { - request.Headers.Add("Authorization", authorization); - } - if (xCorrelationId != null) - { - request.Headers.Add("x-correlation-id", xCorrelationId); - } - request.Headers.Add("Content-Type", "application/merge-patch+json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetTestRunResultsUriRequest(string workspaceId, string testRunId, string authorization, string xCorrelationId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/workspaces/", false); - uri.AppendPath(workspaceId, true); - uri.AppendPath("/test-runs/", false); - uri.AppendPath(testRunId, true); - uri.AppendPath(":createartifactsuploadbaseuri", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (authorization != null) - { - request.Headers.Add("Authorization", authorization); - } - if (xCorrelationId != null) - { - request.Headers.Add("x-correlation-id", xCorrelationId); - } - return message; - } - - internal HttpMessage CreatePostTestRunShardInfoRequest(string workspaceId, string testRunId, RequestContent content, ContentType contentType, string authorization, string xCorrelationId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/workspaces/", false); - uri.AppendPath(workspaceId, true); - uri.AppendPath("/test-runs/", false); - uri.AppendPath(testRunId, true); - uri.AppendPath(":updateshardexecutionstatus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (authorization != null) - { - request.Headers.Add("Authorization", authorization); - } - if (xCorrelationId != null) - { - request.Headers.Add("x-correlation-id", xCorrelationId); - } - request.Headers.Add("Content-Type", contentType.ToString()); - request.Content = content; - return message; - } - - private static ResponseClassifier _responseClassifier200; - private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClientOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClientOptions.cs deleted file mode 100644 index 8416fd53cc7b..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/TestReportingClientOptions.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client -{ - /// Client options for TestReportingClient. - public partial class TestReportingClientOptions : ClientOptions - { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_09_01_Preview; - - /// The version of the service to use. - public enum ServiceVersion - { - /// Service version "2024-09-01-preview". - V2024_09_01_Preview = 1, - } - - internal string Version { get; } - - /// Initializes new instance of TestReportingClientOptions. - public TestReportingClientOptions(ServiceVersion version = LatestVersion) - { - Version = version switch - { - ServiceVersion.V2024_09_01_Preview => "2024-09-01-preview", - _ => throw new NotSupportedException() - }; - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/ConnectOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/ConnectOptions.cs deleted file mode 100644 index 81c426f271c5..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/ConnectOptions.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; - -/// -/// Represents the connect options for a generic type. -/// -/// The type parameter. -public class ConnectOptions where T : class, new() -{ - /// - /// A browser websocket endpoint to connect to. - /// - public string? WsEndpoint { get; set; } - /// - /// Connect options for the service. - /// - public T? Options { get; set; } -} - -internal class BrowserConnectOptions -{ - public string? ExposeNetwork { get; set; } - public IEnumerable>? Headers { get; set; } - public float? SlowMo { get; set; } - public float? Timeout { get; set; } -} - -internal static class BrowserConnectOptionsConverter -{ - public static T Convert(object source) where T : class, new() - { - var target = new T(); - System.Type sourceType = source.GetType(); - System.Type targetType = typeof(T); - - foreach (System.Reflection.PropertyInfo? sourceProperty in sourceType.GetProperties()) - { - System.Reflection.PropertyInfo? targetProperty = targetType.GetProperty(sourceProperty.Name); - if (targetProperty != null && targetProperty.CanWrite) - { - targetProperty.SetValue(target, sourceProperty.GetValue(source)); - } - } - - return target; - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Constants.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Constants.cs deleted file mode 100644 index 9922c77b43bd..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Constants.cs +++ /dev/null @@ -1,427 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; - -/// -/// Contains environment variable names used by the Playwright service. -/// -public class ServiceEnvironmentVariable -{ - /// - /// The environment variable for the Playwright service access token. - /// - public static readonly string PlaywrightServiceAccessToken = "PLAYWRIGHT_SERVICE_ACCESS_TOKEN"; - - /// - /// The environment variable for the Playwright service URL. - /// - public static readonly string PlaywrightServiceUri = "PLAYWRIGHT_SERVICE_URL"; - - /// - /// The environment variable for exposing the Playwright service network. - /// - public static readonly string PlaywrightServiceExposeNetwork = "PLAYWRIGHT_SERVICE_EXPOSE_NETWORK"; - - /// - /// The environment variable for the Playwright service operating system. - /// - public static readonly string PlaywrightServiceOs = "PLAYWRIGHT_SERVICE_OS"; - - /// - /// The environment variable for the Playwright service run ID. - /// - public static readonly string PlaywrightServiceRunId = "PLAYWRIGHT_SERVICE_RUN_ID"; -}; - -/// -/// Contains constants for supported operating systems on Microsoft Playwright Testing. -/// -internal class ServiceOs -{ - /// - /// Linux operating system. - /// - public static readonly string Linux = "linux"; - - /// - /// Windows operating system. - /// - public static readonly string Windows = "windows"; -}; - -/// -/// Contains constants for authentication methods. -/// -public class ServiceAuthType -{ - /// - /// Entra ID authentication method. - /// - public static readonly string EntraId = "EntraId"; - - /// - /// Access token authentication method. - /// - public static readonly string AccessToken = "AccessToken"; -}; - -/// -/// Contains constants for Azure token credential types. -/// -internal class AzureTokenCredentialType -{ - /// - /// Environment Credential. - /// - public static readonly string EnvironmentCredential = "EnvironmentCredential"; - - /// - /// Workload Identity Credential. - /// - public static readonly string WorkloadIdentityCredential = "WorkloadIdentityCredential"; - - /// - /// Managed Identity Credential. - /// - public static readonly string ManagedIdentityCredential = "ManagedIdentityCredential"; - - /// - /// Shared Token Cache Credential. - /// - public static readonly string SharedTokenCacheCredential = "SharedTokenCacheCredential"; - - /// - /// Visual Studio Credential. - /// - public static readonly string VisualStudioCredential = "VisualStudioCredential"; - - /// - /// Azure CLI Credential. - /// - public static readonly string AzureCliCredential = "AzureCliCredential"; - - /// - /// Azure PowerShell Credential. - /// - public static readonly string AzurePowerShellCredential = "AzurePowerShellCredential"; - - /// - /// Azure Developer CLI Credential. - /// - public static readonly string AzureDeveloperCliCredential = "AzureDeveloperCliCredential"; - - /// - /// Interactive Browser Credential. - /// - public static readonly string InteractiveBrowserCredential = "InteractiveBrowserCredential"; - - /// - /// Default Azure Credential. - /// - public static readonly string DefaultAzureCredential = "DefaultAzureCredential"; -} - -/// -/// Contains constants for run setting keys. -/// -public class RunSettingKey -{ - /// - /// The operating system setting key. - /// - public static readonly string Os = "Os"; - - /// - /// The run ID setting key. - /// - public static readonly string RunId = "RunId"; - - /// - /// The expose network setting key. - /// - public static readonly string ExposeNetwork = "ExposeNetwork"; - - /// - /// The default authentication setting key. - /// - public static readonly string ServiceAuthType = "ServiceAuthType"; - - /// - /// The use cloud-hosted browsers setting key. - /// - public static readonly string UseCloudHostedBrowsers = "UseCloudHostedBrowsers"; - - /// - /// The Azure token credential type setting key. - /// - public static readonly string AzureTokenCredentialType = "AzureTokenCredentialType"; - - /// - /// The managed identity client ID setting key. - /// - public static readonly string ManagedIdentityClientId = "ManagedIdentityClientId"; - - /// - /// Enable GitHub summary setting key. - /// - public static readonly string EnableGitHubSummary = "EnableGitHubSummary"; - - /// - /// Enable Result publish. - /// - public static readonly string EnableResultPublish = "EnableResultPublish"; - - /// - /// Number of NUnit test workers. - /// - public static readonly string NumberOfTestWorkers = "NumberOfTestWorkers"; - - /// - /// The run name setting key. - /// - public static readonly string RunName = "RunName"; -} - -internal class Constants -{ - // Default constants - internal static readonly string s_default_os = ServiceOs.Linux; - internal static readonly string s_default_expose_network = ""; - internal static readonly string s_pLAYWRIGHT_SERVICE_DEBUG = "Logging__LogLevel__MicrosoftPlaywrightTesting"; - - // Entra id access token constants - internal static readonly int s_entra_access_token_lifetime_left_threshold_in_minutes_for_rotation = 15; - internal static readonly string[] s_entra_access_token_scopes = new string[] { "https://management.core.windows.net/.default" }; - internal static readonly int s_entra_access_token_rotation_interval_period_in_minutes = 4; - - // Service constants - internal static readonly string s_api_version = "2023-10-01-preview"; - - // Error messages - internal static readonly string s_no_service_endpoint_error_message = "Please set PLAYWRIGHT_SERVICE_URL in your environment variables."; - internal static readonly string s_service_endpoint_removed_since_scalable_execution_disabled_error_message = "GetConnectOptionsAsync() method cannot be used when disableScalableExecution is set to true in the setup file."; - internal static readonly string s_no_auth_error = "Could not authenticate with the service. Please refer to https://aka.ms/mpt/authentication for more information."; - internal static readonly string s_invalid_mpt_pat_error = "The Access Token provided in the environment variable is invalid."; - internal static readonly string s_expired_mpt_pat_error = "The Access Token you are using is expired. Create a new token."; - internal static readonly string s_invalid_os_error = "Invalid operating system, supported values are 'linux' and 'windows'."; - internal static readonly string s_workspace_mismatch_error = "The provided access token does not match the specified workspace URL. Please verify that both values are correct."; - internal static readonly string s_invalid_service_endpoint_error_message = "The service endpoint provided is invalid. Please verify the endpoint URL and try again."; - internal static readonly string s_playwright_service_runId_length_exceeded_error_message = "Error: The Run Id you provided exceeds 200 characters. Please provide a shorter Run ID."; - internal static readonly string s_token_expiry_warning_template = - "Warning: The access token used for this test run will expire in {0} days on {1}. " + - "Generate a new token from the portal to avoid failures. " + - "For a simpler, more secure solution, switch to Microsoft Entra ID and eliminate token management. " + - "https://learn.microsoft.com/en-us/entra/identity/"; - - internal static readonly string s_playwright_service_disable_scalable_execution_environment_variable = "_MPT_DISABLE_SCALABLE_EXECUTION"; - internal static readonly string s_playwright_service_reporting_url_environment_variable = "_MPT_REPORTING_URL"; - internal static readonly string s_playwright_service_workspace_id_environment_variable = "_MPT_WORKSPACE_ID"; - internal static readonly string s_playwright_service_auth_type_environment_variable = "_MPT_AUTH_TYPE"; - internal static readonly string s_playwright_service_one_time_operation_flag_environment_variable = "_MPT_ONE_TIME_OPERATION_FLAG"; - - internal static readonly string s_playwright_service_runName_truncated_warning = "WARNING: Run name exceeds the maximum limit of 200 characters and will be truncated."; - internal static readonly int s_sevenDaysInMs = 7 * 24 * 60 * 60 * 1000; - internal static readonly int s_oneDayInMs = 24 * 60 * 60 * 1000; -} - -internal class OSConstants -{ - internal static readonly string s_lINUX = "LINUX"; - internal static readonly string s_wINDOWS = "WINDOWS"; - internal static readonly string s_mACOS = "MACOS"; -} - -internal class ReporterConstants -{ - internal static readonly string s_executionIdPropertyIdentifier = "ExecutionId"; - internal static readonly string s_parentExecutionIdPropertyIdentifier = "ParentExecId"; - internal static readonly string s_testTypePropertyIdentifier = "TestType"; - internal static readonly string s_sASUriSeparator = "?"; - internal static readonly string s_portalBaseUrl = "https://playwright.microsoft.com/workspaces/"; - internal static readonly string s_reportingRoute = "/runs/"; - internal static readonly string s_reportingAPIVersion_2024_04_30_preview = "2024-04-30-preview"; - internal static readonly string s_reportingAPIVersion_2024_05_20_preview = "2024-05-20-preview"; - internal static readonly string s_pLAYWRIGHT_SERVICE_REPORTING_URL = "_MPT_REPORTING_URL"; - internal static readonly string s_pLAYWRIGHT_SERVICE_WORKSPACE_ID = "_MPT_WORKSPACE_ID"; - internal static readonly string s_aPPLICATION_JSON = "application/json"; - internal static readonly string s_cONFLICT_409_ERROR_MESSAGE = "Test run with id {runId} already exists. Provide a unique run id."; - internal static readonly string s_cONFLICT_409_ERROR_MESSAGE_KEY = "DuplicateRunId"; - - internal static readonly string s_fORBIDDEN_403_ERROR_MESSAGE = @"You do not have the required permissions to upload test results. This could be because - - a. Reporting is not enabled for your workspace {workspaceId}. Enable the Reporting feature under Feature management settings using the Playwright portal: https://playwright.microsoft.com/workspaces/{workspaceId}/settings/general - b. You do not have the required roles on the workspace. Only Owner and Contributor roles can upload test results. Contact the service administrator. - c. The workspace you are trying to run the tests on is in a different Azure tenant than what you are signed into. Check the tenant id from Azure portal (https://aka.ms/mpt/find-tenant-id) and login using the command 'az login --tenant . - "; - internal static readonly string s_fORBIDDEN_403_ERROR_MESSAGE_KEY = "ReportingNotEnabled"; - internal static readonly string s_uNKNOWN_ERROR_MESSAGE = "Unknown error occured."; -} - -internal class CIConstants -{ - internal static readonly string s_gITHUB_ACTIONS = "GITHUB"; - internal static readonly string s_aZURE_DEVOPS = "ADO"; - internal static readonly string s_dEFAULT = "DEFAULT"; -} - -internal class TestCaseResultStatus -{ - internal static readonly string s_pASSED = "PASSED"; - internal static readonly string s_fAILED = "FAILED"; - internal static readonly string s_sKIPPED = "SKIPPED"; - internal static readonly string s_iNCONCLUSIVE = "INCONCLUSIVE"; -} - -internal class TestResultError -{ - internal string? Key { get; set; } = string.Empty; - internal string? Message { get; set; } = string.Empty; - internal Regex Pattern { get; set; } = new Regex(string.Empty); - internal TestErrorType Type { get; set; } -} - -internal enum TestErrorType -{ - Scalable -} - -internal class ServiceClientConstants -{ - internal static readonly int s_mAX_RETRIES = 3; - internal static readonly int s_mAX_RETRY_DELAY_IN_SECONDS = 2000; -} - -internal static class TestResultErrorConstants -{ - public static List ErrorConstants = new() - { - new TestResultError - { - Key = "401", - Message = "The authentication token provided is invalid. Please check the token and try again.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*401 Unauthorized)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "NoPermissionOnWorkspace_Scalable", - Message = @"You do not have the required permissions to run tests. This could be because: - - a. You do not have the required roles on the workspace. Only Owner and Contributor roles can run tests. Contact the service administrator. - b. The workspace you are trying to run the tests on is in a different Azure tenant than what you are signed into. Check the tenant id from Azure portal and login using the command 'az login --tenant '.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*CheckAccess API call with non successful response)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "InvalidWorkspace_Scalable", - Message = "The specified workspace does not exist. Please verify your workspace settings.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*InvalidAccountOrSubscriptionState)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "InvalidAccessToken", - Message = "The provided access token does not match the specified workspace URL. Please verify that both values are correct.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*InvalidAccessToken)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "AccessTokenOrUserOrWorkspaceNotFound_Scalable", - Message = "The data for the user, workspace or access token was not found. Please check the request or create new token and try again.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*404 Not Found)(?=[\s\S]*NotFound)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "AccessKeyBasedAuthNotSupported_Scalable", - Message = "Authentication through service access token is disabled for this workspace. Please use Entra ID to authenticate.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*403 Forbidden)(?=[\s\S]*AccessKeyBasedAuthNotSupported)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "ServiceUnavailable_Scalable", - Message = "The service is currently unavailable. Please check the service status and try again.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*503 Service Unavailable)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "GatewayTimeout_Scalable", - Message = "The request to the service timed out. Please try again later.", - Pattern = new Regex(@"(?=.*Microsoft\.Playwright\.PlaywrightException)(?=.*504 Gateway Timeout)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "QuotaLimitError_Scalable", - Message = "It is possible that the maximum number of concurrent sessions allowed for your workspace has been exceeded.", - Pattern = new Regex(@"(Timeout .* exceeded)(?=[\s\S]*ws connecting)", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - }, - new TestResultError - { - Key = "BrowserConnectionError_Scalable", - Message = "The service is currently unavailable. Please try again after some time.", - Pattern = new Regex(@"Target page, context or browser has been closed", RegexOptions.IgnoreCase), - Type = TestErrorType.Scalable - } - }; -} - -internal static class ApiErrorConstants -{ - private static Dictionary PatchTestRun { get; set; } = new Dictionary() { - { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, - { 401, "The authentication token provided is invalid. Please check the token and try again." }, - { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, - { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, - { 504, "The request to the service timed out. Please try again later." }, - { 503, "The service is currently unavailable. Please check the service status and try again." } - }; - - private static Dictionary UploadBatchTestResults { get; set; } = new Dictionary() - { - { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, - { 401, "The authentication token provided is invalid. Please check the token and try again." }, - { 403, "You do not have the required permissions to run tests. Please contact your workspace administrator." }, - { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, - { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, - { 504, "The request to the service timed out. Please try again later." }, - { 503, "The service is currently unavailable. Please check the service status and try again." } - }; - private static Dictionary PostTestRunShardInfo { get; set; } = new Dictionary() - { - { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, - { 401, "The authentication token provided is invalid. Please check the token and try again." }, - { 403, "You do not have the required permissions to run tests. Please contact your workspace administrator." }, - { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, - { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, - { 504, "The request to the service timed out. Please try again later." }, - { 503, "The service is currently unavailable. Please check the service status and try again." } - }; - private static Dictionary GetTestRunResultsUri { get; set; } = new Dictionary() - { - { 400, "The request made to the server is invalid. Please check the request parameters and try again." }, - { 401, "The authentication token provided is invalid. Please check the token and try again." }, - { 403, "You do not have the required permissions to run tests. Please contact your workspace administrator." }, - { 500, "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues." }, - { 429, "You have exceeded the rate limit for the API. Please wait and try again later." }, - { 504, "The request to the service timed out. Please try again later." }, - { 503, "The service is currently unavailable. Please check the service status and try again." } - }; - - internal static readonly Dictionary> s_errorOperationPair = new() - { - { "PatchTestRun", PatchTestRun }, - { "UploadBatchTestResults", UploadBatchTestResults }, - { "PostTestRunShardInfo", PostTestRunShardInfo }, - { "GetTestRunResultsUri", GetTestRunResultsUri } - }; -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/EntraLifecycle.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/EntraLifecycle.cs deleted file mode 100644 index f32c73990e2f..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/EntraLifecycle.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Identity; -using Microsoft.IdentityModel.JsonWebTokens; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; - -internal class EntraLifecycle -{ - internal string? _entraIdAccessToken; - internal long? _entraIdAccessTokenExpiry; - private readonly TokenCredential _tokenCredential; - private readonly JsonWebTokenHandler _jsonWebTokenHandler; - private readonly IFrameworkLogger? _frameworkLogger; - - public EntraLifecycle(TokenCredential? tokenCredential = null, JsonWebTokenHandler? jsonWebTokenHandler = null, IFrameworkLogger? frameworkLogger = null) - { - _frameworkLogger = frameworkLogger; - _tokenCredential = tokenCredential ?? new DefaultAzureCredential(); - _jsonWebTokenHandler = jsonWebTokenHandler ?? new JsonWebTokenHandler(); - SetEntraIdAccessTokenFromEnvironment(); - } - - internal async Task FetchEntraIdAccessTokenAsync(CancellationToken cancellationToken = default) - { - try - { - var tokenRequestContext = new TokenRequestContext(Constants.s_entra_access_token_scopes); - AccessToken accessToken = await _tokenCredential.GetTokenAsync(tokenRequestContext, cancellationToken).ConfigureAwait(false); - _entraIdAccessToken = accessToken.Token; - _entraIdAccessTokenExpiry = accessToken.ExpiresOn.ToUnixTimeSeconds(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, _entraIdAccessToken); - return; - } - catch (Exception ex) - { - _frameworkLogger?.Error(ex.ToString()); - throw new Exception(Constants.s_no_auth_error); - } - } - - internal bool DoesEntraIdAccessTokenRequireRotation() - { - if (string.IsNullOrEmpty(_entraIdAccessToken)) - { - return true; - } - var lifetimeLeft = _entraIdAccessTokenExpiry - DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - return lifetimeLeft < Constants.s_entra_access_token_lifetime_left_threshold_in_minutes_for_rotation * 60; - } - - private void SetEntraIdAccessTokenFromEnvironment() - { - try - { - var token = Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken); - JsonWebToken jsonWebToken = _jsonWebTokenHandler.ReadJsonWebToken(token); - jsonWebToken.TryGetClaim( - "aid", - out System.Security.Claims.Claim? aidClaim - ); - jsonWebToken.TryGetClaim( - "accountId", - out System.Security.Claims.Claim? accountIdClaim - ); - if (aidClaim != null || accountIdClaim != null) - return; // MPT Token - var expiry = (long)(jsonWebToken.ValidTo - new DateTime(1970, 1, 1)).TotalSeconds; - _entraIdAccessToken = token; - _entraIdAccessTokenExpiry = expiry; - } - catch (Exception) - { - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/BlobService.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/BlobService.cs deleted file mode 100644 index 84fca07cda2d..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/BlobService.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Text; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Storage.Blobs; -using System.Threading.Tasks; -using System.IO; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class BlobService:IBlobService - { - private readonly ILogger _logger; - - public BlobService(ILogger? logger) - { - _logger = logger ?? new Logger(); - } - - public async Task UploadBufferAsync(string uri, string buffer, string fileRelativePath) - { - try - { - string cloudFilePath = GetCloudFilePath(uri, fileRelativePath); - BlobClient blobClient = new(new Uri(cloudFilePath)); - byte[] bufferBytes = Encoding.UTF8.GetBytes(buffer); - await blobClient.UploadAsync(new BinaryData(bufferBytes), overwrite: true).ConfigureAwait(false); - _logger.Info($"Uploaded buffer to {fileRelativePath}"); - } - catch (Exception ex) - { - _logger.Error($"Failed to upload buffer: {ex}"); - } - } - - public void UploadBuffer(string uri, string buffer, string fileRelativePath) - { - try - { - string cloudFilePath = GetCloudFilePath(uri, fileRelativePath); - BlobClient blobClient = new(new Uri(cloudFilePath)); - byte[] bufferBytes = Encoding.UTF8.GetBytes(buffer); - blobClient.Upload(new BinaryData(bufferBytes), overwrite: true); - _logger.Info($"Uploaded buffer to {fileRelativePath}"); - } - catch (Exception ex) - { - _logger.Error($"Failed to upload buffer: {ex}"); - } - } - - public void UploadBlobFile(string uri, string fileRelativePath, string filePath) - { - string cloudFilePath = GetCloudFilePath(uri, fileRelativePath); - BlobClient blobClient = new(new Uri(cloudFilePath)); - blobClient.Upload(filePath, overwrite: true); - _logger.Info($"Uploaded file {filePath} to {fileRelativePath}"); - } - public string GetCloudFilePath(string uri, string fileRelativePath) - { - string[] parts = uri.Split(new string[] { ReporterConstants.s_sASUriSeparator }, StringSplitOptions.None); - string containerUri = parts[0]; - string sasToken = parts.Length > 1 ? parts[1] : string.Empty; - - return $"{containerUri}/{fileRelativePath}?{sasToken}"; - } - public string? GetCloudFileName(string filePath, string testExecutionId) - { - var fileName = Path.GetFileName(filePath); - if (fileName == null) - { - return null; - } - return $"{testExecutionId}/{fileName}"; // TODO check if we need to add {Guid.NewGuid()} for file with same name - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/CloudRunErrorParser.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/CloudRunErrorParser.cs deleted file mode 100644 index 2410754187a5..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/CloudRunErrorParser.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class CloudRunErrorParser : ICloudRunErrorParser - { - internal List InformationalMessages { get; private set; } = new(); - private List ProcessedErrorMessageKeys { get; set; } = new(); - private readonly ILogger _logger; - private readonly IConsoleWriter _consoleWriter; - public CloudRunErrorParser(ILogger? logger = null, IConsoleWriter? consoleWriter = null) - { - _logger = logger ?? new Logger(); - _consoleWriter = consoleWriter ?? new ConsoleWriter(); - } - - public bool TryPushMessageAndKey(string? message, string? key) - { - if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(message)) - { - return false; - } - if (ProcessedErrorMessageKeys.Contains(key!)) - { - return false; - } - _logger.Info($"Adding message with key: {key}"); - - ProcessedErrorMessageKeys.Add(key!); - InformationalMessages.Add(message!); - return true; - } - - public void PushMessage(string message) - { - InformationalMessages.Add(message); - } - - public void DisplayMessages() - { - if (InformationalMessages.Count > 0) - _consoleWriter.WriteLine(); - int index = 1; - foreach (string message in InformationalMessages) - { - _consoleWriter.WriteLine($"{index++}) {message}"); - } - } - - public void PrintErrorToConsole(string message) - { - _consoleWriter.WriteError(message); - } - - public void HandleScalableRunErrorMessage(string? message) - { - if (string.IsNullOrEmpty(message)) - { - return; - } - foreach (TestResultError testResultErrorObj in TestResultErrorConstants.ErrorConstants) - { - if (testResultErrorObj.Pattern.IsMatch(message)) - { - TryPushMessageAndKey(testResultErrorObj.Message, testResultErrorObj.Key); - } - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ConsoleWriter.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ConsoleWriter.cs deleted file mode 100644 index c0092b80de03..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ConsoleWriter.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class ConsoleWriter : IConsoleWriter - { - public void WriteLine(string? message = null) - { - Console.WriteLine(message); - } - - public void WriteError(string? message = null) - { - Console.Error.WriteLine(message); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/EnvironmentHandler.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/EnvironmentHandler.cs deleted file mode 100644 index 5c67243ab350..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/EnvironmentHandler.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class EnvironmentHandler : IEnvironment - { - public void Exit(int exitCode) - { - Environment.Exit(exitCode); - } - - public string? GetEnvironmentVariable(string variable) - { - return Environment.GetEnvironmentVariable(variable); - } - - public void SetEnvironmentVariable(string variable, string value) - { - Environment.SetEnvironmentVariable(variable, value); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/Logger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/Logger.cs deleted file mode 100644 index 8b0dabef39e4..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/Logger.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; - -internal enum LogLevel -{ - Debug, - Info, - Warning, - Error -} - -internal class Logger : ILogger -{ - internal static string? SdkLogLevel => Environment.GetEnvironmentVariable(Constants.s_pLAYWRIGHT_SERVICE_DEBUG); - -#pragma warning disable CA1822 // Mark members as static - private void Log(LogLevel level, string message) -#pragma warning restore CA1822 // Mark members as static - { - if (Enum.TryParse(SdkLogLevel, out LogLevel configuredLevel) && level >= configuredLevel) - { - System.IO.TextWriter writer = level == LogLevel.Error || level == LogLevel.Warning ? Console.Error : Console.Out; - writer.WriteLine($"{DateTime.Now} [{level}]: {message}"); - } - } - - public void Debug(string message) - { - Log(LogLevel.Debug, message); - } - - public void Error(string message) - { - Log(LogLevel.Error, message); - } - - public void Info(string message) - { - Log(LogLevel.Info, message); - } - - public void Warning(string message) - { - Log(LogLevel.Warning, message); - } -}; diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ServiceClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ServiceClient.cs deleted file mode 100644 index a2aef1df8196..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/ServiceClient.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core.Serialization; -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using System.Text.Json; -using Azure.Core.Diagnostics; -using System.Diagnostics.Tracing; -using System.Net; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class ServiceClient : IServiceClient - { - private readonly TestReportingClient _testReportingClient; - private readonly CloudRunMetadata _cloudRunMetadata; - private readonly ICloudRunErrorParser _cloudRunErrorParser; - private readonly ILogger _logger; - private static string AccessToken { get => $"Bearer {Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)}"; set { } } - private static string CorrelationId { get => Guid.NewGuid().ToString(); set { } } - private static readonly JsonSerializerOptions _jsonSerializerOptions = new() { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }; - - public ServiceClient(CloudRunMetadata cloudRunMetadata, ICloudRunErrorParser cloudRunErrorParser, TestReportingClient? testReportingClient = null, ILogger? logger = null) - { - _cloudRunMetadata = cloudRunMetadata; - _cloudRunErrorParser = cloudRunErrorParser; - _logger = logger ?? new Logger(); - AzureEventSourceListener listener = new(delegate (EventWrittenEventArgs eventData, string text) - { - _logger.Info($"[{eventData.Level}] {eventData.EventSource.Name}: {text}"); - }, EventLevel.Informational); - var clientOptions = new TestReportingClientOptions(); - clientOptions.Diagnostics.IsLoggingEnabled = true; - clientOptions.Diagnostics.IsTelemetryEnabled = true; - clientOptions.Retry.MaxRetries = ServiceClientConstants.s_mAX_RETRIES; - clientOptions.Retry.MaxDelay = TimeSpan.FromSeconds(ServiceClientConstants.s_mAX_RETRY_DELAY_IN_SECONDS); - _testReportingClient = testReportingClient ?? new TestReportingClient(_cloudRunMetadata.BaseUri, clientOptions); - } - - public TestRunDto? PatchTestRunInfo(TestRunDto run) - { - int statusCode; - try - { - Response? apiResponse = _testReportingClient.PatchTestRunInfo(_cloudRunMetadata.WorkspaceId!, _cloudRunMetadata.RunId!, RequestContent.Create(JsonSerializer.Serialize(run)), AccessToken, CorrelationId); - if (apiResponse.Status == (int)HttpStatusCode.OK) - { - return apiResponse.Content!.ToObject(new JsonObjectSerializer()); - } - statusCode = apiResponse.Status; - } - catch (RequestFailedException ex) - { - if (ex.Status == (int)HttpStatusCode.Conflict) - { - var errorMessage = ReporterConstants.s_cONFLICT_409_ERROR_MESSAGE.Replace("{runId}", _cloudRunMetadata.RunId!); - _cloudRunErrorParser.PrintErrorToConsole(errorMessage); - _cloudRunErrorParser.TryPushMessageAndKey(errorMessage, ReporterConstants.s_cONFLICT_409_ERROR_MESSAGE_KEY); - throw new Exception(errorMessage); - } - else if (ex.Status == (int)HttpStatusCode.Forbidden) - { - var errorMessage = ReporterConstants.s_fORBIDDEN_403_ERROR_MESSAGE.Replace("{workspaceId}", _cloudRunMetadata.WorkspaceId!); - _cloudRunErrorParser.PrintErrorToConsole(errorMessage); - _cloudRunErrorParser.TryPushMessageAndKey(errorMessage, ReporterConstants.s_fORBIDDEN_403_ERROR_MESSAGE_KEY); - throw new Exception(errorMessage); - } - statusCode = ex.Status; - } - HandleAPIFailure(statusCode, "PatchTestRun"); - return null; - } - - public TestRunShardDto? PostTestRunShardInfo(TestRunShardDto runShard) - { - int statusCode; - try - { - Response apiResponse = _testReportingClient.PostTestRunShardInfo(_cloudRunMetadata.WorkspaceId!, _cloudRunMetadata.RunId!, RequestContent.Create(runShard), ReporterConstants.s_aPPLICATION_JSON, AccessToken, CorrelationId); - if (apiResponse.Status == (int)HttpStatusCode.OK) - { - return apiResponse.Content!.ToObject(new JsonObjectSerializer()); - } - statusCode = apiResponse.Status; - } - catch (RequestFailedException ex) - { - statusCode = ex.Status; - } - HandleAPIFailure(statusCode, "PostTestRunShardInfo"); - return null; - } - - public void UploadBatchTestResults(UploadTestResultsRequest uploadTestResultsRequest) - { - int statusCode; - try - { - Response apiResponse = _testReportingClient.UploadBatchTestResults(_cloudRunMetadata.WorkspaceId!, RequestContent.Create(JsonSerializer.Serialize(uploadTestResultsRequest)), AccessToken, CorrelationId, null); - if (apiResponse.Status == (int)HttpStatusCode.OK) - { - return; - } - statusCode = apiResponse.Status; - } - catch (RequestFailedException ex) - { - statusCode = ex.Status; - } - HandleAPIFailure(statusCode, "UploadBatchTestResults"); - } - - public TestResultsUri? GetTestRunResultsUri() - { - int statusCode; - try - { - Response response = _testReportingClient.GetTestRunResultsUri(_cloudRunMetadata.WorkspaceId!, _cloudRunMetadata.RunId!, AccessToken, CorrelationId, null); - if (response.Status == (int)HttpStatusCode.OK) - { - return response.Content!.ToObject(new JsonObjectSerializer()); - } - statusCode = response.Status; - } - catch (RequestFailedException ex) - { - statusCode = ex.Status; - } - HandleAPIFailure(statusCode, "GetTestRunResultsUri"); - return null; - } - - internal void HandleAPIFailure(int? statusCode, string operationName) - { - try - { - if (statusCode == null) - return; - ApiErrorConstants.s_errorOperationPair.TryGetValue(operationName, out System.Collections.Generic.Dictionary? errorObject); - if (errorObject == null) - return; - errorObject.TryGetValue((int)statusCode, out string? errorMessage); - errorMessage ??= ReporterConstants.s_uNKNOWN_ERROR_MESSAGE; - _cloudRunErrorParser.TryPushMessageAndKey(errorMessage, statusCode.ToString()); - } - catch (Exception ex) - { - _logger.Error(ex.Message); - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/VSTestFrameworkLogger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/VSTestFrameworkLogger.cs deleted file mode 100644 index 4a0d36464328..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/VSTestFrameworkLogger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class VSTestFrameworkLogger : IFrameworkLogger - { - private readonly ILogger _logger; - public VSTestFrameworkLogger(ILogger? logger = null) - { - _logger = logger ?? new Logger(); - } - - public void Debug(string message) - { - _logger.Debug(message); - } - - public void Error(string message) - { - _logger.Error(message); - } - - public void Info(string message) - { - _logger.Info(message); - } - - public void Warning(string message) - { - _logger.Warning(message); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/XmlRunSettings.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/XmlRunSettings.cs deleted file mode 100644 index f50fa4954eb7..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Implementation/XmlRunSettings.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Xml; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation -{ - internal class XmlRunSettings : IXmlRunSettings - { - private static readonly string NUnitNodeName = "NUnit"; - public Dictionary GetTestRunParameters(string? settingsXml) - { - return XmlRunSettingsUtilities.GetTestRunParameters(settingsXml); - } - - public Dictionary GetNUnitParameters(string? settingsXml) - { - try - { - var parameters = new Dictionary(); - XmlDocument xmlDocument = ParseXmlSettings(settingsXml); - XmlNodeList nUnitNodes = xmlDocument.GetElementsByTagName(NUnitNodeName); - foreach (XmlNode nUnitNode in nUnitNodes) - { - foreach (XmlNode childNode in nUnitNode.ChildNodes) - { - parameters.Add(childNode.Name, childNode.InnerText); - } - } - return parameters; - } - catch (Exception) - { - return new Dictionary(); - } - } - - private static XmlDocument ParseXmlSettings(string? settingsXml) - { - XmlDocument xmlDocument = new(); - xmlDocument.LoadXml(settingsXml!); // this will throw argument null exception if settingsXml is null - return xmlDocument; - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IBlobService.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IBlobService.cs deleted file mode 100644 index a91303f59263..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IBlobService.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface IBlobService - { - /// - /// - /// - /// - /// - /// - /// A representing the result of the asynchronous operation. - Task UploadBufferAsync(string uri, string buffer, string fileRelativePath); - void UploadBuffer(string uri, string buffer, string fileRelativePath); - string GetCloudFilePath(string uri, string fileRelativePath); - void UploadBlobFile(string uri, string fileRelativePath, string filePath); - public string? GetCloudFileName(string filePath, string testExecutionId); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ICloudRunErrorParser.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ICloudRunErrorParser.cs deleted file mode 100644 index 7dbbecf68c14..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ICloudRunErrorParser.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface ICloudRunErrorParser - { - void HandleScalableRunErrorMessage(string? message); - bool TryPushMessageAndKey(string? message, string? key); - void PushMessage(string message); - void DisplayMessages(); - void PrintErrorToConsole(string message); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IConsoleWriter.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IConsoleWriter.cs deleted file mode 100644 index 41939a5d6429..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IConsoleWriter.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface IConsoleWriter - { - void WriteLine(string? message = null); - void WriteError(string? message = null); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IDataProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IDataProcessor.cs deleted file mode 100644 index 280a6fe08f84..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IDataProcessor.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface IDataProcessor - { - TestRunDto GetTestRun(); - TestRunShardDto GetTestRunShard(); - TestResults GetTestCaseResultData(TestResult? testResultSource); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IEnvironment.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IEnvironment.cs deleted file mode 100644 index 503b12d54e3c..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IEnvironment.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface IEnvironment - { - void Exit(int exitCode); - string? GetEnvironmentVariable(string variable); - void SetEnvironmentVariable(string variable, string value); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IFrameworkLogger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IFrameworkLogger.cs deleted file mode 100644 index 63c41c5d3b75..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IFrameworkLogger.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - /// - /// Sets up logging for the TestLogger package. - /// - public interface IFrameworkLogger - { - /// - /// Log informational message. - /// - /// - void Info(string message); - /// - /// Log debug messages. - /// - /// - void Debug(string message); - /// - /// Log warnming messages. - /// - /// - void Warning(string message); - /// - /// Log error messages. - /// - /// - void Error(string message); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ILogger.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ILogger.cs deleted file mode 100644 index c1912bcfaa50..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ILogger.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface ILogger - { - void Info(string message); - void Debug(string message); - void Warning(string message); - void Error(string message); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IServiceClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IServiceClient.cs deleted file mode 100644 index 07edddb64230..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IServiceClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface IServiceClient - { - TestRunDto? PatchTestRunInfo(TestRunDto run); - TestRunShardDto? PostTestRunShardInfo(TestRunShardDto runShard); - void UploadBatchTestResults(UploadTestResultsRequest uploadTestResultsRequest); - TestResultsUri? GetTestRunResultsUri(); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ITestProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ITestProcessor.cs deleted file mode 100644 index 205332294b2e..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/ITestProcessor.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface ITestProcessor - { - void TestCaseResultHandler(object? sender, TestResultEventArgs e); - void TestRunStartHandler(object? sender, TestRunStartEventArgs e); - void TestRunCompleteHandler(object? sender, TestRunCompleteEventArgs e); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IXmlRunSettings.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IXmlRunSettings.cs deleted file mode 100644 index 70d3b9d00c73..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Interface/IXmlRunSettings.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface -{ - internal interface IXmlRunSettings - { - Dictionary GetTestRunParameters(string? settingsXml); - Dictionary GetNUnitParameters(string? settingsXml); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CIInfo.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CIInfo.cs deleted file mode 100644 index e44bdae81baf..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CIInfo.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -internal class CIInfo -{ - internal string? Provider { get; set; } - internal string? Repo { get; set; } - internal string? Branch { get; set; } - internal string? Author { get; set; } - internal string? CommitId { get; set; } - internal string? RevisionUrl { get; set; } - internal string? RunId { get; set; } - internal int? RunAttempt { get; set; } - internal string? JobId { get; set; } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CloudRunMetadata.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CloudRunMetadata.cs deleted file mode 100644 index e627ae634d16..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/CloudRunMetadata.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model -{ - internal class CloudRunMetadata - { - internal string? WorkspaceId { get; set; } - internal string? RunId { get; set; } - internal string? RunName { get; set; } - internal Uri? BaseUri { get; set; } - internal string? PortalUrl - { - get { return ReporterConstants.s_portalBaseUrl + Uri.EscapeDataString(WorkspaceId ?? string.Empty) + ReporterConstants.s_reportingRoute + Uri.EscapeDataString(RunId ?? string.Empty); } - } - internal bool EnableResultPublish { get; set; } = true; - internal bool EnableGithubSummary { get; set; } = true; - internal DateTime TestRunStartTime { get; set; } - internal TokenDetails? AccessTokenDetails { get; set; } - internal int NumberOfTestWorkers { get; set; } = 1; - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/MPTResult.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/MPTResult.cs deleted file mode 100644 index 50006b0d55dc..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/MPTResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -internal class RawTestStep -{ - internal string? Title { get; set; } - internal string? Category { get; set; } - internal string? StartTime { get; set; } - internal int Duration { get; set; } - internal string? Error { get; set; } - internal List Steps { get; set; } = new List(); - internal Location? Location { get; set; } - internal string? Snippet { get; set; } - internal int Count { get; set; } -} - -internal class Location -{ - internal int LineNumber { get; set; } -} - -internal class MPTError -{ - public string? message { get; set; } -} -internal class RawTestResult -{ - [JsonPropertyName("steps")] - public List Steps { get; set; } = new List(); - [JsonPropertyName("errors")] - public string errors { get; set; } = "[]"; - [JsonPropertyName("stdErr")] - public string stdErr { get; set; } = "[]"; - [JsonPropertyName("stdOut")] - public string stdOut { get; set; } = "[]"; -} - -internal class TokenDetails -{ - internal string? aid { get; set; } - internal string? oid { get; set; } - internal string? id { get; set; } - internal string? userName { get; set; } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/TestReporting.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/TestReporting.cs deleted file mode 100644 index 4692883feaa0..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Model/TestReporting.cs +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -internal enum AccessLevel -{ - Read = 0, - Write = 1, - ReadWrite = 2, - ReadAddCreateWrite = 3, -} - -internal partial class CIConfig -{ - [JsonPropertyName("ciProviderName")] public string? CiProviderName { get; set; } = ""; - - [JsonPropertyName("branch")] public string? Branch { get; set; } - - [JsonPropertyName("author")] public string? Author { get; set; } - - [JsonPropertyName("commitId")] public string? CommitId { get; set; } - - [JsonPropertyName("revisionUrl")] public string? RevisionUrl { get; set; } -} - -internal partial class ClientConfig -{ - [JsonPropertyName("retries")] - public int Retries { get; set; } - - [JsonPropertyName("repeatEach")] - public int RepeatEach { get; set; } - - [JsonPropertyName("workers")] - public int Workers { get; set; } - - [JsonPropertyName("pwVersion")] public string PwVersion { get; set; } = ""; - - [JsonPropertyName("testFramework")] - public TestFramework? TestFramework { get; set; } - - [JsonPropertyName("shards")] - public Shard? Shards { get; set; } - - [JsonPropertyName("timeout")] - public int Timeout { get; set; } - - [JsonPropertyName("testType")] public string TestType { get; set; } = ""; - - [JsonPropertyName("testSdkLanguage")] public string TestSdkLanguage { get; set; } = ""; - - [JsonPropertyName("reporterPackageVersion")] public string ReporterPackageVersion { get; set; } = ""; -} - -internal partial class PreviousRetrySummary -{ - [JsonPropertyName("testExecutionId")] public string TestExecutionId { get; set; } = ""; - - [JsonPropertyName("retry")] - public int Retry { get; set; } - - [JsonPropertyName("status")] public string Status { get; set; } = ""; - - [JsonPropertyName("duration")] public long Duration { get; set; } - - [JsonPropertyName("startTime")] public string StartTime { get; set; } = ""; - - [JsonPropertyName("attachmentsMetadata")] public string AttachmentsMetadata { get; set; } = ""; - - [JsonPropertyName("artifactsPath")] - public ICollection ArtifactsPath { get; set; } = new List(); -} - -internal partial class Shard -{ - [JsonPropertyName("total")] - public int Total { get; set; } - - [JsonPropertyName("current")] - public int? Current { get; set; } -} - -internal partial class TestFramework -{ - [JsonPropertyName("name")] public string Name { get; set; } = ""; - - [JsonPropertyName("version")] public string Version { get; set; } = ""; - - [JsonPropertyName("runnerName")] public string RunnerName { get; set; } = ""; -} - -internal partial class TestResults -{ - [JsonPropertyName("testExecutionId")] public string TestExecutionId { get; set; } = ""; - - [JsonPropertyName("testId")] public string TestId { get; set; } = ""; - - [JsonPropertyName("testCombinationId")] public string TestCombinationId { get; set; } = ""; - - [JsonPropertyName("runId")] public string RunId { get; set; } = ""; - - [JsonPropertyName("shardId")] public string ShardId { get; set; } = ""; - - [JsonPropertyName("accountId")] public string AccountId { get; set; } = ""; - - [JsonPropertyName("suiteId")] public string SuiteId { get; set; } = ""; - - [JsonPropertyName("testTitle")] public string TestTitle { get; set; } = ""; - - [JsonPropertyName("suiteTitle")] public string SuiteTitle { get; set; } = ""; - - [JsonPropertyName("fileName")] public string FileName { get; set; } = ""; - - [JsonPropertyName("lineNumber")] - public int LineNumber { get; set; } - - [JsonPropertyName("retry")] - public int Retry { get; set; } - - [JsonPropertyName("status")] public string Status { get; set; } = ""; - - [JsonPropertyName("webTestConfig")] - public WebTestConfig? WebTestConfig { get; set; } - - [JsonPropertyName("ciConfig")] - public CIConfig? CiConfig { get; set; } - - [JsonPropertyName("resultsSummary")] - public TestResultsSummary? ResultsSummary { get; set; } - - [JsonPropertyName("previousRetries")] - public ICollection PreviousRetries { get; set; } = new List(); - - [JsonPropertyName("tags")] - public ICollection Tags { get; set; } = new List(); - - [JsonPropertyName("annotations")] - public ICollection Annotations { get; set; } = new List(); - - [JsonPropertyName("artifactsPath")] - public ICollection ArtifactsPath { get; set; } = new List(); -} - -internal partial class TestResultsSummary -{ - [JsonPropertyName("status")] public string Status { get; set; } = ""; - - [JsonPropertyName("duration")] public long Duration { get; set; } - - [JsonPropertyName("startTime")] public string StartTime { get; set; } = ""; - - [JsonPropertyName("attachmentsMetadata")] public string AttachmentsMetadata { get; set; } = ""; -} - -internal partial class TestResultsUri -{ - [JsonPropertyName("uri")] public string Uri { get; set; } = ""; - - [JsonPropertyName("createdAt")] public string CreatedAt { get; set; } = ""; - - [JsonPropertyName("expiresAt")] public string ExpiresAt { get; set; } = ""; - - [JsonPropertyName("accessLevel")] - [JsonConverter(typeof(JsonStringEnumConverter))] - public AccessLevel? AccessLevel { get; set; } -} - -internal partial class TestRunDto -{ - [JsonPropertyName("testRunId")] - public string TestRunId { get; set; } = ""; - - [JsonPropertyName("displayName")] - public string DisplayName { get; set; } = ""; - - [JsonPropertyName("startTime")] - public string StartTime { get; set; } = ""; - - [JsonPropertyName("creatorId")] - public string CreatorId { get; set; } = ""; - - [JsonPropertyName("creatorName")] - public string CreatorName { get; set; } = ""; - - [JsonPropertyName("summary")] - public TestRunSummary? Summary { get; set; } - - [JsonPropertyName("resultsSummary")] - public TestRunResultsSummary? ResultsSummary { get; set; } - - [JsonPropertyName("ciConfig")] - public CIConfig? CiConfig { get; set; } - - [JsonPropertyName("testRunConfig")] - public ClientConfig? TestRunConfig { get; set; } - - [JsonPropertyName("testResultsUri")] - public TestResultsUri? TestResultsUri { get; set; } - - [JsonPropertyName("cloudRunEnabled")] public bool? CloudRunEnabled { get; set; } - - [JsonPropertyName("cloudReportingEnabled")] public bool? CloudReportingEnabled { get; set; } -} - -internal partial class TestRunResultsSummary -{ - [JsonPropertyName("numTotalTests")] - public long NumTotalTests { get; set; } - - [JsonPropertyName("numPassedTests")] - public long NumPassedTests { get; set; } - - [JsonPropertyName("numFailedTests")] - public long NumFailedTests { get; set; } - - [JsonPropertyName("numSkippedTests")] - public long NumSkippedTests { get; set; } - - [JsonPropertyName("numFlakyTests")] - public long NumFlakyTests { get; set; } - - [JsonPropertyName("status")] - public string Status { get; set; } = ""; -} - -internal partial class TestRunShardDto -{ - [JsonPropertyName("shardId")] public string ShardId { get; set; } = ""; - [JsonPropertyName("uploadCompleted")] public bool UploadCompleted { get; set; } = false; - - [JsonPropertyName("summary")] - public TestRunShardSummary? Summary { get; set; } - - [JsonPropertyName("workers")] public int? Workers { get; set; } -} - -internal partial class TestRunShardSummary -{ - [JsonPropertyName("status")] public string Status { get; set; } = ""; - [JsonPropertyName("startTime")] public string StartTime { get; set; } = ""; - - [JsonPropertyName("endTime")] public string EndTime { get; set; } = ""; - - [JsonPropertyName("errorMessages")] - public ICollection ErrorMessages { get; set; } = new List(); - - [JsonPropertyName("uploadMetadata")] - public UploadMetadata? UploadMetadata { get; set; } - - [JsonPropertyName("totalTime")] public long TotalTime { get; set; } -} - -internal partial class TestRunSummary -{ - [JsonPropertyName("status")] public string Status { get; set; } = ""; - - [JsonPropertyName("billableTime")] public long BillableTime { get; set; } - - [JsonPropertyName("numBrowserSessions")] public long NumBrowserSessions { get; set; } - - [JsonPropertyName("jobs")] - public ICollection Jobs { get; set; } = new List(); - - [JsonPropertyName("projects")] - public ICollection Projects { get; set; } = new List(); - - [JsonPropertyName("tags")] - public ICollection Tags { get; set; } = new List(); -} - -internal partial class UploadMetadata -{ - [JsonPropertyName("numTestResults")] public long NumTestResults { get; set; } - - [JsonPropertyName("numTotalAttachments")] public long NumTotalAttachments { get; set; } - - [JsonPropertyName("sizeTotalAttachments")] public long SizeTotalAttachments { get; set; } -} - -internal partial class UploadTestResultsRequest -{ - [JsonPropertyName("value")] - public ICollection Value { get; set; } = new List(); -} - -internal partial class WebTestConfig -{ - [JsonPropertyName("jobName")] public string JobName { get; set; } = ""; - - [JsonPropertyName("projectName")] public string ProjectName { get; set; } = ""; - - [JsonPropertyName("browserType")] public string BrowserName { get; set; } = ""; - - [JsonPropertyName("os")] public string Os { get; set; } = ""; -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightReporter.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightReporter.cs deleted file mode 100644 index 1d5493bb5dba..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightReporter.cs +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; -using System; -using System.Collections.Generic; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor; -using Microsoft.IdentityModel.JsonWebTokens; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; - -[FriendlyName("microsoft-playwright-testing")] -[ExtensionUri("logger://MicrosoftPlaywrightTesting/Logger/v1")] -internal class PlaywrightReporter : ITestLoggerWithParameters -{ - internal Dictionary? _parametersDictionary; - internal PlaywrightService? _playwrightService; - internal TestProcessor? _testProcessor; - internal readonly ILogger _logger; - internal IEnvironment _environment; - internal IXmlRunSettings _xmlRunSettings; - internal IConsoleWriter _consoleWriter; - internal JsonWebTokenHandler _jsonWebTokenHandler; - - public PlaywrightReporter() : this(null, null, null, null, null) { } // no-op - public PlaywrightReporter(ILogger? logger, IEnvironment? environment, IXmlRunSettings? xmlRunSettings, IConsoleWriter? consoleWriter, JsonWebTokenHandler? jsonWebTokenHandler) - { - _logger = logger ?? new Logger(); - _environment = environment ?? new EnvironmentHandler(); - _xmlRunSettings = xmlRunSettings ?? new XmlRunSettings(); - _consoleWriter = consoleWriter ?? new ConsoleWriter(); - _jsonWebTokenHandler = jsonWebTokenHandler ?? new JsonWebTokenHandler(); - } - - public void Initialize(TestLoggerEvents events, Dictionary parameters) - { - ValidateArg.NotNull(events, nameof(events)); - _parametersDictionary = parameters; - Initialize(events, _parametersDictionary[DefaultLoggerParameterNames.TestRunDirectory]!); - } - public void Initialize(TestLoggerEvents events, string testResultsDirPath) - { - ValidateArg.NotNull(events, nameof(events)); - ValidateArg.NotNullOrEmpty(testResultsDirPath, nameof(testResultsDirPath)); - - // Register for the events. - events.TestResult += TestResultHandler; // each test run end - events.TestRunComplete += TestRunCompleteHandler; // test suite end - events.TestRunStart += TestRunStartHandler; // test suite start - } - - #region Event Handlers - internal void TestRunStartHandler(object? sender, TestRunStartEventArgs e) - { - InitializePlaywrightReporter(e.TestRunCriteria.TestRunSettings!); - _testProcessor?.TestRunStartHandler(sender, e); - } - - internal void TestResultHandler(object? sender, TestResultEventArgs e) - { - _testProcessor?.TestCaseResultHandler(sender, e); - } - - internal void TestRunCompleteHandler(object? sender, TestRunCompleteEventArgs e) - { - _testProcessor?.TestRunCompleteHandler(sender, e); - _playwrightService?.Cleanup(); - } - #endregion - - internal void InitializePlaywrightReporter(string xmlSettings) - { - Dictionary runParameters = _xmlRunSettings.GetTestRunParameters(xmlSettings); - Dictionary nunitParameters = _xmlRunSettings.GetNUnitParameters(xmlSettings); - runParameters.TryGetValue(RunSettingKey.RunId, out var runId); - // If run id is not provided and not set via env, try fetching it from CI info. - CIInfo cIInfo = CiInfoProvider.GetCIInfo(_environment); - if (string.IsNullOrEmpty(_environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId))) - { - if (string.IsNullOrEmpty(runId?.ToString())) - _environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, ReporterUtils.GetRunId(cIInfo)); - else - _environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId!.ToString()!); // runId is checked above - } - else - { - PlaywrightService.GetDefaultRunId(); // will not set run id if already present in the environment variable - } - - runParameters.TryGetValue(RunSettingKey.ServiceAuthType, out var serviceAuth); - runParameters.TryGetValue(RunSettingKey.AzureTokenCredentialType, out var azureTokenCredential); - runParameters.TryGetValue(RunSettingKey.ManagedIdentityClientId, out var managedIdentityClientId); - runParameters.TryGetValue(RunSettingKey.EnableGitHubSummary, out var enableGithubSummary); - runParameters.TryGetValue(RunSettingKey.EnableResultPublish, out var enableResultPublish); - runParameters.TryGetValue(RunSettingKey.Os, out var osType); - runParameters.TryGetValue(RunSettingKey.ExposeNetwork, out var exposeNetwork); - nunitParameters.TryGetValue(RunSettingKey.NumberOfTestWorkers, out var numberOfTestWorkers); - runParameters.TryGetValue(RunSettingKey.RunName, out var runName); - - string? enableGithubSummaryString = enableGithubSummary?.ToString(); - string? enableResultPublishString = enableResultPublish?.ToString(); - - bool _enableGitHubSummary = string.IsNullOrEmpty(enableGithubSummaryString) || bool.Parse(enableGithubSummaryString!); - bool _enableResultPublish = string.IsNullOrEmpty(enableResultPublishString) || bool.Parse(enableResultPublishString!); - - PlaywrightServiceOptions? playwrightServiceSettings; - try - { - playwrightServiceSettings = new(runId: runId?.ToString(), serviceAuth: serviceAuth?.ToString(), azureTokenCredentialType: azureTokenCredential?.ToString(), managedIdentityClientId: managedIdentityClientId?.ToString(), os: PlaywrightService.GetOSPlatform(osType?.ToString()), exposeNetwork: exposeNetwork?.ToString()); - } - catch (Exception ex) - { - _consoleWriter.WriteError("Failed to initialize PlaywrightServiceSettings: " + ex); - _environment.Exit(1); - return; - } - // setup entra rotation handlers - IFrameworkLogger frameworkLogger = new VSTestFrameworkLogger(_logger); - try - { - _playwrightService = new PlaywrightService(null, playwrightServiceSettings!.RunId, null, playwrightServiceSettings.ServiceAuth, null, entraLifecycle: null, jsonWebTokenHandler: _jsonWebTokenHandler, credential: playwrightServiceSettings.AzureTokenCredential, frameworkLogger: frameworkLogger); -#pragma warning disable AZC0102 // Do not use GetAwaiter().GetResult(). Use the TaskExtensions.EnsureCompleted() extension method instead. - _playwrightService.InitializeAsync().GetAwaiter().GetResult(); -#pragma warning restore AZC0102 // Do not use GetAwaiter().GetResult(). Use the TaskExtensions.EnsureCompleted() extension method instead. - } - catch (Exception ex) - { - // We have checks for access token and base url in the next block, so we can ignore the exception here. - _logger.Error("Failed to initialize PlaywrightService: " + ex); - } - - var cloudRunId = _environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId); - string? baseUrl = _environment.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL); - string? accessToken = _environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken); - if (string.IsNullOrEmpty(baseUrl)) - { - _consoleWriter.WriteError(Constants.s_no_service_endpoint_error_message); - _environment.Exit(1); - return; - } - if (string.IsNullOrEmpty(accessToken)) - { - _consoleWriter.WriteError(Constants.s_no_auth_error); - _environment.Exit(1); - return; - } - if (cloudRunId?.Length > 200) - { - _consoleWriter.WriteError(Constants.s_playwright_service_runId_length_exceeded_error_message); - _environment.Exit(1); - return; - } - var baseUri = new Uri(baseUrl); - var reporterUtils = new ReporterUtils(); - TokenDetails tokenDetails = reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler: _jsonWebTokenHandler, accessToken: accessToken); - var workspaceId = tokenDetails.aid; - var runNameString = runName?.ToString(); - if (runNameString?.Length > 200) - { - runNameString = runNameString.Substring(0, 200); - _consoleWriter.WriteLine(Constants.s_playwright_service_runName_truncated_warning); - } - var cloudRunMetadata = new CloudRunMetadata - { - RunId = cloudRunId, - RunName = runNameString, - WorkspaceId = workspaceId, - BaseUri = baseUri, - EnableResultPublish = _enableResultPublish, - EnableGithubSummary = _enableGitHubSummary, - TestRunStartTime = DateTime.UtcNow, - AccessTokenDetails = tokenDetails, - NumberOfTestWorkers = numberOfTestWorkers != null ? Convert.ToInt32(numberOfTestWorkers) : 1 - }; - - _testProcessor = new TestProcessor(cloudRunMetadata, cIInfo); - _logger.Info("Playwright Service Reporter Initialized"); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightService.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightService.cs deleted file mode 100644 index e1f53a3093c7..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightService.cs +++ /dev/null @@ -1,475 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; -using Microsoft.IdentityModel.JsonWebTokens; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; - -/// -/// Sets up and manages the Playwright service. -/// -public class PlaywrightService -{ - private string? _serviceAuth; - /// - /// Gets or sets the default authentication mechanism. - /// - public string ServiceAuth - { - // fetch class level variable if set -> fetch environment variable -> default to EntraId - get - { - if (!string.IsNullOrEmpty(_serviceAuth)) - return _serviceAuth!; - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable))) - return Environment.GetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable)!; - return ServiceAuthType.EntraId; - } - set - { - _serviceAuth = value; - } - } - - /// - /// Gets or sets the rotation timer for Playwright service. - /// - public Timer? RotationTimer { get; set; } - /// - /// Gets the service endpoint for Playwright service. - /// - public static string? ServiceEndpoint => Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri); - - private bool? _useCloudHostedBrowsers; - /// - /// Gets or sets a flag indicating whether to use cloud-hosted browsers. - /// - public bool UseCloudHostedBrowsers - { - // fetch class level variable if set -> fetch environment variable -> default to true - get - { - if (_useCloudHostedBrowsers != null) - return (bool)_useCloudHostedBrowsers; - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable))) - return !bool.Parse(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable)!); // this is checked in the line above - return true; - } - set - { - _useCloudHostedBrowsers = value; - } - } - - private OSPlatform? _os; - /// - /// Gets or sets the operating system for Playwright service. - /// - public OSPlatform? Os - { - // fetch class level variable if set -> fetch environment variable -> default to null - get - { - if (_os != null) - return _os; - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs))) - return GetOSPlatform(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs)); - return null; - } - set - { - _os = value; - } - } - - private string? _runId; - /// - /// Gets or sets the run ID. - /// - public string? RunId - { - // fetch class level variable if set -> fetch environment variable -> default to null - get - { - if (!string.IsNullOrEmpty(_runId)) - return _runId; - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId))) - return Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId); - return null; - } - set - { - _runId = value; - } - } - - private string? _exposeNetwork; - /// - /// Gets or sets the expose network field for remote browsers. - /// - public string? ExposeNetwork - { - // fetch class level variable if set -> fetch environment variable -> default to null - get - { - if (!string.IsNullOrEmpty(_exposeNetwork)) - return _exposeNetwork; - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork))) - return Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork); - return null; - } - set - { - _exposeNetwork = value; - } - } - - private readonly EntraLifecycle? _entraLifecycle; - private readonly JsonWebTokenHandler? _jsonWebTokenHandler; - private IFrameworkLogger? _frameworkLogger; - private IConsoleWriter? _consoleWriter; - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - public PlaywrightService(PlaywrightServiceOptions playwrightServiceOptions, TokenCredential? credential = null, IFrameworkLogger? frameworkLogger = null) : this( - os: playwrightServiceOptions.Os, - runId: playwrightServiceOptions.RunId, - exposeNetwork: playwrightServiceOptions.ExposeNetwork, - serviceAuth: playwrightServiceOptions.ServiceAuth, - useCloudHostedBrowsers: playwrightServiceOptions.UseCloudHostedBrowsers, - credential: credential ?? playwrightServiceOptions.AzureTokenCredential, - frameworkLogger: frameworkLogger - ) - { - // No-op - } - - /// - /// Initializes a new instance of the class. - /// - /// The operating system. - /// The run ID. - /// The network exposure. - /// The service authentication mechanism. - /// Whether to use cloud-hosted browsers. - /// The token credential. - /// Logger - public PlaywrightService(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = null, TokenCredential? credential = null, IFrameworkLogger? frameworkLogger = null) - { - if (string.IsNullOrEmpty(ServiceEndpoint)) - return; - _frameworkLogger = frameworkLogger; - _entraLifecycle = new EntraLifecycle(tokenCredential: credential, frameworkLogger: _frameworkLogger); - _jsonWebTokenHandler = new JsonWebTokenHandler(); - _consoleWriter = new ConsoleWriter(); - InitializePlaywrightServiceEnvironmentVariables(GetServiceCompatibleOs(os), runId, exposeNetwork, serviceAuth, useCloudHostedBrowsers); - } - - internal PlaywrightService(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = null, EntraLifecycle? entraLifecycle = null, JsonWebTokenHandler? jsonWebTokenHandler = null, TokenCredential? credential = null, IFrameworkLogger? frameworkLogger = null, IConsoleWriter? consoleWriter = null) - { - if (string.IsNullOrEmpty(ServiceEndpoint)) - return; - _frameworkLogger = frameworkLogger; - _jsonWebTokenHandler = jsonWebTokenHandler ?? new JsonWebTokenHandler(); - _entraLifecycle = entraLifecycle ?? new EntraLifecycle(credential, _jsonWebTokenHandler, _frameworkLogger); - _frameworkLogger = frameworkLogger; - _consoleWriter = consoleWriter ?? new ConsoleWriter(); - InitializePlaywrightServiceEnvironmentVariables(GetServiceCompatibleOs(os), runId, exposeNetwork, serviceAuth, useCloudHostedBrowsers); - } - - /// - /// Gets the connect options for connecting to Playwright Service's cloud hosted browsers. - /// - /// The type of the connect options. - /// The operating system. - /// The run ID. - /// The network exposure. - /// Cancellation token. - /// The connect options. - public async Task> GetConnectOptionsAsync(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, CancellationToken cancellationToken = default) where T : class, new() - { - if (Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable) == "true") - throw new Exception(Constants.s_service_endpoint_removed_since_scalable_execution_disabled_error_message); - if (string.IsNullOrEmpty(ServiceEndpoint)) - throw new Exception(Constants.s_no_service_endpoint_error_message); - string _serviceOs = Uri.EscapeDataString(GetServiceCompatibleOs(os) ?? GetServiceCompatibleOs(Os)!); - string _runId = Uri.EscapeDataString(runId ?? RunId!); - string _exposeNetwork = exposeNetwork ?? ExposeNetwork!; - - string wsEndpoint = $"{ServiceEndpoint}?os={_serviceOs}&runId={_runId}&api-version={Constants.s_api_version}"; - - // fetch Entra id access token if required - // 1. Entra id access token has been fetched once via global functions - // 2. Not close to expiry - if (!string.IsNullOrEmpty(_entraLifecycle!._entraIdAccessToken) && _entraLifecycle!.DoesEntraIdAccessTokenRequireRotation()) - { - await _entraLifecycle.FetchEntraIdAccessTokenAsync(cancellationToken).ConfigureAwait(false); - } - if (string.IsNullOrEmpty(GetAuthToken())) - { - _frameworkLogger?.Error("Access token not found when trying to call GetConnectOptionsAsync."); - throw new Exception(Constants.s_no_auth_error); - } - - var browserConnectOptions = new BrowserConnectOptions - { - Timeout = 3 * 60 * 1000, - ExposeNetwork = _exposeNetwork, - Headers = new Dictionary - { - ["Authorization"] = $"Bearer {GetAuthToken()}" - } - }; - return new ConnectOptions - { - WsEndpoint = wsEndpoint, - Options = BrowserConnectOptionsConverter.Convert(browserConnectOptions) - }; - } - - /// - /// Initialises the resources used to setup entra id authentication. - /// - public async Task InitializeAsync(CancellationToken cancellationToken = default) - { - if (string.IsNullOrEmpty(ServiceEndpoint)) - { - _frameworkLogger?.Info("Exiting initialization as service endpoint is not set."); - return; - } - if (!UseCloudHostedBrowsers) - { - // Since playwright-dotnet checks PLAYWRIGHT_SERVICE_ACCESS_TOKEN and PLAYWRIGHT_SERVICE_URL to be set, remove PLAYWRIGHT_SERVICE_URL so that tests are run locally. - // If customers use GetConnectOptionsAsync, after setting disableScalableExecution, an error will be thrown. - _frameworkLogger?.Info("Disabling scalable execution since UseCloudHostedBrowsers is set to false."); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); - return; - } - PerformOneTimeOperation(); - // If default auth mechanism is Access token and token is available in the environment variable, no need to setup rotation handler - if (ServiceAuth == ServiceAuthType.AccessToken) - { - _frameworkLogger?.Info("Auth mechanism is Access Token."); - ValidateMptPAT(); - return; - } - _frameworkLogger?.Info("Auth mechanism is Entra Id."); - await _entraLifecycle!.FetchEntraIdAccessTokenAsync(cancellationToken).ConfigureAwait(false); - RotationTimer = new Timer(RotationHandlerAsync, null, TimeSpan.FromMinutes(Constants.s_entra_access_token_rotation_interval_period_in_minutes), TimeSpan.FromMinutes(Constants.s_entra_access_token_rotation_interval_period_in_minutes)); - } - - /// - /// Cleans up the resources used to setup entra id authentication. - /// - public void Cleanup() - { - _frameworkLogger?.Info("Cleaning up Playwright service resources."); - RotationTimer?.Dispose(); - } - internal void PerformOneTimeOperation() - { - var oneTimeOperationFlag = Environment.GetEnvironmentVariable(Constants.s_playwright_service_one_time_operation_flag_environment_variable) == "true"; - - if (oneTimeOperationFlag) - return; - - Environment.SetEnvironmentVariable(Constants.s_playwright_service_one_time_operation_flag_environment_variable, "true"); - - if (ServiceAuth == ServiceAuthType.AccessToken) - { - WarnIfAccessTokenCloseToExpiry(); - } - } - - internal async void RotationHandlerAsync(object? _) - { - if (_entraLifecycle!.DoesEntraIdAccessTokenRequireRotation()) - { - _frameworkLogger?.Info("Rotating Entra Id access token."); - await _entraLifecycle.FetchEntraIdAccessTokenAsync().ConfigureAwait(false); - } - } - - private void InitializePlaywrightServiceEnvironmentVariables(string? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, bool? useCloudHostedBrowsers = null) - { - // environment variables are set only if they are not already set - // If method parameters are set, environment variables are set to those values only if they are not already set - if (!string.IsNullOrEmpty(serviceAuth)) - { - ServiceAuth = serviceAuth!; - } - if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable))) - { - Environment.SetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable, ServiceAuth); - } - if (useCloudHostedBrowsers != null) - { - UseCloudHostedBrowsers = (bool)useCloudHostedBrowsers; - if (!UseCloudHostedBrowsers) - Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, "true"); - } - if (!string.IsNullOrEmpty(os)) - { - Os = GetOSPlatform(os); - if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs))) - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, os); - } - } - // If OS is not provided, set it to default - else if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs))) - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, Constants.s_default_os); - } - if (!string.IsNullOrEmpty(runId)) - { - RunId = runId; - if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId))) - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); - } - } - else - { - GetDefaultRunId(); - } - if (!string.IsNullOrEmpty(exposeNetwork)) - { - ExposeNetwork = exposeNetwork; - if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork))) - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, exposeNetwork); - } - } - else if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork))) - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, Constants.s_default_expose_network); - } - SetReportingUrlAndWorkspaceId(); - } - internal virtual void WarnIfAccessTokenCloseToExpiry() - { - string accessToken = GetAuthToken()!; - JsonWebToken jsonWebToken = _jsonWebTokenHandler!.ReadJsonWebToken(accessToken) ?? throw new Exception(Constants.s_invalid_mpt_pat_error); - long currentTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - long exp = new DateTimeOffset(jsonWebToken.ValidTo).ToUnixTimeMilliseconds(); - if (PlaywrightService.IsTokenExpiringSoon(exp, currentTime)) - { - WarnAboutTokenExpiry(exp, currentTime); - } - } - internal static bool IsTokenExpiringSoon(long expirationTime, long currentTime) - { - return expirationTime - currentTime <= Constants.s_sevenDaysInMs; - } - - internal virtual void WarnAboutTokenExpiry(long expirationTime, long currentTime) - { - int daysToExpiration = (int)Math.Ceiling((expirationTime - currentTime) / (double)Constants.s_oneDayInMs); - string expirationDate = DateTimeOffset.FromUnixTimeMilliseconds(expirationTime).UtcDateTime.ToString("d"); - string expirationWarning = string.Format(Constants.s_token_expiry_warning_template, daysToExpiration, expirationDate); - _consoleWriter?.WriteLine(expirationWarning); - } - - internal static string GetDefaultRunId() - { - var runIdFromEnvironmentVariable = Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId); - if (!string.IsNullOrEmpty(runIdFromEnvironmentVariable)) - return runIdFromEnvironmentVariable!; - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - var runId = ReporterUtils.GetRunId(ciInfo); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); - return runId; - } - - internal static void SetReportingUrlAndWorkspaceId() - { - if (ServiceEndpoint == null) - { - throw new ArgumentNullException(nameof(ServiceEndpoint)); - } - Match match = Regex.Match(ServiceEndpoint, @"wss://(?[\w-]+)\.api\.(?playwright(?:-test|-int)?\.io|playwright\.microsoft\.com)/accounts/(?[\w-]+)/"); - if (!match.Success) - return; - var region = match.Groups["region"].Value; - var domain = match.Groups["domain"].Value; - var workspaceId = match.Groups["workspaceId"].Value; - if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable))) - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, $"https://{region}.reporting.api.{domain}"); - if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable))) - Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, $"{workspaceId}"); - } - - private static string? GetAuthToken() - { - return Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken); - } - - private void ValidateMptPAT() - { - if (ServiceEndpoint == null) - { - throw new ArgumentNullException(nameof(ServiceEndpoint)); - } - try - { - string authToken = GetAuthToken()!; - if (string.IsNullOrEmpty(authToken)) - throw new Exception(Constants.s_no_auth_error); - JsonWebToken jsonWebToken = _jsonWebTokenHandler!.ReadJsonWebToken(authToken) ?? throw new Exception(Constants.s_invalid_mpt_pat_error); - var tokenWorkspaceId = jsonWebToken.Claims.FirstOrDefault(c => c.Type == "aid")?.Value; - Match match = Regex.Match(ServiceEndpoint, @"wss://(?[\w-]+)\.api\.(?playwright(?:-test|-int)?\.io|playwright\.microsoft\.com)/accounts/(?[\w-]+)/"); - if (!match.Success) - throw new Exception(Constants.s_invalid_service_endpoint_error_message); - var serviceEndpointWorkspaceId = match.Groups["workspaceId"].Value; - if (tokenWorkspaceId != serviceEndpointWorkspaceId) - throw new Exception(Constants.s_workspace_mismatch_error); - var expiry = (long)(jsonWebToken.ValidTo - new DateTime(1970, 1, 1)).TotalSeconds; - if (expiry <= DateTimeOffset.UtcNow.ToUnixTimeSeconds()) - throw new Exception(Constants.s_expired_mpt_pat_error); - } - catch (Exception ex) - { - _frameworkLogger?.Error(ex.ToString()); - throw; - } - } - - internal static string? GetServiceCompatibleOs(OSPlatform? oSPlatform) - { - if (oSPlatform == null) - return null; - if (oSPlatform.Equals(OSPlatform.Linux)) - return ServiceOs.Linux; - if (oSPlatform.Equals(OSPlatform.Windows)) - return ServiceOs.Windows; - throw new ArgumentException(Constants.s_invalid_os_error); - } - - internal static OSPlatform? GetOSPlatform(string? os) - { - if (string.IsNullOrEmpty(os)) - return null; - if (os == ServiceOs.Linux) - return OSPlatform.Linux; - if (os == ServiceOs.Windows) - return OSPlatform.Windows; - throw new ArgumentException(Constants.s_invalid_os_error); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightServiceOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightServiceOptions.cs deleted file mode 100644 index 853c05bbd2fd..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/PlaywrightServiceOptions.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Runtime.InteropServices; -using Azure.Core; -using Azure.Identity; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger; - -/// -/// Options for the Playwright service. -/// -public class PlaywrightServiceOptions -{ - internal OSPlatform? Os { get; set; } - internal string? RunId { get; set; } - internal string? ExposeNetwork { get; set; } - internal string ServiceAuth { get; set; } - internal bool UseCloudHostedBrowsers { get; set; } - internal TokenCredential AzureTokenCredential { get; set; } - - /// - /// Initializes a new instance of the class. - /// - /// The operating system. - /// The run ID. - /// The network exposure. - /// The default authentication mechanism. - /// Whether to use cloud-hosted browsers. - /// The Azure token credential type. - /// The managed identity client ID. - public PlaywrightServiceOptions(OSPlatform? os = null, string? runId = null, string? exposeNetwork = null, string? serviceAuth = null, string? useCloudHostedBrowsers = null, string? azureTokenCredentialType = null, string? managedIdentityClientId = null) - { - Os = os; - RunId = runId; - ExposeNetwork = exposeNetwork; - ServiceAuth = serviceAuth ?? ServiceAuthType.EntraId; - UseCloudHostedBrowsers = string.IsNullOrEmpty(useCloudHostedBrowsers) || bool.Parse(useCloudHostedBrowsers!); - AzureTokenCredential = GetTokenCredential(azureTokenCredentialType, managedIdentityClientId); - Validate(); - } - - private void Validate() - { - if (Os != null && Os != OSPlatform.Linux && Os != OSPlatform.Windows) - { - throw new Exception($"Invalid value for {nameof(Os)}: {Os}. Supported values are {ServiceOs.Linux} and {ServiceOs.Windows}"); - } - if (!string.IsNullOrEmpty(ServiceAuth) && ServiceAuth != ServiceAuthType.EntraId && ServiceAuth != ServiceAuthType.AccessToken) - { - throw new Exception($"Invalid value for {nameof(ServiceAuth)}: {ServiceAuth}. Supported values are {ServiceAuthType.EntraId} and {ServiceAuthType.AccessToken}"); - } - } - - private static TokenCredential GetTokenCredential(string? azureTokenCredentialType, string? managedIdentityClientId) - { - if (string.IsNullOrEmpty(azureTokenCredentialType) && string.IsNullOrEmpty(managedIdentityClientId)) - return new DefaultAzureCredential(); - if (azureTokenCredentialType == AzureTokenCredentialType.ManagedIdentityCredential) - { - return new ManagedIdentityCredential(managedIdentityClientId); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.WorkloadIdentityCredential) - { - return new WorkloadIdentityCredential(); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.EnvironmentCredential) - { - return new EnvironmentCredential(); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.AzureCliCredential) - { - return new AzureCliCredential(); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.AzurePowerShellCredential) - { - return new AzurePowerShellCredential(); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.AzureDeveloperCliCredential) - { - return new AzureDeveloperCliCredential(); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.SharedTokenCacheCredential) - { -#pragma warning disable CS0618 // Type or member is obsolete - return new SharedTokenCacheCredential(); -#pragma warning restore CS0618 // Type or member is obsolete - } - else if (azureTokenCredentialType == AzureTokenCredentialType.VisualStudioCredential) - { - return new VisualStudioCredential(); - } - else if (azureTokenCredentialType == AzureTokenCredentialType.InteractiveBrowserCredential) - { - return new InteractiveBrowserCredential(); - } - else - { - return new DefaultAzureCredential(new DefaultAzureCredentialOptions - { - ManagedIdentityClientId = managedIdentityClientId - }); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/DataProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/DataProcessor.cs deleted file mode 100644 index 84b6eb434160..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/DataProcessor.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using System.Linq; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using System.Text.Json; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor -{ - internal class DataProcessor : IDataProcessor - { - private readonly ILogger _logger; - private readonly CIInfo _cIInfo; - private readonly CloudRunMetadata _cloudRunMetadata; - public DataProcessor(CloudRunMetadata cloudRunMetadata, CIInfo cIInfo, ILogger? logger = null) - { - _cloudRunMetadata = cloudRunMetadata; - _cIInfo = cIInfo; - _logger = logger ?? new Logger(); - } - - public TestRunDto GetTestRun() - { - var startTime = _cloudRunMetadata.TestRunStartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"); - var gitBasedRunName = ReporterUtils.GetRunName(CiInfoProvider.GetCIInfo())?.Trim(); - string runName; - if (!string.IsNullOrEmpty(_cloudRunMetadata.RunName)) - { - runName = _cloudRunMetadata.RunName!; - } - else if (!string.IsNullOrEmpty(gitBasedRunName)) - { - runName = gitBasedRunName!; - } - else - { - runName = _cloudRunMetadata.RunId!; - } - var run = new TestRunDto - { - TestRunId = _cloudRunMetadata.RunId!, - DisplayName = runName, - StartTime = startTime, - CreatorId = _cloudRunMetadata.AccessTokenDetails!.oid ?? "", - CreatorName = _cloudRunMetadata.AccessTokenDetails!.userName?.Trim() ?? "", - CloudReportingEnabled = true, - CloudRunEnabled = false, - CiConfig = new CIConfig - { - Branch = ReporterUtils.TruncateData(_cIInfo.Branch, 500), - Author = ReporterUtils.TruncateData(_cIInfo.Author,500), - CommitId = ReporterUtils.TruncateData(_cIInfo.CommitId,500), - RevisionUrl = ReporterUtils.TruncateData(_cIInfo.RevisionUrl,1000), - CiProviderName = _cIInfo.Provider ?? CIConstants.s_dEFAULT - }, - TestRunConfig = new ClientConfig // TODO fetch some of these dynamically - { - Workers = _cloudRunMetadata.NumberOfTestWorkers, - PwVersion = "1.40", - Timeout = 60000, - TestType = "WebTest", - TestSdkLanguage = "CSHARP", - TestFramework = new TestFramework() { Name = "PLAYWRIGHT", RunnerName = "NUNIT", Version = "3.1" }, // TODO fetch runner name MSTest/Nunit - ReporterPackageVersion = "1.0.0-beta.4", - Shards = new Shard() { Total = 1 } - } - }; - return run; - } - - public TestRunShardDto GetTestRunShard() - { - var startTime = _cloudRunMetadata.TestRunStartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"); - var shard = new TestRunShardDto - { - UploadCompleted = false, - ShardId = "1", - Summary = new TestRunShardSummary - { - Status = "RUNNING", - StartTime = startTime, - }, - Workers = _cloudRunMetadata.NumberOfTestWorkers - }; - return shard; - } - public TestResults GetTestCaseResultData(TestResult? testResultSource) - { - if (testResultSource == null) - return new TestResults(); - - TestResults testCaseResultData = new() - { - ArtifactsPath = new List(), - AccountId = _cloudRunMetadata.WorkspaceId!, - RunId = _cloudRunMetadata.RunId!, - TestExecutionId = GetExecutionId(testResultSource).ToString() - }; - testCaseResultData.TestCombinationId = testCaseResultData.TestExecutionId; // TODO check - testCaseResultData.TestId = testResultSource.TestCase.Id.ToString(); - testCaseResultData.TestTitle = ReporterUtils.TruncateData(testResultSource.TestCase.DisplayName, 500)!; - testCaseResultData.TestTitle = ReporterUtils.TruncateData(testResultSource.TestCase.DisplayName, 500)!; - var className = FetchTestClassName(testResultSource.TestCase.FullyQualifiedName); - testCaseResultData.SuiteTitle = ReporterUtils.TruncateData(className,500)!; - testCaseResultData.SuiteId = ReporterUtils.CalculateSha1Hash(className); - testCaseResultData.FileName = ReporterUtils.TruncateData(FetchFileName(testResultSource.TestCase.Source),300)!; - testCaseResultData.LineNumber = testResultSource.TestCase.LineNumber; - testCaseResultData.Retry = 0; // TODO Retry and PreviousRetries - testCaseResultData.WebTestConfig = new WebTestConfig - { - JobName = _cIInfo.JobId != null ? ReporterUtils.TruncateData(_cIInfo.JobId, 500) ?? "" : "", - //ProjectName = "playwright-dotnet", // TODO no project concept NA?? - //BrowserName = "chromium", // TODO check if possible to get from test - Os = ReporterUtils.GetCurrentOS(), - }; - //testCaseResultData.Annotations = ["windows"]; // TODO MSTest/Nunit annotation ?? - //testCaseResultData.Tags = ["windows"]; // TODO NA ?? - - TimeSpan duration = testResultSource.Duration; - testCaseResultData.ResultsSummary = new TestResultsSummary - { - Duration = (long)duration.TotalMilliseconds, // TODO fallback get from End-Start - StartTime = testResultSource.StartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"), - Status = TestCaseResultStatus.s_iNCONCLUSIVE - }; - TestOutcome outcome = testResultSource.Outcome; - switch (outcome) - { - case TestOutcome.Passed: - testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_pASSED; - testCaseResultData.Status = TestCaseResultStatus.s_pASSED; - break; - case TestOutcome.Failed: - testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_fAILED; - testCaseResultData.Status = TestCaseResultStatus.s_fAILED; - break; - case TestOutcome.Skipped: - testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_sKIPPED; - testCaseResultData.Status = TestCaseResultStatus.s_sKIPPED; - break; - default: - testCaseResultData.ResultsSummary.Status = TestCaseResultStatus.s_iNCONCLUSIVE; - testCaseResultData.Status = TestCaseResultStatus.s_iNCONCLUSIVE; - break; - } - return testCaseResultData; - } - - public static RawTestResult GetRawResultObject(TestResult? testResultSource) - { - if (testResultSource == null) - return new RawTestResult(); - List errors = new(); - if (testResultSource.ErrorMessage != null) - errors.Add(new MPTError() { message = testResultSource.ErrorMessage }); - if (testResultSource.ErrorStackTrace != null) - errors.Add(new MPTError() { message = testResultSource.ErrorStackTrace }); - var rawTestResult = new RawTestResult - { - errors = JsonSerializer.Serialize(errors) - }; - return rawTestResult; - } - - #region Data Processor Utility Methods - - private static Guid GetExecutionId(TestResult testResult) - { - TestProperty? executionIdProperty = testResult.Properties.FirstOrDefault( - property => property.Id.Equals(ReporterConstants.s_executionIdPropertyIdentifier)); - - Guid executionId = Guid.Empty; - if (executionIdProperty != null) - executionId = testResult.GetPropertyValue(executionIdProperty, Guid.Empty); - - return executionId.Equals(Guid.Empty) ? Guid.NewGuid() : executionId; - } - - private static string FetchTestClassName(string fullyQualifiedName) - { - string[] parts = fullyQualifiedName.Split('.'); - return string.Join(".", parts.Take(parts.Length - 1)); - } - - private static string FetchFileName(string fullFilePath) - { - char[] delimiters = { '\\', '/' }; - string[] parts = fullFilePath.Split(delimiters); - return parts.Last(); - } - #endregion - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/TestProcessor.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/TestProcessor.cs deleted file mode 100644 index 58df42ff0920..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Processor/TestProcessor.cs +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor -{ - internal class TestProcessor : ITestProcessor - { - // Dependency Injection - private readonly IDataProcessor _dataProcessor; - private readonly ILogger _logger; - private readonly ICloudRunErrorParser _cloudRunErrorParser; - private readonly IServiceClient _serviceClient; - private readonly IConsoleWriter _consoleWriter; - internal readonly CIInfo _cIInfo; - internal readonly CloudRunMetadata _cloudRunMetadata; - private readonly IBlobService _blobService; - - // Test Metadata - internal int TotalTestCount { get; set; } = 0; - internal int PassedTestCount { get; set; } = 0; - internal int FailedTestCount { get; set; } = 0; - internal int SkippedTestCount { get; set; } = 0; - internal int TotalArtifactCount { get; set; } = 0; - internal int TotalArtifactSizeInBytes { get; set; } = 0; - internal List TestResults { get; set; } = new List(); - internal ConcurrentDictionary RawTestResultsMap { get; set; } = new(); - internal bool FatalTestExecution { get; set; } = false; - internal TestRunShardDto? _testRunShard; - internal TestResultsUri? _testResultsSasUri; - - public TestProcessor(CloudRunMetadata cloudRunMetadata, CIInfo cIInfo, ILogger? logger = null, IDataProcessor? dataProcessor = null, ICloudRunErrorParser? cloudRunErrorParser = null, IServiceClient? serviceClient = null, IConsoleWriter? consoleWriter = null, IBlobService? blobService = null) - { - _cloudRunMetadata = cloudRunMetadata; - _cIInfo = cIInfo; - _logger = logger ?? new Logger(); - _dataProcessor = dataProcessor ?? new DataProcessor(_cloudRunMetadata, _cIInfo, _logger); - _cloudRunErrorParser = cloudRunErrorParser ?? new CloudRunErrorParser(_logger); - _serviceClient = serviceClient ?? new ServiceClient(_cloudRunMetadata, _cloudRunErrorParser); - _consoleWriter = consoleWriter ?? new ConsoleWriter(); - _blobService = blobService ?? new BlobService(_logger); - } - - public void TestRunStartHandler(object? sender, TestRunStartEventArgs e) - { - try - { - _logger.Info("Initialising test run"); - if (!_cloudRunMetadata.EnableResultPublish || FatalTestExecution) - { - return; - } - TestRunDto run = _dataProcessor.GetTestRun(); - TestRunShardDto shard = _dataProcessor.GetTestRunShard(); - TestRunDto? testRun = _serviceClient.PatchTestRunInfo(run); - if (testRun == null) - { - _logger.Error("Failed to patch test run info"); - FatalTestExecution = true; - return; - } - _logger.Info("Successfully patched test run - init"); - TestRunShardDto? testShard = _serviceClient.PostTestRunShardInfo(shard); - if (testShard == null) - { - _logger.Error("Failed to patch test run shard info"); - FatalTestExecution = true; - return; - } - _testRunShard = testShard; - _logger.Info("Successfully patched test run shard - init"); - _consoleWriter.WriteLine($"\nInitializing reporting for this test run. You can view the results at: {_cloudRunMetadata.PortalUrl!}"); - } - catch (Exception ex) - { - _logger.Error($"Failed to initialise test run: {ex}"); - FatalTestExecution = true; - } - } - public void TestCaseResultHandler(object? sender, TestResultEventArgs e) - { - try - { - TestResult testResultSource = e.Result; - TestResults? testResult = _dataProcessor.GetTestCaseResultData(testResultSource); - RawTestResult rawResult = DataProcessor.GetRawResultObject(testResultSource); - - // TODO - Send error to blob - _cloudRunErrorParser.HandleScalableRunErrorMessage(testResultSource.ErrorMessage); - _cloudRunErrorParser.HandleScalableRunErrorMessage(testResultSource.ErrorStackTrace); - if (!_cloudRunMetadata.EnableResultPublish || FatalTestExecution) - { - return; - } - - // TODO move rawResult upload here same as JS - RawTestResultsMap.TryAdd(testResult.TestExecutionId, rawResult); - - // Upload Attachments - UploadAttachment(e, testResult.TestExecutionId); - - // Update Test Count - if (testResult != null) - { - TotalTestCount++; - if (testResult.Status == TestCaseResultStatus.s_fAILED) - { - FailedTestCount++; - } - else if (testResult.Status == TestCaseResultStatus.s_pASSED) - { - PassedTestCount++; - } - else if (testResult.Status == TestCaseResultStatus.s_sKIPPED) - { - SkippedTestCount++; - } - TestResults.Add(testResult); - } - } - catch (Exception ex) - { - // test case processing failures should not stop the test run - _logger.Error($"Failed to process test case result: {ex}"); - } - } - public void TestRunCompleteHandler(object? sender, TestRunCompleteEventArgs e) - { - _logger.Info("Test run complete handler - start"); - if (_cloudRunMetadata.EnableResultPublish && !FatalTestExecution) - { - try - { - var body = new UploadTestResultsRequest() { Value = TestResults }; - _serviceClient.UploadBatchTestResults(body); - _logger.Info("Successfully uploaded test results"); - } - catch (Exception ex) - { - _logger.Error($"Failed to upload test results: {ex}"); - } - try - { - TestResultsUri? sasUri = CheckAndRenewSasUri(); - if (!string.IsNullOrEmpty(sasUri?.Uri)) - { - foreach (TestResults testResult in TestResults) - { - if (RawTestResultsMap.TryGetValue(testResult.TestExecutionId!, out RawTestResult? rawResult) && rawResult != null) - { - // Renew the SAS URI if needed - sasUri = CheckAndRenewSasUri(); - if (sasUri == null) - { - _logger.Warning("SAS URI is empty"); - continue; // allow recovery from temporary reporter API failures. In the future, we might consider shortciruiting the upload process. - } - - // Upload rawResult to blob storage using sasUri - var rawTestResultJson = JsonSerializer.Serialize(rawResult); - var filePath = $"{testResult.TestExecutionId}/rawTestResult.json"; - _blobService.UploadBuffer(sasUri!.Uri!, rawTestResultJson, filePath); - } - else - { - _logger.Info("Couldn't find rawResult for Id: " + testResult.TestExecutionId); - } - } - _logger.Info("Successfully uploaded raw test results"); - } - else - { - _logger.Error("SAS URI is empty"); - } - } - catch (Exception ex) - { - _logger.Error($"Failed to upload artifacts: {ex}"); - } - } - EndTestRun(e); - } - - #region Test Processor Helper Methods - - private void UploadAttachment(TestResultEventArgs e, string testExecutionId) - { - _testResultsSasUri = CheckAndRenewSasUri(); - if (e.Result.Attachments != null) - { - foreach (var attachmentSet in e.Result.Attachments) - { - foreach (var attachmentData in attachmentSet.Attachments) - { - var filePath = attachmentData.Uri.LocalPath; - _logger.Info($"Uploading attachment: {filePath}"); - if (!File.Exists( filePath )) - { - _logger.Error($"Attachment file not found: {filePath}"); - continue; - } - try - { - // get file size - var fileSize = new FileInfo(filePath).Length; - var cloudFileName = _blobService.GetCloudFileName(filePath, testExecutionId); - if (cloudFileName != null) { - _blobService.UploadBlobFile(_testResultsSasUri!.Uri!, cloudFileName, filePath); - TotalArtifactCount++; - TotalArtifactSizeInBytes = TotalArtifactSizeInBytes + (int)fileSize; - } - else - { - _logger.Error($"Attachment file Upload Failed: {filePath}"); - } - } - catch (Exception ex) - { - var error = $"Cannot Upload '{filePath}' file: {ex.Message}"; - - _logger.Error(error); - } - } - } - } - } - - internal TestResultsUri? CheckAndRenewSasUri() - { - var reporterUtils = new ReporterUtils(); - if (_testResultsSasUri == null || !reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(_testResultsSasUri.Uri)) - { - _testResultsSasUri = _serviceClient.GetTestRunResultsUri(); - _logger.Info($"Fetched SAS URI with validity: {_testResultsSasUri?.ExpiresAt} and access: {_testResultsSasUri?.AccessLevel}."); - } - return _testResultsSasUri; - } - - private void EndTestRun(TestRunCompleteEventArgs e) - { - if (_cloudRunMetadata.EnableResultPublish && !FatalTestExecution) - { - try - { - _testRunShard = GetTestRunEndShard(e); - _serviceClient.PostTestRunShardInfo(_testRunShard); - _logger.Info("Successfully ended test run shard"); - } - catch (Exception ex) - { - _logger.Error($"Failed to end test run shard: {ex}"); - } - _consoleWriter.WriteLine($"\nTest Report: {_cloudRunMetadata.PortalUrl!}"); - if (_cloudRunMetadata.EnableGithubSummary) - { - GenerateMarkdownSummary(); - } - } - _cloudRunErrorParser.DisplayMessages(); - } - - private TestRunShardDto GetTestRunEndShard(TestRunCompleteEventArgs e) - { - DateTime testRunEndedOn = DateTime.UtcNow; - long durationInMs = 0; - - var result = FailedTestCount > 0 ? TestCaseResultStatus.s_fAILED : TestCaseResultStatus.s_pASSED; - -#pragma warning disable CS8073 // The result of the expression is always 'true' since a value of type 'TimeSpan' is never equal to 'null' of type 'TimeSpan?' (net8.0) - if (e.ElapsedTimeInRunningTests != null) - { - testRunEndedOn = _cloudRunMetadata.TestRunStartTime.Add(e.ElapsedTimeInRunningTests); - durationInMs = (long)e.ElapsedTimeInRunningTests.TotalMilliseconds; - } -#pragma warning restore CS8073 // The result of the expression is always 'true' since a value of type 'TimeSpan' is never equal to 'null' of type 'TimeSpan?' (net8.0) - - TestRunShardDto? testRunShard = _testRunShard; - // Update Shard End - if (testRunShard!.Summary == null) - testRunShard.Summary = new TestRunShardSummary(); - testRunShard.Summary.Status = "CLIENT_COMPLETE"; - testRunShard.Summary.StartTime = _cloudRunMetadata.TestRunStartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"); - testRunShard.Summary.EndTime = testRunEndedOn.ToString("yyyy-MM-ddTHH:mm:ssZ"); - testRunShard.Summary.TotalTime = durationInMs; - testRunShard.Summary.UploadMetadata = new UploadMetadata() { NumTestResults = TotalTestCount, NumTotalAttachments = TotalArtifactCount, SizeTotalAttachments = TotalArtifactSizeInBytes }; - testRunShard.UploadCompleted = true; - return testRunShard; - } - private void GenerateMarkdownSummary() - { - if (_cIInfo.Provider == CIConstants.s_gITHUB_ACTIONS) - { - string markdownContent = @$" -#### Results: - -![pass](https://img.shields.io/badge/status-passed-brightgreen) **Passed:** {PassedTestCount} - -![fail](https://img.shields.io/badge/status-failed-red) **Failed:** {FailedTestCount} - -![flaky](https://img.shields.io/badge/status-flaky-yellow) **Flaky:** {"0"} - -![skipped](https://img.shields.io/badge/status-skipped-lightgrey) **Skipped:** {SkippedTestCount} - -#### For more details, visit the [service dashboard]({_cloudRunMetadata.PortalUrl}). -"; - - string? filePath = Environment.GetEnvironmentVariable("GITHUB_STEP_SUMMARY"); - try - { - File.WriteAllText(filePath ?? string.Empty, markdownContent); - } - catch (Exception ex) - { - _logger.Error($"Error writing Markdown summary: {ex}"); - } - } - } -#endregion - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/CiInfoProvider.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/CiInfoProvider.cs deleted file mode 100644 index 7987c5829947..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/CiInfoProvider.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; - -internal class CiInfoProvider -{ - private static bool IsGitHubActions(IEnvironment? environment = null) - { - environment ??= new EnvironmentHandler(); - return environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true"; - } - - private static bool IsAzureDevOps(IEnvironment? environment = null) - { - environment ??= new EnvironmentHandler(); - return environment.GetEnvironmentVariable("AZURE_HTTP_USER_AGENT") != null && - environment.GetEnvironmentVariable("TF_BUILD") != null; - } - - internal static string GetCIProvider(IEnvironment? environment = null) - { - if (IsGitHubActions(environment)) - return CIConstants.s_gITHUB_ACTIONS; - else if (IsAzureDevOps(environment)) - return CIConstants.s_aZURE_DEVOPS; - else - return CIConstants.s_dEFAULT; - } - - internal static CIInfo GetCIInfo(IEnvironment? environment = null) - { - environment ??= new EnvironmentHandler(); - string ciProvider = GetCIProvider(environment); - if (ciProvider == CIConstants.s_gITHUB_ACTIONS) - { - // Logic to get GitHub Actions CIInfo - return new CIInfo - { - Provider = CIConstants.s_gITHUB_ACTIONS, - Repo = environment.GetEnvironmentVariable("GITHUB_REPOSITORY_ID"), - Branch = GetGHBranchName(environment), - Author = environment.GetEnvironmentVariable("GITHUB_ACTOR"), - CommitId = environment.GetEnvironmentVariable("GITHUB_SHA"), - RevisionUrl = environment.GetEnvironmentVariable("GITHUB_SERVER_URL") != null - ? $"{environment.GetEnvironmentVariable("GITHUB_SERVER_URL")}/{environment.GetEnvironmentVariable("GITHUB_REPOSITORY")}/commit/{environment.GetEnvironmentVariable("GITHUB_SHA")}" - : null, - RunId = environment.GetEnvironmentVariable("GITHUB_RUN_ID"), - RunAttempt = environment.GetEnvironmentVariable("GITHUB_RUN_ATTEMPT") != null - ? int.Parse(environment.GetEnvironmentVariable("GITHUB_RUN_ATTEMPT")!) - : null, - JobId = environment.GetEnvironmentVariable("GITHUB_JOB") - }; - } - else if (ciProvider == CIConstants.s_aZURE_DEVOPS) - { - // Logic to get Azure DevOps CIInfo - return new CIInfo - { - Provider = CIConstants.s_aZURE_DEVOPS, - Repo = environment.GetEnvironmentVariable("BUILD_REPOSITORY_ID"), - Branch = environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH"), - Author = environment.GetEnvironmentVariable("BUILD_REQUESTEDFOR"), - CommitId = environment.GetEnvironmentVariable("BUILD_SOURCEVERSION"), - RevisionUrl = environment.GetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI") != null - ? $"{environment.GetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI")}{environment.GetEnvironmentVariable("SYSTEM_TEAMPROJECT")}/_git/{environment.GetEnvironmentVariable("BUILD_REPOSITORY_NAME")}/commit/{environment.GetEnvironmentVariable("BUILD_SOURCEVERSION")}" - : null, - RunId = GetADORunId(environment), - RunAttempt = environment.GetEnvironmentVariable("RELEASE_ATTEMPTNUMBER") != null - ? int.Parse(environment.GetEnvironmentVariable("RELEASE_ATTEMPTNUMBER")!) - : int.Parse(environment.GetEnvironmentVariable("SYSTEM_JOBATTEMPT")!), - JobId = environment.GetEnvironmentVariable("RELEASE_DEPLOYMENTID") ?? environment.GetEnvironmentVariable("SYSTEM_JOBID") - }; - } - else - { - // Handle unsupported CI provider - return new CIInfo - { - Provider = CIConstants.s_dEFAULT, - Repo = environment.GetEnvironmentVariable("REPO"), - Branch = environment.GetEnvironmentVariable("BRANCH"), - Author = environment.GetEnvironmentVariable("AUTHOR"), - CommitId = environment.GetEnvironmentVariable("COMMIT_ID"), - RevisionUrl = environment.GetEnvironmentVariable("REVISION_URL"), - RunId = environment.GetEnvironmentVariable("RUN_ID"), - RunAttempt = environment.GetEnvironmentVariable("RUN_ATTEMPT") != null - ? int.Parse(environment.GetEnvironmentVariable("RUN_ATTEMPT")!) - : null, - JobId = environment.GetEnvironmentVariable("JOB_ID") - }; - } - } - - private static string GetADORunId(IEnvironment? environment = null) - { - environment ??= new EnvironmentHandler(); - if (environment.GetEnvironmentVariable("RELEASE_DEFINITIONID") != null && environment.GetEnvironmentVariable("RELEASE_DEPLOYMENTID") != null) - return $"{environment.GetEnvironmentVariable("RELEASE_DEFINITIONID")}-{environment.GetEnvironmentVariable("RELEASE_DEPLOYMENTID")}"; - else - return $"{environment.GetEnvironmentVariable("SYSTEM_DEFINITIONID")}-{environment.GetEnvironmentVariable("SYSTEM_JOBID")}"; - } - - private static string GetGHBranchName(IEnvironment? environment = null) - { - environment ??= new EnvironmentHandler(); - if (environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request" || - environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request_target") - return environment.GetEnvironmentVariable("GITHUB_HEAD_REF")!; - else - return environment.GetEnvironmentVariable("GITHUB_REF_NAME")!; - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/ReporterUtils.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/ReporterUtils.cs deleted file mode 100644 index 1a4048243ada..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Utility/ReporterUtils.cs +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Diagnostics; -using System.Linq; -using System.Runtime.InteropServices; -using System.Security.Cryptography; -using System.Threading.Tasks; -using Azure.Core.Pipeline; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Microsoft.IdentityModel.JsonWebTokens; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility -{ - internal class ReporterUtils - { - private readonly ILogger _logger; - public ReporterUtils(ILogger? logger = null) - { - _logger = logger ?? new Logger(); - } - internal static string GetRunId(CIInfo cIInfo) - { - if (cIInfo.Provider == CIConstants.s_dEFAULT) - { - return Guid.NewGuid().ToString(); - } - var concatString = $"{cIInfo.Provider}-{cIInfo.Repo}-{cIInfo.RunId}-{cIInfo.RunAttempt}"; - return CalculateSha1Hash(concatString); - } - - internal static string CalculateSha1Hash(string input) - { - using (var sha1 = SHA1.Create()) - { - var hash = sha1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(input)); - return BitConverter.ToString(hash).Replace("-", string.Empty).ToLower(); - } - } - internal static string? TruncateData(string? value, int maxLength) - { - if (string.IsNullOrEmpty(value)) - return value; - return value?.Length <= maxLength ? value : value?.Substring(0, maxLength); - } - - internal static string GetRunName(CIInfo ciInfo) - { - string GIT_VERSION_COMMAND = "git --version"; - string GIT_REV_PARSE = "git rev-parse --is-inside-work-tree"; - string GIT_COMMIT_MESSAGE_COMMAND = "git log -1 --pretty=format:\"%s\""; - - if (ciInfo.Provider == CIConstants.s_gITHUB_ACTIONS && - Environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request") - { - var prNumber = Environment.GetEnvironmentVariable("GITHUB_REF_NAME")?.Split('/')[0]; - var repo = Environment.GetEnvironmentVariable("GITHUB_REPOSITORY"); - var prLink = $"{repo}/pull/{prNumber}"; - return $"PR# {prNumber} on Repo: {repo} ({prLink})"; - } - - try - { - string gitVersion = RunCommandAsync(GIT_VERSION_COMMAND).EnsureCompleted(); - if (string.IsNullOrEmpty(gitVersion)) - { - throw new Exception("Git is not installed on the machine"); - } - - string isInsideWorkTree = RunCommandAsync(GIT_REV_PARSE).EnsureCompleted(); - if (isInsideWorkTree.Trim() != "true") - { - throw new Exception("Not inside a git repository"); - } - - string gitCommitMessage = RunCommandAsync(GIT_COMMIT_MESSAGE_COMMAND).EnsureCompleted(); - return gitCommitMessage; - } - catch (Exception) - { - return string.Empty; - } - } - - internal static async Task RunCommandAsync(string command, bool async = false) - { - string shell, shellArgs; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - shell = "/bin/bash"; - shellArgs = $"-c \"{command}\""; - } - else - { - shell = "cmd"; - shellArgs = $"/c {command}"; - } - var processInfo = new ProcessStartInfo(shell, shellArgs) - { - RedirectStandardOutput = true, - UseShellExecute = false, - CreateNoWindow = true - }; - - using (var process = new Process { StartInfo = processInfo }) - { - process.Start(); - string result; - if (async) - { - result = await process.StandardOutput.ReadToEndAsync().ConfigureAwait(false); - } - else - { - result = process.StandardOutput.ReadToEnd(); - } - process.WaitForExit(); - return result; - } - } - - internal static string GetCurrentOS() - { - PlatformID platform = Environment.OSVersion.Platform; - if (platform == PlatformID.Unix) - return OSConstants.s_lINUX; - else if (platform == PlatformID.MacOSX) - return OSConstants.s_mACOS; - else - return OSConstants.s_wINDOWS; - } - - internal TokenDetails ParseWorkspaceIdFromAccessToken(JsonWebTokenHandler? jsonWebTokenHandler, string? accessToken) - { - if (jsonWebTokenHandler == null) - { - jsonWebTokenHandler = new JsonWebTokenHandler(); - } - TokenDetails tokenDetails = new(); - if (string.IsNullOrEmpty(accessToken)) - { - throw new ArgumentNullException(nameof(accessToken), "AccessToken is null or empty"); - } - try - { - JsonWebToken inputToken = (JsonWebToken)jsonWebTokenHandler.ReadToken(accessToken); - var aid = inputToken.Claims.FirstOrDefault(c => c.Type == "aid")?.Value ?? string.Empty; - - if (!string.IsNullOrEmpty(aid)) // Custom Token - { - _logger.Info("Custom Token parsing"); - tokenDetails.aid = aid; - tokenDetails.oid = inputToken.Claims.FirstOrDefault(c => c.Type == "oid")?.Value ?? string.Empty; - tokenDetails.id = inputToken.Claims.FirstOrDefault(c => c.Type == "id")?.Value ?? string.Empty; - tokenDetails.userName = inputToken.Claims.FirstOrDefault(c => c.Type == "name")?.Value ?? string.Empty; - } - else // Entra Token - { - _logger.Info("Entra Token parsing"); - tokenDetails.aid = Environment.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_WORKSPACE_ID) ?? string.Empty; - tokenDetails.oid = inputToken.Claims.FirstOrDefault(c => c.Type == "oid")?.Value ?? string.Empty; - tokenDetails.id = string.Empty; - tokenDetails.userName = inputToken.Claims.FirstOrDefault(c => c.Type == "name")?.Value ?? string.Empty; - // TODO add back suport for old claims https://devdiv.visualstudio.com/OnlineServices/_git/PlaywrightService?path=/src/Common/Authorization/JwtSecurityTokenValidator.cs&version=GBmain&line=200&lineEnd=200&lineStartColumn=30&lineEndColumn=52&lineStyle=plain&_a=contents - } - - return tokenDetails; - } - catch (Exception) - { - throw; - } - } - - internal bool IsTimeGreaterThanCurrentPlus10Minutes(string sasUri) - { - try - { - // Parse the SAS URI - Uri url = new Uri(sasUri); - string query = url.Query; - var queryParams = System.Web.HttpUtility.ParseQueryString(query); - string? expiryTime = queryParams["se"]; // 'se' is the query parameter for the expiry time - - if (!string.IsNullOrEmpty(expiryTime)) - { - // Convert expiry time to a timestamp - DateTime expiryDateTime = DateTime.Parse(expiryTime, null, System.Globalization.DateTimeStyles.RoundtripKind); - long timestampFromIsoString = ((DateTimeOffset)expiryDateTime).ToUnixTimeMilliseconds(); - - // Get current time + 10 minutes in milliseconds - long currentTimestampPlus10Minutes = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + (10 * 60 * 1000); - - bool isSasValidityGreaterThanCurrentTimePlus10Minutes = timestampFromIsoString > currentTimestampPlus10Minutes; - - if (!isSasValidityGreaterThanCurrentTimePlus10Minutes) - { - // Log if SAS is close to expiry - _logger.Info( - $"Sas rotation required because close to expiry, SasUriValidTillTime: {timestampFromIsoString}, CurrentTime: {currentTimestampPlus10Minutes}" - ); - } - - return isSasValidityGreaterThanCurrentTimePlus10Minutes; - } - - _logger.Info("Sas rotation required because expiry param not found."); - return false; - } - catch (Exception ex) - { - _logger.Info($"Sas rotation required because of {ex.Message}."); - return false; - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj deleted file mode 100644 index 60229ecd863c..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - enable - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/EntraLifecycleTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/EntraLifecycleTests.cs deleted file mode 100644 index 87e964b4b0e5..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/EntraLifecycleTests.cs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Microsoft.IdentityModel.JsonWebTokens; -using Microsoft.IdentityModel.Tokens; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; - -[TestFixture] -public class EntraLifecycleTests -{ - private static string GetToken(Dictionary claims, DateTime? expires = null) - { - var tokenHandler = new JsonWebTokenHandler(); - var token = tokenHandler.CreateToken(new SecurityTokenDescriptor - { - Claims = claims, - Expires = expires ?? DateTime.UtcNow.AddMinutes(10), - }); - return token!; - } - - [TearDown] - public void TearDown() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - } - - [Test] - public void Constructor_WhenAccessTokenEnvironmentIsNotSet_DoesNotInitializeEntraToken() - { - EntraLifecycle entraLifecycle = new(); - Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); - } - - [Test] - public void Constructor_WhenAccessTokenEnvironmentIsSetButTokenIsNotValid_DoesNotInitializeEntraToken() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - EntraLifecycle entraLifecycle = new(); - Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); - } - - [Test] - public void Constructor_WhenAccessTokenEnvironmentIsSetAndTokenIsMPTCustomToken_DoesNotInitializeEntraToken() - { - var token = GetToken(new Dictionary - { - {"aid", "account-id-guid"}, - }); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - EntraLifecycle entraLifecycle = new(); - Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); - } - - [Test] - public void Constructor_WhenAccessTokenEnvironmentIsSetAndTokenIsMPTCustomTokenWithAccountIdClaim_DoesNotInitializeEntraToken() - { - var token = GetToken(new Dictionary - { - {"accountId", "account-id-guid"}, - }); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - EntraLifecycle entraLifecycle = new(); - Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); - } - - [Test] - public void Constructor_WhenJWTValidationThrowsException_DoesNotInitializeEntraToken() - { - var token = GetToken(new Dictionary()); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - var jsonWebTokenHandlerMock = new Mock(); - jsonWebTokenHandlerMock - .Setup(x => x.ReadJsonWebToken(token)) - .Throws(new Exception()); - EntraLifecycle entraLifecycle = new(jsonWebTokenHandler: jsonWebTokenHandlerMock.Object); - Assert.That(entraLifecycle._entraIdAccessToken, Is.Null); - } - - [Test] - public void Constructor_WhenAccessTokenEnvironmentIsSetAndValid_InitializeEntraToken() - { - DateTime expiry = DateTime.UtcNow.AddMinutes(10); - var token = GetToken(new Dictionary(), expiry); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - EntraLifecycle entraLifecycle = new(); - Assert.Multiple(() => - { - Assert.That(entraLifecycle._entraIdAccessToken, Is.EqualTo(token)); - Assert.That(entraLifecycle._entraIdAccessTokenExpiry, Is.EqualTo((long)(expiry - new DateTime(1970, 1, 1)).TotalSeconds)); - }); - } - - [Test] - public async Task FetchEntraIdAccessTokenAsync_WhenTokenIsFetched_SetsEnvironmentVariable() - { - var defaultAzureCredentialMock = new Mock(); - var token = "valid_token"; - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); - EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); - await entraLifecycle.FetchEntraIdAccessTokenAsync(); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken), Is.EqualTo(token)); - - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - } - - [Test] - public async Task FetchEntraIdAccessTokenAsync_WhenTokenIsFetched_SetsTokenAndExpiry() - { - var defaultAzureCredentialMock = new Mock(); - var token = "valid_token"; - DateTimeOffset expiry = DateTimeOffset.UtcNow.AddMinutes(10); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, expiry)); - EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); - await entraLifecycle.FetchEntraIdAccessTokenAsync(); - Assert.That(entraLifecycle._entraIdAccessToken, Is.EqualTo(token)); - Assert.That(entraLifecycle._entraIdAccessTokenExpiry, Is.EqualTo((int)expiry.ToUnixTimeSeconds())); - - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - } - - [Test] - public async Task FetchEntraIdAccessTokenAsync_WhenTokenIsFetched_ReturnVoid() - { - var defaultAzureCredentialMock = new Mock(); - var token = "valid_token"; - DateTimeOffset expiry = DateTimeOffset.UtcNow.AddMinutes(10); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, expiry)); - EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); - await entraLifecycle.FetchEntraIdAccessTokenAsync(); - - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - } - - [Test] - public void FetchEntraIdAccessTokenAsync_WhenThrowsError() - { - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception("sample exception")); - EntraLifecycle entraLifecycle = new(defaultAzureCredentialMock.Object); - Exception? ex = Assert.ThrowsAsync(async () => - await entraLifecycle.FetchEntraIdAccessTokenAsync()); - - Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); - } - - [Test] - public void DoesEntraIdAccessTokenRequireRotation_WhenEntraIdAccessTokenIsEmpty_ReturnsTrue() - { - EntraLifecycle entraLifecycle = new() - { - _entraIdAccessToken = "" - }; - Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.True); - } - - [Test] - public void DoesEntraIdAccessTokenRequireRotation_WhenEntraIdAccessTokenIsNull_ReturnsTrue() - { - EntraLifecycle entraLifecycle = new() - { - _entraIdAccessToken = null - }; - Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.True); - } - - [Test] - public void DoesEntraIdAccessTokenRequireRotation_WhenTokenIsNotAboutToExpire_ReturnsFalse() - { - EntraLifecycle entraLifecycle = new() - { - _entraIdAccessToken = "valid_token", - _entraIdAccessTokenExpiry = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 1000 // more than threshold of 10 mins - }; - Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.False); - } - - [Test] - public void DoesEntraIdAccessTokenRequireRotation_WhenTokenIsAboutToExpire_ReturnsTrue() - { - EntraLifecycle entraLifecycle = new() - { - _entraIdAccessToken = "valid_token", - _entraIdAccessTokenExpiry = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 400 // less than threshold of 10 mins - }; - Assert.That(entraLifecycle.DoesEntraIdAccessTokenRequireRotation(), Is.True); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/BlobServiceTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/BlobServiceTests.cs deleted file mode 100644 index 37df3b698c40..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/BlobServiceTests.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Implementation -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class BlobServiceTests - { - private Mock? _loggerMock; - private BlobService? _blobService; - - [SetUp] - public void Setup() - { - _loggerMock = new Mock(); - _blobService = new BlobService(_loggerMock.Object); - } - [Test] - public async Task UploadBufferAsync_WithException_LogsError() - { - string uri = "invalid_uri"; - string buffer = "Test buffer"; - string fileRelativePath = "test/path"; - - await _blobService!.UploadBufferAsync(uri, buffer, fileRelativePath); - - _loggerMock!.Verify(logger => logger.Error(It.IsAny()), Times.Once); - } - - [Test] - public void UploadBuffer_WithException_LogsError() - { - string uri = "invalid_uri"; - string buffer = "Test buffer"; - string fileRelativePath = "test/path"; - - _blobService!.UploadBuffer(uri, buffer, fileRelativePath); - - _loggerMock!.Verify(logger => logger.Error(It.IsAny()), Times.Once); - } - - [Test] - public void GetCloudFilePath_WithValidParameters_ReturnsCorrectPath() - { - string uri = "https://example.com/container"; - string fileRelativePath = "test/path"; - string expectedPath = "https://example.com/container/test/path?"; - - string? result = _blobService?.GetCloudFilePath(uri, fileRelativePath); - - Assert.AreEqual(expectedPath, result); - } - - [Test] - public void GetCloudFilePath_WithSasUri_ReturnsCorrectPath() - { - string uri = "https://example.com/container?sasToken"; - string fileRelativePath = "test/path"; - string expectedPath = "https://example.com/container/test/path?sasToken"; - - string? result = _blobService?.GetCloudFilePath(uri, fileRelativePath); - - Assert.AreEqual(expectedPath, result); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/CloudRunErrorParserTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/CloudRunErrorParserTests.cs deleted file mode 100644 index 261b28ee17d8..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/CloudRunErrorParserTests.cs +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Implementation -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class CloudRunErrorParserTests - { - private Mock? _loggerMock; - private Mock? _consoleWriterMock; - private CloudRunErrorParser? _errorParser; - - [SetUp] - public void Setup() - { - _loggerMock = new Mock(); - _consoleWriterMock = new Mock(); - _errorParser = new CloudRunErrorParser(_loggerMock.Object, _consoleWriterMock.Object); - } - - [Test] - public void TryPushMessageAndKey_WithValidMessageAndKey_ReturnsTrue() - { - string message = "Test message"; - string key = "Test key"; - - bool result = _errorParser!.TryPushMessageAndKey(message, key); - - Assert.IsTrue(result); - } - - [Test] - public void TryPushMessageAndKey_WithNullOrEmptyMessage_ReturnsFalse() - { - string? message = null; - string key = "Test key"; - - bool result = _errorParser!.TryPushMessageAndKey(message, key); - - Assert.IsFalse(result); - } - - [Test] - public void TryPushMessageAndKey_WithNullOrEmptyKey_ReturnsFalse() - { - string message = "Test message"; - string? key = null; - - bool result = _errorParser!.TryPushMessageAndKey(message, key); - - Assert.IsFalse(result); - } - - [Test] - public void TryPushMessageAndKey_WithExistingKey_ReturnsFalse() - { - string message = "Test message"; - string key = "Existing key"; - _errorParser!.TryPushMessageAndKey(message, key); - - bool result = _errorParser.TryPushMessageAndKey(message, key); - - Assert.IsFalse(result); - } - - [Test] - public void PushMessage_AddsMessageToList() - { - string message = "Test message"; - - _errorParser!.PushMessage(message); - - CollectionAssert.Contains(_errorParser!.InformationalMessages, message); - } - - [Test] - public void DisplayMessages_WithMessages_WritesMessagesToConsole() - { - _errorParser!.PushMessage("Message 1"); - _errorParser.PushMessage("Message 2"); - - _errorParser.DisplayMessages(); - - _consoleWriterMock!.Verify(cw => cw.WriteLine(null), Times.Once); - _consoleWriterMock.Verify(cw => cw.WriteLine("1) Message 1"), Times.Once); - _consoleWriterMock.Verify(cw => cw.WriteLine("2) Message 2"), Times.Once); - } - - [Test] - public void DisplayMessages_WithoutMessages_DoesNotWriteToConsole() - { - _errorParser!.DisplayMessages(); - - _consoleWriterMock!.Verify(cw => cw.WriteLine(null), Times.Never); - _consoleWriterMock.Verify(cw => cw.WriteLine(It.IsAny()), Times.Never); - } - - [Test] - public void PrintErrorToConsole_WritesErrorMessageToConsole() - { - string errorMessage = "Test error message"; - - _errorParser!.PrintErrorToConsole(errorMessage); - - _consoleWriterMock!.Verify(cw => cw.WriteError(errorMessage), Times.Once); - } - - [Test] - public void HandleScalableRunErrorMessage_WithNullMessage_DoesNotPushMessage() - { - _errorParser!.HandleScalableRunErrorMessage(null); - - Assert.IsEmpty(_errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessage_WithoutMatchingPattern_DoesNotPushMessage() - { - string message = "Unknown error"; - - _errorParser!.HandleScalableRunErrorMessage(message); - - Assert.IsEmpty(_errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessage401_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 401 Unauthorized"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The authentication token provided is invalid. Please check the token and try again."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageNoPermissionOnWorkspaceScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nCheckAccess API call with non successful response."; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = @"You do not have the required permissions to run tests. This could be because: - - a. You do not have the required roles on the workspace. Only Owner and Contributor roles can run tests. Contact the service administrator. - b. The workspace you are trying to run the tests on is in a different Azure tenant than what you are signed into. Check the tenant id from Azure portal and login using the command 'az login --tenant '."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageInvalidWorkspaceScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nInvalidAccountOrSubscriptionState"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The specified workspace does not exist. Please verify your workspace settings."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageInvalidAccessToken_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nInvalidAccessToken"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The provided access token does not match the specified workspace URL. Please verify that both values are correct."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageAccessTokenOrUserOrWorkspaceNotFoundScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 404 Not Found\r\nNotFound"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The data for the user, workspace or access token was not found. Please check the request or create new token and try again."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageAccessKeyBasedAuthNotSupportedScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_123/browsers 403 Forbidden\r\nAccessKeyBasedAuthNotSupported"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "Authentication through service access token is disabled for this workspace. Please use Entra ID to authenticate."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageServiceUnavailableScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_1120dd21-4e05-4b3d-8b54-e329307ff214/browsers 503 Service Unavailable"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The service is currently unavailable. Please check the service status and try again."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageGatewayTimeoutScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = " Microsoft.Playwright.PlaywrightException : WebSocket error: wss://eastus.api.playwright.microsoft.com/accounts/eastus_1120dd21-4e05-4b3d-8b54-e329307ff214/browsers 504 Gateway Timeout"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The request to the service timed out. Please try again later."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageQuotaLimitErrorScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = "Timeout 60000s exceeded,\r\nws connecting wss://eastus.api.playwright.microsoft.com/accounts/eastus_1120dd21-4e05-4b3d-8b54-e329307ff214/browsers"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "It is possible that the maximum number of concurrent sessions allowed for your workspace has been exceeded."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - - [Test] - public void HandleScalableRunErrorMessageBrowserConnectionErrorScalable_WithMatchingPattern_PushesMessage() - { - string errorMessage = "Target page, context or browser has been closed"; - - _errorParser!.HandleScalableRunErrorMessage(errorMessage); - var message = "The service is currently unavailable. Please try again after some time."; - Assert.Contains(message, _errorParser.InformationalMessages); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/ServiceClientTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/ServiceClientTests.cs deleted file mode 100644 index 30f34150a1f5..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/ServiceClientTests.cs +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Text.Json; -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Implementation -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class ServiceClientTests - { - private ServiceClient? _serviceClient; - private Mock? _mockTestReportingClient; - private Mock? _mockCloudRunErrorParser; - private Mock? _mockLogger; - private CloudRunMetadata? _cloudRunMetadata; - - [SetUp] - public void Setup() - { - _mockTestReportingClient = new Mock(); - _mockCloudRunErrorParser = new Mock(); - _mockLogger = new Mock(); - _cloudRunMetadata = new CloudRunMetadata - { - BaseUri = new Uri("https://example.com"), - WorkspaceId = "workspaceId", - RunId = "runId" - }; - - _serviceClient = new ServiceClient(_cloudRunMetadata, _mockCloudRunErrorParser.Object, _mockTestReportingClient.Object, _mockLogger.Object); - } - - [Test] - public void PatchTestRunInfo_ReturnsTestRunDto() - { - var run = new TestRunDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(run)); - - responseMock.SetupGet(r => r.Status).Returns(200); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - TestRunDto? result = _serviceClient!.PatchTestRunInfo(run); - - Assert.IsNotNull(result); - } - - [Test] - public void PatchTestRunInfo_On409Conflict_Throws() - { - var run = new TestRunDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(run)); - - responseMock.SetupGet(r => r.Status).Returns(409); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Throws(new RequestFailedException(responseMock.Object)); - - Assert.Throws(() => _serviceClient!.PatchTestRunInfo(run)); - - _mockCloudRunErrorParser!.Verify(x => x.PrintErrorToConsole(It.IsAny()), Times.Once); - _mockCloudRunErrorParser.Verify(x => x.TryPushMessageAndKey(It.IsAny(), ReporterConstants.s_cONFLICT_409_ERROR_MESSAGE_KEY), Times.Once); - } - - [Test] - public void PatchTestRunInfo_On403Forbidden_Throws() - { - var run = new TestRunDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(run)); - - responseMock.SetupGet(r => r.Status).Returns(403); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Throws(new RequestFailedException(responseMock.Object)); - - Assert.Throws(() => _serviceClient!.PatchTestRunInfo(run)); - - _mockCloudRunErrorParser!.Verify(x => x.PrintErrorToConsole(It.IsAny()), Times.Once); - _mockCloudRunErrorParser.Verify(x => x.TryPushMessageAndKey(It.IsAny(), ReporterConstants.s_fORBIDDEN_403_ERROR_MESSAGE_KEY), Times.Once); - } - - [Test] - public void PatchTestRunInfo_OnAPIError_ReturnsNull() - { - var run = new TestRunDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(run)); - - responseMock.SetupGet(r => r.Status).Returns(401); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Throws(new RequestFailedException(responseMock.Object)); - - TestRunDto? result = _serviceClient!.PatchTestRunInfo(run); - - Assert.IsNull(result); - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); - } - - [Test] - public void PatchTestRunInfo_OnSuccessButNot200_ReturnsNull() - { - var run = new TestRunDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(run)); - - responseMock.SetupGet(r => r.Status).Returns(201); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PatchTestRunInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - TestRunDto? result = _serviceClient!.PatchTestRunInfo(run); - - Assert.IsNull(result); - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); - } - - [Test] - public void PostTestRunShardInfo_ReturnsTestRunShardDto() - { - var shard = new TestRunShardDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(shard)); - - responseMock.SetupGet(r => r.Status).Returns(200); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PostTestRunShardInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - TestRunShardDto? result = _serviceClient!.PostTestRunShardInfo(shard); - - Assert.IsNotNull(result); - } - - [Test] - public void PostTestRunShardInfo_OnAPIError_ReturnsNull() - { - var shard = new TestRunShardDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(shard)); - - responseMock.SetupGet(r => r.Status).Returns(401); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PostTestRunShardInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Throws(new RequestFailedException(responseMock.Object)); - - TestRunShardDto? result = _serviceClient!.PostTestRunShardInfo(shard); - - Assert.IsNull(result); - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); - } - - [Test] - public void PostTestRunShardInfo_OnSuccessButNot200_ReturnsNull() - { - var shard = new TestRunShardDto(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(shard)); - - responseMock.SetupGet(r => r.Status).Returns(201); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.PostTestRunShardInfo( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - TestRunShardDto? result = _serviceClient!.PostTestRunShardInfo(shard); - - Assert.IsNull(result); - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); - } - - [Test] - public void GetTestRunResultsUri_ReturnsTestResultsUri() - { - var testResultsUri = new TestResultsUri(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(testResultsUri)); - - responseMock.SetupGet(r => r.Status).Returns(200); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.GetTestRunResultsUri( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - TestResultsUri? result = _serviceClient!.GetTestRunResultsUri(); - - Assert.IsNotNull(result); - } - - [Test] - public void GetTestRunResultsUri_OnAPIError_ReturnsNull() - { - var testResultsUri = new TestResultsUri(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(testResultsUri)); - - responseMock.SetupGet(r => r.Status).Returns(401); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.GetTestRunResultsUri( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Throws(new RequestFailedException(responseMock.Object)); - - TestResultsUri? result = _serviceClient!.GetTestRunResultsUri(); - - Assert.IsNull(result); - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); - } - - [Test] - public void GetTestRunResultsUri_OnSuccessButNot200_ReturnsNull() - { - var testResultsUri = new TestResultsUri(); - var responseMock = new Mock(); - var responseContent = new BinaryData(JsonSerializer.Serialize(testResultsUri)); - - responseMock.SetupGet(r => r.Status).Returns(201); - responseMock.SetupGet(r => r.Content).Returns(responseContent!); - - _mockTestReportingClient!.Setup(x => x.GetTestRunResultsUri( - _cloudRunMetadata!.WorkspaceId!, - _cloudRunMetadata.RunId!, - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - TestResultsUri? result = _serviceClient!.GetTestRunResultsUri(); - - Assert.IsNull(result); - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); - } - - [Test] - public void UploadBatchTestResults_Returns() - { - var responseMock = new Mock(); - - responseMock.SetupGet(r => r.Status).Returns(200); - - _mockTestReportingClient!.Setup(x => x.UploadBatchTestResults( - _cloudRunMetadata!.WorkspaceId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - _serviceClient!.UploadBatchTestResults(new UploadTestResultsRequest()); - } - - [Test] - public void UploadBatchTestResults_OnAPIError_Returns() - { - var responseMock = new Mock(); - - responseMock.SetupGet(r => r.Status).Returns(401); - - _mockTestReportingClient!.Setup(x => x.UploadBatchTestResults( - _cloudRunMetadata!.WorkspaceId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Throws(new RequestFailedException(responseMock.Object)); - - _serviceClient!.UploadBatchTestResults(new UploadTestResultsRequest()); - - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "401"), Times.Once); - } - - [Test] - public void UploadBatchTestResults_OnSuccessButNot200_Returns() - { - var responseMock = new Mock(); - - responseMock.SetupGet(r => r.Status).Returns(201); - - _mockTestReportingClient!.Setup(x => x.UploadBatchTestResults( - _cloudRunMetadata!.WorkspaceId!, - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns(responseMock.Object); - - _serviceClient!.UploadBatchTestResults(new UploadTestResultsRequest()); - - _mockCloudRunErrorParser!.Verify(x => x.TryPushMessageAndKey(It.IsAny(), "201"), Times.Once); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/XmlRunSettingsTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/XmlRunSettingsTests.cs deleted file mode 100644 index 49f2f53c021f..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Implementation/XmlRunSettingsTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using System.Collections.Generic; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Implementation -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - internal class XmlRunSettingsTests - { - [Test] - public void GetNUnitParameters_WhenSettingsXmlContainsNUnitNode_ReturnsParameters() - { - var xmlRunSettings = new XmlRunSettings(); - var settingsXml = @"5False"; - - Dictionary parameters = xmlRunSettings.GetNUnitParameters(settingsXml); - - Assert.AreEqual(2, parameters.Count); - Assert.AreEqual(parameters["NumberOfTestWorkers"], "5"); - Assert.AreEqual(parameters["StopOnError"], "False"); - } - - [Test] - public void GetNUnitParameters_WhenSettingsXmlContainsInvalidNode_ReturnsEmptyDictionary() - { - var xmlRunSettings = new XmlRunSettings(); - var settingsXml = @"5 parameters = xmlRunSettings.GetNUnitParameters(settingsXml); - - Assert.AreEqual(0, parameters.Count); - } - - [Test] - public void GetNUnitParameters_WhenSettingsXmlDoesNotContainNUnitNode_ReturnsEmptyDictionary() - { - var xmlRunSettings = new XmlRunSettings(); - var settingsXml = @"5False"; - - Dictionary parameters = xmlRunSettings.GetNUnitParameters(settingsXml); - - Assert.AreEqual(0, parameters.Count); - } - - [Test] - public void GetNUnitParameters_WhenSettingsXmlIsNull_ReturnsEmptyDictionary() - { - var xmlRunSettings = new XmlRunSettings(); - - Dictionary parameters = xmlRunSettings.GetNUnitParameters(null); - - Assert.AreEqual(0, parameters.Count); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/CloudRunMetadataTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/CloudRunMetadataTests.cs deleted file mode 100644 index 844bdbcb8930..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/CloudRunMetadataTests.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Model -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class CloudRunMetadataTests - { - [Test] - public void TestPortalUrl() - { - var metadata = new CloudRunMetadata - { - WorkspaceId = "eastus_2e8c076a-b67c-4984-b861-8d22d7b525c6", - RunId = "#run456^1" - }; - - string portalUrl = metadata.PortalUrl!; - - string expectedPortalUrl = "https://playwright.microsoft.com/workspaces/eastus_2e8c076a-b67c-4984-b861-8d22d7b525c6/runs/%23run456%5E1"; - Assert.AreEqual(expectedPortalUrl, portalUrl); - } - - [Test] - public void TestEnableResultPublish() - { - var metadata = new CloudRunMetadata(); - - bool enableResultPublish = metadata.EnableResultPublish; - - Assert.IsTrue(enableResultPublish); - } - - [Test] - public void TestEnableGithubSummary() - { - var metadata = new CloudRunMetadata(); - - bool enableGithubSummary = metadata.EnableGithubSummary; - - Assert.IsTrue(enableGithubSummary); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/MPTResultTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/MPTResultTests.cs deleted file mode 100644 index 30cb8f3297fe..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Model/MPTResultTests.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Model -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class MPTResultTests - { - [Test] - public void RawTestResult_Errors_Initialized() - { - var rawTestResult = new RawTestResult(); - Assert.AreEqual("[]", rawTestResult.errors); - Assert.AreEqual("[]", rawTestResult.stdOut); - Assert.AreEqual("[]", rawTestResult.stdErr); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightReporterTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightReporterTests.cs deleted file mode 100644 index 9f4d9efe8296..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightReporterTests.cs +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Microsoft.IdentityModel.JsonWebTokens; -using Microsoft.IdentityModel.Tokens; -using Moq; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests -{ - [TestFixture] - internal class PlaywrightReporterTests - { - [TearDown] - public void TearDown() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); - Environment.SetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL, null); - } - - private static string GetToken(Dictionary claims, DateTime? expires = null) - { - var tokenHandler = new JsonWebTokenHandler(); - var token = tokenHandler.CreateToken(new SecurityTokenDescriptor - { - Claims = claims, - Expires = expires ?? DateTime.UtcNow.AddMinutes(10), - }); - return token!; - } - - [Test] - public void PlaywrightReporter_Ctor_WithNulls() - { - var reporter = new PlaywrightReporter(); - Assert.NotNull(reporter._environment); - Assert.NotNull(reporter._xmlRunSettings); - Assert.NotNull(reporter._consoleWriter); - Assert.NotNull(reporter._jsonWebTokenHandler); - Assert.NotNull(reporter._logger); - - Assert.Null(reporter._parametersDictionary); - Assert.Null(reporter._playwrightService); - Assert.Null(reporter._testProcessor); - } - - [Test] - public void InitializePlaywrightReporter_InvalidRunSettings_PrintsMessageAndExits() - { - var consoleWriterMock = new Mock(); - var environmentMock = new Mock(); - - environmentMock.Setup(e => e.Exit(It.IsAny())).Callback(i => { }); - consoleWriterMock.Setup(c => c.WriteError(It.IsAny())).Verifiable(); - - var xmlSettings = @" - - - - - -"; - var reporter = new PlaywrightReporter(logger: null, environment: environmentMock.Object, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - reporter.InitializePlaywrightReporter(xmlSettings); - - consoleWriterMock.Verify(c => c.WriteError(It.IsRegex("Failed to initialize PlaywrightServiceSettings")), Times.Once); - environmentMock.Verify(e => e.Exit(1), Times.Once); - Assert.Null(reporter._testProcessor); - } - - [Test] - public void InitializePlaywrightReporter_WithNoServiceUrl_PrintsMessageAndExits() - { - var consoleWriterMock = new Mock(); - var environmentMock = new Mock(); - - environmentMock.Setup(e => e.Exit(It.IsAny())).Callback(i => { }); - consoleWriterMock.Setup(c => c.WriteError(It.IsAny())).Verifiable(); - - var reporter = new PlaywrightReporter(logger: null, environment: environmentMock.Object, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - - reporter.InitializePlaywrightReporter(""); - - consoleWriterMock.Verify(c => c.WriteError(Constants.s_no_service_endpoint_error_message), Times.Once); - environmentMock.Verify(e => e.Exit(1), Times.Once); - Assert.Null(reporter._testProcessor); - } - - [Test] - public void InitializePlaywrightReporter_WithNoAccessToken_PrintsMessageAndExits() - { - var consoleWriterMock = new Mock(); - var environmentMock = new Mock(); - - environmentMock.Setup(e => e.Exit(It.IsAny())).Callback(i => { }); - environmentMock.Setup(e => e.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL)).Returns("reporting-url"); - consoleWriterMock.Setup(c => c.WriteError(It.IsAny())).Verifiable(); - - var reporter = new PlaywrightReporter(logger: null, environment: environmentMock.Object, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - - reporter.InitializePlaywrightReporter(""); - - consoleWriterMock.Verify(c => c.WriteError(Constants.s_no_auth_error), Times.Once); - environmentMock.Verify(e => e.Exit(1), Times.Once); - Assert.Null(reporter._testProcessor); - } - - [Test] - public void InitializePlaywrightReporter_Default_SetsUpTestProcessor() - { - var consoleWriterMock = new Mock(); - var environmentMock = new Mock(); - var accessToken = GetToken(new Dictionary { { "aid", "account-id-guid" }, { "oid", "org-id" }, { "id", "uuid" }, { "name", "username" } }); - - environmentMock.Setup(e => e.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId)).Returns("run-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL)).Returns("https://eastus.reporting.api.playwright.microsoft.com"); - environmentMock.Setup(e => e.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)).Returns(accessToken); - - var reporter = new PlaywrightReporter(logger: null, environment: environmentMock.Object, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - - reporter.InitializePlaywrightReporter(""); - - Assert.NotNull(reporter._testProcessor); - Assert.Multiple(() => - { - Assert.AreEqual("run-id", reporter._testProcessor!._cloudRunMetadata.RunId!); - Assert.AreEqual("account-id-guid", reporter._testProcessor!._cloudRunMetadata.WorkspaceId!); - Assert.AreEqual(new Uri("https://eastus.reporting.api.playwright.microsoft.com"), reporter._testProcessor!._cloudRunMetadata.BaseUri!); - Assert.IsTrue(reporter._testProcessor!._cloudRunMetadata.EnableResultPublish); - Assert.IsTrue(reporter._testProcessor!._cloudRunMetadata.EnableGithubSummary); - Assert.NotNull(reporter._testProcessor!._cloudRunMetadata.TestRunStartTime); - Assert.AreEqual(1, reporter._testProcessor!._cloudRunMetadata.NumberOfTestWorkers); - Assert.AreEqual("account-id-guid", reporter._testProcessor!._cloudRunMetadata.AccessTokenDetails!.aid!); - Assert.AreEqual("org-id", reporter._testProcessor!._cloudRunMetadata.AccessTokenDetails!.oid!); - Assert.AreEqual("uuid", reporter._testProcessor!._cloudRunMetadata.AccessTokenDetails!.id!); - Assert.AreEqual("username", reporter._testProcessor!._cloudRunMetadata.AccessTokenDetails!.userName!); - }); - } - - [Test] - public void InitializePlaywrightReporter_WithGHCI_UsesCIInfoToCreateRunIdAndPopulateTestProcessor() - { - var consoleWriterMock = new Mock(); - var environmentMock = new Mock(); - var accessToken = GetToken(new Dictionary { { "aid", "account-id-guid" }, { "oid", "org-id" }, { "id", "uuid" }, { "name", "username" } }); - - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_ACTIONS")).Returns("true"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_RUN_ID")).Returns("run-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_REPOSITORY_ID")).Returns("repo-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_ACTOR")).Returns("actor"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_SHA")).Returns("commit-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_SERVER_URL")).Returns("https://github.com"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_REPOSITORY")).Returns("repo"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_RUN_ATTEMPT")).Returns("1"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_JOB")).Returns("job-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("GITHUB_REF_NAME")).Returns("branch-name"); - environmentMock.Setup(e => e.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL)).Returns("https://eastus.reporting.api.playwright.microsoft.com"); - environmentMock.Setup(e => e.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)).Returns(accessToken); - - var reporter = new PlaywrightReporter(logger: null, environment: environmentMock.Object, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - - reporter.InitializePlaywrightReporter(""); - - Assert.NotNull(reporter._testProcessor); - var runId = ReporterUtils.CalculateSha1Hash($"{CIConstants.s_gITHUB_ACTIONS}-repo-id-run-id-1"); - Assert.Multiple(() => - { - Assert.AreEqual("run-id", reporter._testProcessor!._cIInfo.RunId); - Assert.AreEqual("repo-id", reporter._testProcessor!._cIInfo.Repo); - Assert.AreEqual("commit-id", reporter._testProcessor!._cIInfo.CommitId); - Assert.AreEqual("actor", reporter._testProcessor!._cIInfo.Author); - Assert.AreEqual("branch-name", reporter._testProcessor!._cIInfo.Branch); - Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, reporter._testProcessor!._cIInfo.Provider); - Assert.AreEqual("job-id", reporter._testProcessor!._cIInfo.JobId); - Assert.AreEqual(1, reporter._testProcessor!._cIInfo.RunAttempt); - Assert.AreEqual(reporter._testProcessor!._cIInfo.RevisionUrl, "https://github.com/repo/commit/commit-id"); - }); - environmentMock.Verify(e => e.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId), Times.Once); - } - - [Test] - public void InitializePlaywrightReporter_WithADOCI_UsesCIInfoToCreateRunIdAndPopulateTestProcessor() - { - var consoleWriterMock = new Mock(); - var environmentMock = new Mock(); - var accessToken = GetToken(new Dictionary { { "aid", "account-id-guid" }, { "oid", "org-id" }, { "id", "uuid" }, { "name", "username" } }); - - environmentMock.Setup(e => e.GetEnvironmentVariable("AZURE_HTTP_USER_AGENT")).Returns("true"); - environmentMock.Setup(e => e.GetEnvironmentVariable("TF_BUILD")).Returns("true"); - environmentMock.Setup(e => e.GetEnvironmentVariable("BUILD_REPOSITORY_ID")).Returns("repo-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("BUILD_REQUESTEDFOR")).Returns("actor"); - environmentMock.Setup(e => e.GetEnvironmentVariable("BUILD_SOURCEVERSION")).Returns("commit-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI")).Returns("https://ado.com/"); - environmentMock.Setup(e => e.GetEnvironmentVariable("SYSTEM_TEAMPROJECT")).Returns("project"); - environmentMock.Setup(e => e.GetEnvironmentVariable("BUILD_REPOSITORY_NAME")).Returns("repo"); - environmentMock.Setup(e => e.GetEnvironmentVariable("RELEASE_ATTEMPTNUMBER")).Returns("1"); - environmentMock.Setup(e => e.GetEnvironmentVariable("BUILD_SOURCEBRANCH")).Returns("branch-name"); - environmentMock.Setup(e => e.GetEnvironmentVariable("RELEASE_DEFINITIONID")).Returns("definition-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable("RELEASE_DEPLOYMENTID")).Returns("release-id"); - environmentMock.Setup(e => e.GetEnvironmentVariable(ReporterConstants.s_pLAYWRIGHT_SERVICE_REPORTING_URL)).Returns("https://eastus.reporting.api.playwright.microsoft.com"); - environmentMock.Setup(e => e.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)).Returns(accessToken); - - var reporter = new PlaywrightReporter(logger: null, environment: environmentMock.Object, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - - reporter.InitializePlaywrightReporter(""); - - Assert.NotNull(reporter._testProcessor); - var runId = ReporterUtils.CalculateSha1Hash($"{CIConstants.s_aZURE_DEVOPS}-repo-id-definition-id-release-id-1"); - Assert.Multiple(() => - { - Assert.AreEqual("definition-id-release-id", reporter._testProcessor!._cIInfo.RunId); - Assert.AreEqual("repo-id", reporter._testProcessor!._cIInfo.Repo); - Assert.AreEqual("commit-id", reporter._testProcessor!._cIInfo.CommitId); - Assert.AreEqual("actor", reporter._testProcessor!._cIInfo.Author); - Assert.AreEqual("branch-name", reporter._testProcessor!._cIInfo.Branch); - Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, reporter._testProcessor!._cIInfo.Provider); - Assert.AreEqual("release-id", reporter._testProcessor!._cIInfo.JobId); - Assert.AreEqual(1, reporter._testProcessor!._cIInfo.RunAttempt); - Assert.AreEqual(reporter._testProcessor!._cIInfo.RevisionUrl, "https://ado.com/project/_git/repo/commit/commit-id"); - }); - environmentMock.Verify(e => e.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId), Times.Once); - } - - [Test] - public void InitializePlaywrightReporter_ParseRunSettings_SetupTestProcessor() - { - var consoleWriterMock = new Mock(); - var accessToken = GetToken(new Dictionary { { "aid", "eastus_e3d6f8f5-8c4e-4f74-a6f6-6b6d423d6d42" }, { "oid", "org-id" }, { "id", "uuid" }, { "name", "username" } }); - - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, "wss://eastus.api.playwright.microsoft.com/accounts/eastus_e3d6f8f5-8c4e-4f74-a6f6-6b6d423d6d42/browsers"); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, accessToken); - - var reporter = new PlaywrightReporter(logger: null, environment: null, xmlRunSettings: null, consoleWriter: consoleWriterMock.Object, jsonWebTokenHandler: null); - var xmlSettings = @" - - - - - - - - - 3 - - -"; - reporter.InitializePlaywrightReporter(xmlSettings); - - Assert.NotNull(reporter._testProcessor); - Assert.Multiple(() => - { - Assert.AreEqual("Sample-Run-Id", reporter._testProcessor!._cloudRunMetadata.RunId!); - Assert.AreEqual(new Uri("https://eastus.reporting.api.playwright.microsoft.com"), reporter._testProcessor!._cloudRunMetadata.BaseUri!); - Assert.IsFalse(reporter._testProcessor!._cloudRunMetadata.EnableResultPublish); - Assert.IsFalse(reporter._testProcessor!._cloudRunMetadata.EnableGithubSummary); - Assert.AreEqual(3, reporter._testProcessor!._cloudRunMetadata.NumberOfTestWorkers); - Assert.AreEqual(ServiceAuthType.AccessToken, reporter._playwrightService!.ServiceAuth); - }); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceClientTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceClientTests.cs deleted file mode 100644 index a1896981a53c..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceClientTests.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Linq; -using System.Net.Http; -using System.Threading.Tasks; -using Azure.Core.TestFramework; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; - -public class PlaywrightServiceClientTests : RecordedTestBase -{ - private PlaywrightService? _playwrightService; - private static string Access_Token => Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken)!; - - public PlaywrightServiceClientTests(bool isAsync) : base(isAsync, RecordedTestMode.Live) { } - - [SetUp] - public async Task Setup() - { - var workspaceId = TestUtils.GetWorkspaceIdFromDashboardEndpoint(TestEnvironment.DashboardEndpoint); - var region = TestEnvironment.Region; - var serviceApiEndpoint = TestUtils.GetPlaywrightServiceAPIEndpoint(workspaceId, region); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, serviceApiEndpoint); - _playwrightService = new PlaywrightService(new PlaywrightServiceOptions(), credential: TestEnvironment.Credential); - await _playwrightService.InitializeAsync(); - } - - [TearDown] - public void Teardown() - { - _playwrightService?.Cleanup(); - } - - [Test] - [Category("Live")] - public async Task TestPlaywrightServiceConnection() - { - var workspaceId = TestUtils.GetWorkspaceIdFromDashboardEndpoint(TestEnvironment.DashboardEndpoint); - var region = TestEnvironment.Region; - var serviceApiEndpoint = TestUtils.GetPlaywrightServiceAPIEndpoint(workspaceId, region); - var client = new HttpClient(new HttpClientHandler - { - AllowAutoRedirect = false - }); - var request = new HttpRequestMessage(HttpMethod.Get, serviceApiEndpoint); - request.Headers.Add("Authorization", $"Bearer {Access_Token}"); - request.RequestUri = new Uri($"{request.RequestUri}?cap={{}}"); - HttpResponseMessage response = await client.SendAsync(request); - response.Headers.TryGetValues("Location", out System.Collections.Generic.IEnumerable? location); - Assert.AreEqual(302, (int)response.StatusCode); - Assert.IsTrue(location!.Any(url => url.Contains("browser.playwright.microsoft.com"))); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceOptionsTest.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceOptionsTest.cs deleted file mode 100644 index 9e14a02d5009..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceOptionsTest.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Identity; -using System; -using System.Runtime.InteropServices; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; - -[TestFixture] -[Parallelizable(ParallelScope.Self)] -public class PlaywrightServiceOptionsTest -{ - [Test] - public void Constructor_ShouldInitializeProperties() - { - var os = OSPlatform.Linux; - var runId = "test-run-id"; - var exposeNetwork = "true"; - var serviceAuth = ServiceAuthType.EntraId; - var useCloudHostedBrowsers = "true"; - var azureTokenCredentialType = AzureTokenCredentialType.ManagedIdentityCredential; - var managedIdentityClientId = "test-client-id"; - - var settings = new PlaywrightServiceOptions( - os, runId, exposeNetwork, serviceAuth, useCloudHostedBrowsers, azureTokenCredentialType, managedIdentityClientId); - - Assert.Multiple(() => - { - Assert.That(settings.Os, Is.EqualTo(os)); - Assert.That(settings.RunId, Is.EqualTo(runId)); - Assert.That(settings.ExposeNetwork, Is.EqualTo(exposeNetwork)); - Assert.That(settings.ServiceAuth, Is.EqualTo(serviceAuth)); - Assert.That(settings.UseCloudHostedBrowsers, Is.True); - Assert.That(settings.AzureTokenCredential, Is.InstanceOf()); - }); - } - - [Test] - public void Constructor_ShouldUseDefaultValues() - { - var settings = new PlaywrightServiceOptions(); - Assert.Multiple(() => - { - Assert.That(settings.Os, Is.Null); - Assert.That(settings.RunId, Is.Null); - Assert.That(settings.ExposeNetwork, Is.Null); - Assert.That(settings.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); - Assert.That(settings.UseCloudHostedBrowsers, Is.True); - Assert.That(settings.AzureTokenCredential, Is.InstanceOf()); - }); - } - - [Test] - public void Validate_ShouldThrowExceptionForInvalidOs() - { - Exception? ex = Assert.Throws(() => new PlaywrightServiceOptions(os: OSPlatform.Create("invalid"))); - Assert.That(ex!.Message, Does.Contain("Invalid value for Os")); - } - - [Test] - public void Validate_ShouldThrowExceptionForInvalidDefaultAuth() - { - var invalidAuth = "InvalidAuth"; - Exception? ex = Assert.Throws(() => new PlaywrightServiceOptions(serviceAuth: invalidAuth)); - Assert.That(ex!.Message, Does.Contain("Invalid value for ServiceAuth")); - } - - [TestCase("ManagedIdentityCredential", typeof(ManagedIdentityCredential))] - [TestCase("WorkloadIdentityCredential", typeof(WorkloadIdentityCredential))] - [TestCase("EnvironmentCredential", typeof(EnvironmentCredential))] - [TestCase("AzureCliCredential", typeof(AzureCliCredential))] - [TestCase("AzurePowerShellCredential", typeof(AzurePowerShellCredential))] - [TestCase("AzureDeveloperCliCredential", typeof(AzureDeveloperCliCredential))] - [TestCase("InteractiveBrowserCredential", typeof(InteractiveBrowserCredential))] -#pragma warning disable CS0618 // Type or member is obsolete - [TestCase("SharedTokenCacheCredential", typeof(SharedTokenCacheCredential))] -#pragma warning restore CS0618 // Type or member is obsolete - [TestCase("VisualStudioCredential", typeof(VisualStudioCredential))] - [TestCase("DefaultAzureCredential", typeof(DefaultAzureCredential))] - [TestCase("", typeof(DefaultAzureCredential))] - [TestCase(null, typeof(DefaultAzureCredential))] - public void GetTokenCredential_ShouldReturnCorrectCredential(string? credentialType, Type expectedType) - { - var settings = new PlaywrightServiceOptions(azureTokenCredentialType: credentialType); - Assert.That(settings.AzureTokenCredential, Is.InstanceOf(expectedType)); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTestEnvironment.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTestEnvironment.cs deleted file mode 100644 index dbd0ca3ff17b..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTestEnvironment.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core.TestFramework; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; - -public class PlaywrightServiceTestEnvironment : TestEnvironment -{ - public string Region => GetRecordedVariable("PLAYWRIGHTTESTING_LOCATION"); - public string DashboardEndpoint => GetRecordedVariable("DASHBOARD_ENDPOINT"); -}; diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTests.cs deleted file mode 100644 index 42704dd615f1..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/PlaywrightServiceTests.cs +++ /dev/null @@ -1,920 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Implementation; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Identity; -using Microsoft.IdentityModel.JsonWebTokens; -using Microsoft.IdentityModel.Tokens; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; - -[TestFixture] -public class PlaywrightServiceTests -{ - private static string GetToken(Dictionary claims, DateTime? expires = null) - { - var tokenHandler = new JsonWebTokenHandler(); - var token = tokenHandler.CreateToken(new SecurityTokenDescriptor - { - Claims = claims, - Expires = expires ?? DateTime.UtcNow.AddMinutes(10), - }); - return token!; - } - - [SetUp] - public void Setup() - { - // Temporary - Switch to IEnvironment - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, "https://playwright.microsoft.com"); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_one_time_operation_flag_environment_variable, null); - } - [TearDown] - public void TearDown() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_one_time_operation_flag_environment_variable, null); - } - - [Test] - public void Constructor_NoConstructorParams_SetsEntraAuthMechanismAsDefault() - { - PlaywrightService service = new(entraLifecycle: null); - Assert.That(service.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); - } - - [Test] - public void Constructor_NoServiceParams_SetsDefaultValues() - { - var playwrightService = new PlaywrightService(entraLifecycle: null); - Assert.Multiple(() => - { - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(Constants.s_default_os)); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo(Constants.s_default_expose_network)); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId), Is.Not.Null); - Assert.That(playwrightService.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); - Assert.That(playwrightService.UseCloudHostedBrowsers, Is.True); - Assert.AreEqual(playwrightService.Os!, OSPlatform.Linux); - Assert.AreEqual(playwrightService.ExposeNetwork!, Constants.s_default_expose_network); - Assert.That(playwrightService.RunId, Is.Not.Null); - }); - } - - [Test] - public void Constructor_PassServiceOS_SetsServiceOS() - { - var playwrightService = new PlaywrightService(os: OSPlatform.Windows, entraLifecycle: null); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(ServiceOs.Windows)); - Assert.That(playwrightService.Os, Is.EqualTo(OSPlatform.Windows)); - } - - [Test] - public void Constructor_PassExposeNetwork_SetsExposeNetwork() - { - var playwrightService = new PlaywrightService(exposeNetwork: "new-expose", entraLifecycle: null); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo("new-expose")); - Assert.That(playwrightService.ExposeNetwork, Is.EqualTo("new-expose")); - } - - [Test] - public void Constructor_PassRunId_SetsRunId() - { - var playwrightService = new PlaywrightService(runId: "new-run-id", entraLifecycle: null); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId), Is.EqualTo("new-run-id")); - Assert.That(playwrightService.RunId, Is.EqualTo("new-run-id")); - } - - [Test] - public void Constructor_PassDefaultAuthMechanism_SetsDefaultAuthMechanism() - { - var playwrightService = new PlaywrightService(entraLifecycle: null, serviceAuth: ServiceAuthType.AccessToken); - Assert.That(playwrightService.ServiceAuth, Is.EqualTo(ServiceAuthType.AccessToken)); - } - - [Test] - public void Constructor_PassUseCloudHostedBrowsersAsFalse_SetsDisableScalableExecutionAndEnvVariable() - { - var playwrightService = new PlaywrightService(entraLifecycle: null, useCloudHostedBrowsers: false); - Assert.Multiple(() => - { - Assert.That(playwrightService.UseCloudHostedBrowsers, Is.False); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable), Is.EqualTo("true")); - }); - } - - [Test] - public void Constructor_PassUseCloudHostedBrowsersAsTrue_SetsDisableScalableExecutionButNotEnvVariable() - { - var playwrightService = new PlaywrightService(entraLifecycle: null, useCloudHostedBrowsers: true); - Assert.Multiple(() => - { - Assert.That(playwrightService.UseCloudHostedBrowsers, Is.True); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable), Is.Null); - }); - } - - [Test] - public void Constructor_PlaywrightServiceOSEnvironmentVariableIsSet_DoesNotUpdateTheEnvironmentVariableWithDefault() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, ServiceOs.Windows); - _ = new PlaywrightService(entraLifecycle: null); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(ServiceOs.Windows)); - } - - [Test] - public void Constructor_PlaywrightServiceExposeNetworkEnvironmentVariableIsSet_DoesNotUpdateTheEnvironmentVariableWithDefault() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, "new-expose"); - _ = new PlaywrightService(entraLifecycle: null); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo("new-expose")); - } - - [Test] - public void Constructor_MultipleInitialization_DoesNotUpdateTheEnvironmentVariablesOnceSet() - { - _ = new PlaywrightService(entraLifecycle: null, os: OSPlatform.Linux, exposeNetwork: "old-expose", runId: "old-run-id", useCloudHostedBrowsers: false, serviceAuth: ServiceAuthType.EntraId); - var newPlaywrightService = new PlaywrightService(entraLifecycle: null, os: OSPlatform.Windows, exposeNetwork: "new-expose", runId: "new-run-id", useCloudHostedBrowsers: true, serviceAuth: ServiceAuthType.AccessToken); - Assert.Multiple(() => - { - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(ServiceOs.Linux)); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo("old-expose")); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId), Is.EqualTo("old-run-id")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable), Is.EqualTo("true")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable), Is.EqualTo(ServiceAuthType.EntraId)); - Assert.That(newPlaywrightService.Os, Is.EqualTo(OSPlatform.Windows)); - Assert.That(newPlaywrightService.ExposeNetwork, Is.EqualTo("new-expose")); - Assert.That(newPlaywrightService.RunId, Is.EqualTo("new-run-id")); - Assert.That(newPlaywrightService.UseCloudHostedBrowsers, Is.True); - Assert.That(newPlaywrightService.ServiceAuth, Is.EqualTo(ServiceAuthType.AccessToken)); - }); - } - - [Test] - public void Constructor_MultipleInitialization_ReadsOlderEnvironmentVariables() - { - _ = new PlaywrightService(entraLifecycle: null, os: OSPlatform.Linux, exposeNetwork: "old-expose", runId: "old-run-id", useCloudHostedBrowsers: false, serviceAuth: ServiceAuthType.EntraId); - var newPlaywrightService = new PlaywrightService(entraLifecycle: null); - Assert.Multiple(() => - { - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs), Is.EqualTo(ServiceOs.Linux)); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork), Is.EqualTo("old-expose")); - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId), Is.EqualTo("old-run-id")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_disable_scalable_execution_environment_variable), Is.EqualTo("true")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_auth_type_environment_variable), Is.EqualTo(ServiceAuthType.EntraId)); - Assert.That(newPlaywrightService.Os, Is.EqualTo(OSPlatform.Linux)); - Assert.That(newPlaywrightService.ExposeNetwork, Is.EqualTo("old-expose")); - Assert.That(newPlaywrightService.RunId, Is.EqualTo("old-run-id")); - Assert.That(newPlaywrightService.UseCloudHostedBrowsers, Is.False); - Assert.That(newPlaywrightService.ServiceAuth, Is.EqualTo(ServiceAuthType.EntraId)); - }); - } - - [Test] - public void Initialize_WhenServiceEnpointIsNotSet_NoOP() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - service.InitializeAsync().Wait(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); - } - - [Test] - public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsSet_FetchesEntraIdAccessToken() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var token = "valid_token"; - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - service.InitializeAsync().Wait(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); - - service.RotationTimer!.Dispose(); - - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Not.Null); - } - - [Test] - public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsSetAndCredentialsArePassed_FetchesEntraIdAccessTokenUsedPassedCredentials() - { - var tokenCredential = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var token = "valid_token"; - tokenCredential - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - PlaywrightService service = new(new PlaywrightServiceOptions(), credential: tokenCredential.Object); - service.InitializeAsync().Wait(); - tokenCredential.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); - - service.RotationTimer!.Dispose(); - - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Not.Null); - } - - [Test] - public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsSetButScalableExecutionIsDisabled_DeletesServiceUrlEnvVariable() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var token = "valid_token"; - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, useCloudHostedBrowsers: false); - - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Not.Null); - - service.InitializeAsync().Wait(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); - - Assert.That(service.RotationTimer, Is.Null); - - Assert.That(Environment.GetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri), Is.Null); - } - - [Test] - public void Initialize_WhenDefaultAuthIsEntraIdAccessTokenAndAccessTokenEnvironmentVariableIsNotSet_FetchesEntraIdAccessToken() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var token = "valid_token"; - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - service.InitializeAsync().Wait(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); - - service.RotationTimer!.Dispose(); - } - - [Test] - public void Initialize_WhenFetchesEntraIdAccessToken_SetsUpRotationHandler() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var token = "valid_token"; - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(10))); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - service.InitializeAsync().Wait(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); - Assert.That(service.RotationTimer, Is.Not.Null); - - service.RotationTimer!.Dispose(); - } - - [Test] - public void Initialize_WhenFailsToFetchEntraIdAccessToken_ThrowsException() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - Exception? ex = Assert.ThrowsAsync(async () => await service.InitializeAsync()); - Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); - } - - [Test] - public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsSet_ThrowsException() - { - var token = GetToken(new Dictionary - { - {"aid", "account-id-guid"}, - }); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); - Exception? ex = Assert.ThrowsAsync(async () => await service.InitializeAsync()); - Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); - } - - [Test] - public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsNotSet_ThrowsException() - { - var token = GetToken(new Dictionary - { - {"aid", "account-id-guid"}, - }); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); - Exception? ex = Assert.ThrowsAsync(async () => await service.InitializeAsync()); - Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); - } - - [Test] - public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsNotValid_ThrowsError() - { - var token = "sample token"; - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); - Assert.That(() => service.InitializeAsync().Wait(), Throws.Exception); - } - - [Test] - public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatTokenParsingReturnsNull_ThrowsError() - { - var token = "sample token"; - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - var jsonWebTokenHandlerMock = new Mock(); -#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. - jsonWebTokenHandlerMock - .Setup(x => x.ReadJsonWebToken(It.IsAny())) - .Returns(value: null); -#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type. - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: jsonWebTokenHandlerMock.Object); - Assert.That(() => service.InitializeAsync().Wait(), Throws.Exception); - } - - [Test] - public void Initialize_WhenEntraIdAccessTokenFailsAndMptPatIsExpired_ThrowsError() - { - var token = GetToken(new Dictionary - { - {"aid", "account-id-guid"}, - }, DateTime.UtcNow.AddMinutes(-1)); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler()); - - Assert.That(() => service.InitializeAsync().Wait(), Throws.Exception); - } - - [Test] - public void Initialize_WhenDefaultAuthIsMptPATAndPATIsSet_DoesNotSetUpRotationHandler() - { - var token = GetToken(new Dictionary - { - {"aid", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888"}, - }); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, token); - var testRubric = new Dictionary - { - { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, - { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, - { "region", "eastus" }, - { "domain", "playwright.microsoft.com" } - }; - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); - var defaultAzureCredentialMock = new Mock(); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object, jsonWebTokenHandler: new JsonWebTokenHandler(), serviceAuth: ServiceAuthType.AccessToken); - service.InitializeAsync().Wait(); - Assert.That(service.RotationTimer, Is.Null); - } - - [Test] - public void RotationHandler_WhenEntraIdAccessTokenRequiresRotation_FetchesEntraIdAccessToken() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var token = "valid_token"; - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken(token, DateTimeOffset.UtcNow.AddMinutes(5))); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - - service.RotationHandlerAsync(null); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); - } - - [Test] - public void RotationHandler_WhenEntraIdAccessTokenDoesNotRequireRotation_NoOp() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - - service.RotationHandlerAsync(null); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); - } - - [Test] - public void GetConnectOptionsAsync_WhenServiceEndpointIsNotSet_ThrowsException() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); - PlaywrightService service = new(entraLifecycle: null); - Exception? ex = Assert.ThrowsAsync(() => service.GetConnectOptionsAsync()); - Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_service_endpoint_error_message)); - } - - [Test] - public void GetConnectOptionsAsync_WhenUseCloudHostedBrowsersEnvironmentIsFalse_ThrowsException() - { - PlaywrightService service = new(entraLifecycle: null, useCloudHostedBrowsers: false); - Exception? ex = Assert.ThrowsAsync(() => service.GetConnectOptionsAsync()); - Assert.Multiple(() => - { - Assert.That(service.UseCloudHostedBrowsers, Is.False); - Assert.That(ex!.Message, Is.EqualTo(Constants.s_service_endpoint_removed_since_scalable_execution_disabled_error_message)); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenServiceEndpointIsSet_ReturnsConnectOptions() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(runId: runId); - var authorizationHeader = connectOptions.Options!.Headers!.Where(x => x.Key == "Authorization").FirstOrDefault().Value!; - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={Constants.s_default_os}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.Timeout, Is.EqualTo(3 * 60 * 1000)); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo(Constants.s_default_expose_network)); - Assert.That(authorizationHeader, Is.EqualTo("Bearer valid_token")); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenTokenRequiresRotation_RotatesEntraToken() - { - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken("valid_token", DateTimeOffset.UtcNow.AddMinutes(5))); - var jsonWebTokenHandlerMock = new Mock(); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(-1).ToUnixTimeSeconds(); - - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - _ = await service.GetConnectOptionsAsync(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Once); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenTokenDoesNotRequireRotation_DoesNotRotateEntraToken() - { - var defaultAzureCredentialMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ReturnsAsync(new AccessToken("valid_token", DateTimeOffset.UtcNow.AddMinutes(5))); - var jsonWebTokenHandlerMock = new Mock(); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - - PlaywrightService service = new(entraLifecycle: entraLifecycleMock.Object); - _ = await service.GetConnectOptionsAsync(); - defaultAzureCredentialMock.Verify(x => x.GetTokenAsync(It.IsAny(), It.IsAny()), Times.Never); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenDefaultParametersAreProvided_SetsServiceParameters() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object - ._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object - ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - - var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(runId: runId, os: OSPlatform.Windows, exposeNetwork: "localhost"); - - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("localhost")); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenDefaultParametersAreNotProvided_SetsDefaultServiceParameters() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object - ._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object - ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - - var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(runId: runId); - - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={Constants.s_default_os}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo(Constants.s_default_expose_network)); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenParametersAreSetInTheObject_UsesObjectParameters() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object - ._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object - ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - - var service = new PlaywrightService(os: OSPlatform.Windows, runId: runId, exposeNetwork: "expose-network", entraLifecycle: entraLifecycleMock.Object); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, ServiceOs.Linux); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, "expose"); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, "invalid-run-id"); - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(); - - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("expose-network")); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenParametersAreSetInTheObjectButAlsoPassedInMethod_UsesMethodParameters() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object - ._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object - ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - - var service = new PlaywrightService(os: OSPlatform.Linux, runId: "invalid-runid", exposeNetwork: "expose", entraLifecycle: entraLifecycleMock.Object); - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(os: OSPlatform.Windows, runId: runId, exposeNetwork: "expose-network"); - - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("expose-network")); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenParametersAreSetViaEnvironmentButAlsoPassedInMethod_UsesMethodParameters() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object - ._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object - ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - - var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, ServiceOs.Linux); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, "expose"); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, "invalid-run-id"); - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(os: OSPlatform.Windows, runId: runId, exposeNetwork: "expose-network"); - - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("expose-network")); - }); - } - - [Test] - public async Task GetConnectOptionsAsync_WhenServiceParametersAreSetViaEnvironment_SetsServiceParameters() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "valid_token"); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - entraLifecycleMock.Object - ._entraIdAccessToken = "valid_token"; - entraLifecycleMock.Object - ._entraIdAccessTokenExpiry = (int)DateTimeOffset.UtcNow.AddMinutes(22).ToUnixTimeSeconds(); - var runId = "run-id"; - var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); - - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceOs, ServiceOs.Windows); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceExposeNetwork, "localhost"); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); - - ConnectOptions connectOptions = await service.GetConnectOptionsAsync(); - Assert.Multiple(() => - { - Assert.That(connectOptions.WsEndpoint, Is.EqualTo($"https://playwright.microsoft.com?os={ServiceOs.Windows}&runId={runId}&api-version={Constants.s_api_version}")); - Assert.That(connectOptions.Options!.ExposeNetwork, Is.EqualTo("localhost")); - }); - } - - [Test] - public void GetConnectOptionsAsync_WhenNoAuthTokenIsSet_ThrowsException() - { - var defaultAzureCredentialMock = new Mock(); - var jsonWebTokenHandlerMock = new Mock(); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, jsonWebTokenHandlerMock.Object, null); - var service = new PlaywrightService(entraLifecycle: entraLifecycleMock.Object); - - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, null); - - Exception? ex = Assert.ThrowsAsync(() => service.GetConnectOptionsAsync()); - Assert.That(ex!.Message, Is.EqualTo(Constants.s_no_auth_error)); - } - - [Test] - public void GetDefaultRunId_RunIdSetViaEnvironmentVariable_ReturnsRunId() - { - var runId = "run-id"; - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, runId); - Assert.Multiple(() => - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); - Assert.That(PlaywrightService.GetDefaultRunId(), Is.Not.Null); - }); - } - - [Test] - public void GetDefaultRunId_RunIdNotSetViaEnvironmentVariable_ReturnsRandomRunId() - { - Assert.Multiple(() => - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceRunId, null); - Assert.That(PlaywrightService.GetDefaultRunId(), Is.Not.Null); - }); - } - - [Test] - public void SetReportingUrlAndWorkspaceId_WhenServiceEndpointIsSet_SetsReportingUrlAndWorkspaceId() - { - var testRubricCombinations = new List>() - { - new() - { - { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, - { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, - { "region", "eastus" }, - { "domain", "playwright.microsoft.com" } - }, - new() - { - { "url", "wss://eastus.api.playwright.microsoft.com/accounts/77a38aac-4577-43a9-ac72-5720e5459c5a/browsers" }, - { "workspaceId", "77a38aac-4577-43a9-ac72-5720e5459c5a" }, - { "region", "eastus" }, - { "domain", "playwright.microsoft.com" } - }, - new() - { - { "url", "wss://westus3.api.playwright.microsoft.com/accounts/ad3cf59a-43e1-4dbe-af22-49bfe72b4178/browsers" }, - { "workspaceId", "ad3cf59a-43e1-4dbe-af22-49bfe72b4178" }, - { "region", "westus3" }, - { "domain", "playwright.microsoft.com" } - }, - new() - { - { "url", "wss://westus3.api.playwright-int.io/accounts/3c9ae1d4-e856-4ce0-8b56-1f4488676dff/browsers" }, - { "workspaceId", "3c9ae1d4-e856-4ce0-8b56-1f4488676dff" }, - { "region", "westus3" }, - { "domain", "playwright-int.io" } - }, - new() - { - { "url", "wss://eastasia.api.playwright-test.io/accounts/29abee44-a5f4-477e-9ff1-6c6786d09c7c/browsers" }, - { "workspaceId", "29abee44-a5f4-477e-9ff1-6c6786d09c7c" }, - { "region", "eastasia" }, - { "domain", "playwright-test.io" } - } - }; - - foreach (Dictionary testRubric in testRubricCombinations) - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); - var service = new PlaywrightService(entraLifecycle: null); - Assert.Multiple(() => - { - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable), Is.EqualTo($"https://{testRubric["region"]}.reporting.api.{testRubric["domain"]}")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable), Is.EqualTo(testRubric["workspaceId"])); - }); - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, null); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, null); - } - } - - [Test] - public void SetReportingUrlAndWorkspaceId_WhenReportingServiceEndpointIsSet_OnlySetsWorkspaceId() - { - var testRubric = new Dictionary - { - { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, - { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, - { "region", "eastus" }, - { "domain", "playwright.microsoft.com" } - }; - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - var service = new PlaywrightService(entraLifecycle: null); - Assert.Multiple(() => - { - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable), Is.EqualTo("https://playwright.microsoft.com")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable), Is.EqualTo(testRubric["workspaceId"])); - }); - } - - [Test] - public void SetReportingUrlAndWorkspaceId_WhenReportingServiceEndpointAndWorkspaceIdIsSet_NoOp() - { - var testRubric = new Dictionary - { - { "url", "wss://eastus.api.playwright.microsoft.com/accounts/eastus_bd830e63-6120-40cb-8cd7-f0739502d888/browsers" }, - { "workspaceId", "eastus_bd830e63-6120-40cb-8cd7-f0739502d888" }, - { "region", "eastus" }, - { "domain", "playwright.microsoft.com" } - }; - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceUri, $"{testRubric["url"]}"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable, "sample-id"); - var service = new PlaywrightService(entraLifecycle: null); - Assert.Multiple(() => - { - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable), Is.EqualTo("https://playwright.microsoft.com")); - Assert.That(Environment.GetEnvironmentVariable(Constants.s_playwright_service_workspace_id_environment_variable), Is.EqualTo("sample-id")); - }); - } - - [Test] - public void ShouldNotCallWarnIfAccessTokenCloseToExpiry_WhenOneTimeOperationFlagIsSet_True() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_one_time_operation_flag_environment_variable, "true"); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - var service = new Mock(new PlaywrightServiceOptions(), null,null); - service.Object.PerformOneTimeOperation(); - service.Verify(x => x.WarnIfAccessTokenCloseToExpiry(), Times.Never); - } - - [Test] - public void ShouldCallWarnIfAccessTokenCloseToExpiry_WhenOneTimeOperationFlagIsSet_True() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - var serviceMock = new Mock(new PlaywrightServiceOptions(serviceAuth: ServiceAuthType.AccessToken), null, null); - serviceMock.Object.PerformOneTimeOperation(); - serviceMock.Verify(x => x.WarnIfAccessTokenCloseToExpiry(), Times.Once); - } - - [Test] - public void ShouldReturnTrue_IfAccessTokenIs_CloseToExpiry() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - var serviceMock = new Mock(new PlaywrightServiceOptions(), null, null); - long currentTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - long expirationTime = DateTimeOffset.UtcNow.AddDays(4).ToUnixTimeMilliseconds(); - bool isExpiringSoon = PlaywrightService.IsTokenExpiringSoon(expirationTime, currentTime); - Assert.IsTrue(isExpiringSoon); - } - - [Test] - public void ShouldReturnFalse_IfAccessTokenIs_NotCloseToExpiry() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - var serviceMock = new Mock(new PlaywrightServiceOptions(), null, null); - long currentTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - long expirationTime = DateTimeOffset.UtcNow.AddDays(20).ToUnixTimeMilliseconds(); - bool isExpiringSoon = PlaywrightService.IsTokenExpiringSoon(expirationTime, currentTime); - Assert.IsFalse(isExpiringSoon); - } - - [Test] - public void ShouldLogWarning_IfWarnAboutTokenExpiry_IsCalled() - { - Environment.SetEnvironmentVariable(ServiceEnvironmentVariable.PlaywrightServiceAccessToken, "access_token"); - Environment.SetEnvironmentVariable(Constants.s_playwright_service_reporting_url_environment_variable, "https://playwright.microsoft.com"); - var defaultAzureCredentialMock = new Mock(); - defaultAzureCredentialMock - .Setup(x => x.GetTokenAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new Exception()); - - var entraLifecycleMock = new Mock(defaultAzureCredentialMock.Object, new JsonWebTokenHandler(), null); - var consoleWriterMock = new Mock(); - var serviceMock = new Mock( - null, - null, - null, - null, - null, - null, - null, - null, - null, - consoleWriterMock.Object - ); - serviceMock.CallBase = true; - long currentTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - long expirationTime = DateTimeOffset.UtcNow.AddDays(4).ToUnixTimeMilliseconds(); - int daysToExpiration = (int)Math.Ceiling((expirationTime - currentTime) / (double)Constants.s_oneDayInMs); - string expirationDate = DateTimeOffset.FromUnixTimeMilliseconds(expirationTime).UtcDateTime.ToString("d"); - string expectedWarning = string.Format(Constants.s_token_expiry_warning_template, daysToExpiration, expirationDate); - serviceMock.Object.WarnAboutTokenExpiry(expirationTime, currentTime); - consoleWriterMock.Verify(c => c.WriteLine(expectedWarning), Times.Once); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/DataProcessorTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/DataProcessorTests.cs deleted file mode 100644 index 95f15ade3051..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/DataProcessorTests.cs +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Processor -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class DataProcessorTests - { - [Test] - public void GetTestRun_ReturnsTestRunDto() - { - var cloudRunMetadata = new CloudRunMetadata - { - WorkspaceId = "workspaceId", - RunId = "runId", - AccessTokenDetails = new() - { - oid = "oid", - userName = " userName " - }, - NumberOfTestWorkers = 5 - }; - var cIInfo = new CIInfo - { - Branch = "branch_name", - Author = "author", - CommitId = "commitId", - RevisionUrl = "revisionUrl", - Provider = CIConstants.s_gITHUB_ACTIONS - }; - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - - TestRunDto result = dataProcessor.GetTestRun(); - - Assert.IsNotNull(result); - Assert.IsInstanceOf(result); - - Assert.AreEqual(cloudRunMetadata.RunId, result.TestRunId); - Assert.IsNotNull(result.DisplayName); - Assert.IsNotNull(result.StartTime); - Assert.AreEqual(cloudRunMetadata.AccessTokenDetails.oid, result.CreatorId); - Assert.AreEqual("userName", result.CreatorName); - Assert.IsTrue(result.CloudReportingEnabled); - Assert.IsFalse(result.CloudRunEnabled); - Assert.IsNotNull(result.CiConfig); - Assert.AreEqual(cIInfo.Branch, result.CiConfig!.Branch); - Assert.AreEqual(cIInfo.Author, result.CiConfig!.Author); - Assert.AreEqual(cIInfo.CommitId, result.CiConfig!.CommitId); - Assert.AreEqual(cIInfo.RevisionUrl, result.CiConfig!.RevisionUrl); - Assert.AreEqual(cIInfo.Provider, result.CiConfig!.CiProviderName); - Assert.IsNotNull(result.TestRunConfig); - Assert.AreEqual(5, result.TestRunConfig!.Workers); - Assert.AreEqual("1.40", result.TestRunConfig!.PwVersion); - Assert.AreEqual(60000, result.TestRunConfig!.Timeout); - Assert.AreEqual("WebTest", result.TestRunConfig!.TestType); - Assert.AreEqual("CSHARP", result.TestRunConfig!.TestSdkLanguage); - Assert.IsNotNull(result.TestRunConfig!.TestFramework); - Assert.AreEqual("PLAYWRIGHT", result.TestRunConfig!.TestFramework!.Name); - Assert.AreEqual("NUNIT", result.TestRunConfig!.TestFramework!.RunnerName); - Assert.AreEqual("3.1", result.TestRunConfig!.TestFramework!.Version); - Assert.AreEqual("1.0.0-beta.4", result.TestRunConfig!.ReporterPackageVersion); - Assert.IsNotNull(result.TestRunConfig!.Shards); - Assert.AreEqual(1, result.TestRunConfig!.Shards!.Total); - } - [Test] - public void GetTestRun_ShouldUseRunName_WhenRunNameIsNotEmpty() - { - var cloudRunMetadata = new CloudRunMetadata - { - RunName = "runName", - WorkspaceId = "workspaceId", - RunId = "runId", - AccessTokenDetails = new() - { - oid = "oid", - userName = " userName " - } - }; - var cIInfo = new CIInfo - { - Branch = "branch_name", - Author = "author", - CommitId = "commitId", - RevisionUrl = "revisionUrl", - Provider = CIConstants.s_gITHUB_ACTIONS - }; - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - TestRunDto result = dataProcessor.GetTestRun(); - Assert.AreEqual("runName", result.DisplayName); - } - - [Test] - public void GetTestRunShard_ReturnsTestRunShardDto() - { - var cloudRunMetadata = new CloudRunMetadata(); - cloudRunMetadata.NumberOfTestWorkers = 6; - var cIInfo = new CIInfo(); - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - - TestRunShardDto result = dataProcessor.GetTestRunShard(); - - Assert.IsNotNull(result); - Assert.IsInstanceOf(result); - Assert.IsFalse(result.UploadCompleted); - Assert.AreEqual("1", result.ShardId); - Assert.IsNotNull(result.Summary); - Assert.AreEqual("RUNNING", result.Summary!.Status); - Assert.IsNotNull(result.Summary!.StartTime); - Assert.AreEqual(6, result.Workers); - } - - [Test] - public void GetTestCaseResultData_WithNullTestResult_ReturnsEmptyTestResults() - { - var cloudRunMetadata = new CloudRunMetadata(); - var cIInfo = new CIInfo(); - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - TestResult? testResult = null; - - TestResults result = dataProcessor.GetTestCaseResultData(testResult); - - Assert.IsNotNull(result); - } - - [Test] - public void GetTestCaseResultData_WithNonNullTestResult_ReturnsTestResults() - { - var cloudRunMetadata = new CloudRunMetadata - { - WorkspaceId = "workspaceId", - RunId = "runId", - AccessTokenDetails = new() - { - oid = "oid", - userName = " userName " - } - }; - var cIInfo = new CIInfo - { - Branch = "branch_name", - Author = "author", - CommitId = "commitId", - RevisionUrl = "revisionUrl", - Provider = CIConstants.s_gITHUB_ACTIONS, - JobId = "jobId" - }; - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - var testResult = new TestResult(new TestCase("Test.Reporting", new System.Uri("file:///test.cs"), "TestNamespace.TestClass")); - - TestResults result = dataProcessor.GetTestCaseResultData(testResult); - - Assert.IsNotNull(result); - Assert.IsEmpty(result.ArtifactsPath); - Assert.AreEqual(cloudRunMetadata.WorkspaceId, result.AccountId); - Assert.AreEqual(cloudRunMetadata.RunId, result.RunId); - Assert.IsNotNull(result.TestExecutionId); - Assert.IsNotNull(result.TestCombinationId); - Assert.IsNotNull(result.TestId); - Assert.AreEqual(testResult.TestCase.DisplayName, result.TestTitle); - Assert.AreEqual("Test", result.SuiteTitle); - Assert.AreEqual(ReporterUtils.CalculateSha1Hash("Test"), result.SuiteId); - Assert.AreEqual("TestNamespace.TestClass", result.FileName); - Assert.AreEqual(testResult.TestCase.LineNumber, result.LineNumber); - Assert.AreEqual(0, result.Retry); - Assert.IsNotNull(result.WebTestConfig); - Assert.AreEqual(cIInfo.JobId, result.WebTestConfig!.JobName); - Assert.AreEqual(ReporterUtils.GetCurrentOS(), result.WebTestConfig.Os); - Assert.IsNotNull(result.ResultsSummary); - Assert.AreEqual((long)testResult.Duration.TotalMilliseconds, result.ResultsSummary!.Duration); - Assert.AreEqual(testResult.StartTime.ToString("yyyy-MM-ddTHH:mm:ssZ"), result.ResultsSummary.StartTime); - Assert.AreEqual(TestCaseResultStatus.s_iNCONCLUSIVE, result.ResultsSummary.Status); - Assert.AreEqual(TestCaseResultStatus.s_iNCONCLUSIVE, result.Status); - } - [Test] - [Ignore("Need to mock GetRunName response")] - public void GetTestRun_ShouldUseGitBasedRunName_WhenRunNameIsEmptyAndGitBasedRunNameIsNotEmpty() - { - var cloudRunMetadata = new CloudRunMetadata - { - RunName = "", - WorkspaceId = "workspaceId", - RunId = "runId", - AccessTokenDetails = new() - { - oid = "oid", - userName = " userName " - } - }; - var cIInfo = new CIInfo - { - Branch = "branch_name", - Author = "author", - CommitId = "commitId", - RevisionUrl = "revisionUrl", - Provider = CIConstants.s_gITHUB_ACTIONS - }; - var gitBasedRunName = ReporterUtils.GetRunName(cIInfo); - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - TestRunDto result = dataProcessor.GetTestRun(); - Assert.AreEqual(gitBasedRunName, result.DisplayName); - } - [Test] - [Ignore("Need to mock GetRunName response")] - public void GetTestRun_ShouldUseRunId_WhenRunNameAndGitBasedRunNameAreEmpty() - { - var cloudRunMetadata = new CloudRunMetadata - { - RunName = "", - WorkspaceId = "workspaceId", - RunId = "runId", - AccessTokenDetails = new() - { - oid = "oid", - userName = " userName " - } - }; - var cIInfo = new CIInfo - { - }; - var reporterUtilsMock = new Mock(); - reporterUtilsMock.Setup(r => ReporterUtils.GetRunName(cIInfo)).Returns(string.Empty); - var dataProcessor = new DataProcessor(cloudRunMetadata, cIInfo); - TestRunDto result = dataProcessor.GetTestRun(); - Assert.AreEqual("runId", result.DisplayName); - } - [Test] - public void GetRawResultObject_WithNullTestResult_ReturnsRawTestResultWithEmptyErrorsAndStdErr() - { - RawTestResult result = DataProcessor.GetRawResultObject(null); - - Assert.IsNotNull(result); - Assert.AreEqual("[]", result.errors); - Assert.AreEqual("[]", result.stdErr); - } - - [Test] - public void GetRawResultObject_WithNullErrorStackTrace_ReturnsRawTestResultWithEmptyErrorsAndStdErr() - { - var testResult = new TestResult(new TestCase("Test", new System.Uri("file:///test.cs"), "TestNamespace.TestClass")) - { - ErrorMessage = null, - ErrorStackTrace = null - }; - - RawTestResult result = DataProcessor.GetRawResultObject(testResult); - - Assert.IsNotNull(result); - Assert.AreEqual("[]", result.errors); - Assert.AreEqual("[]", result.stdErr); - } - - [Test] - public void GetRawResultObject_WithNonNullTestResult_ReturnsRawTestResultWithErrorsAndStdErr() - { - var testResult = new TestResult(new TestCase("Test", new System.Uri("file:///test.cs"), "TestNamespace.TestClass")) - { - ErrorMessage = "An error occurred", - ErrorStackTrace = "Error stack trace" - }; - - RawTestResult result = DataProcessor.GetRawResultObject(testResult); - - Assert.IsNotNull(result); - Assert.AreEqual("[{\"message\":\"An error occurred\"},{\"message\":\"Error stack trace\"}]", result.errors); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/TestProcessorTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/TestProcessorTests.cs deleted file mode 100644 index 2778c673da27..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Processor/TestProcessorTests.cs +++ /dev/null @@ -1,617 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Interface; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Processor; -using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; -using Moq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Processor -{ - [TestFixture] - [Parallelizable(ParallelScope.Self)] - public class TestProcessorTests - { - private CIInfo _cIInfo = new(); - private CloudRunMetadata _cloudRunMetadata = new(); - - [SetUp] - public void Setup() - { - _cloudRunMetadata = new CloudRunMetadata - { - WorkspaceId = "workspaceId", - RunId = "runId", - AccessTokenDetails = new() - { - oid = "oid", - userName = " userName " - }, - EnableGithubSummary = false - }; - _cIInfo = new CIInfo - { - Branch = "branch_name", - Author = "author", - CommitId = "commitId", - RevisionUrl = "revisionUrl", - Provider = CIConstants.s_gITHUB_ACTIONS - }; - } - - [Test] - public void TestRunStartHandler_CreatesTestRunAndShardInfo() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testRunShardDto = new TestRunShardDto(); - - serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns(new TestRunDto()); - serviceClientMock.Setup(sc => sc.PostTestRunShardInfo(It.IsAny())).Returns(testRunShardDto); - - var sources = new List { "source1", "source2" }; - var testRunCriteria = new TestRunCriteria(sources, 1); - var e = new TestRunStartEventArgs(testRunCriteria); - testProcessor.TestRunStartHandler(sender, e); - - dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); - dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); - serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); - serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Once); - Assert.AreEqual(testRunShardDto, testProcessor._testRunShard); - Assert.IsFalse(testProcessor.FatalTestExecution); - } - - [Test] - public void TestRunStartHandler_PatchTestRunReturnsNull_MarksTestExecutionAsFatal() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns((TestRunDto?)null); - - var sources = new List { "source1", "source2" }; - var testRunCriteria = new TestRunCriteria(sources, 1); - var e = new TestRunStartEventArgs(testRunCriteria); - testProcessor.TestRunStartHandler(sender, e); - - dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); - dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); - serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); - serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Never); - Assert.IsNull(testProcessor._testRunShard); - Assert.IsTrue(testProcessor.FatalTestExecution); - } - - [Test] - public void TestRunStartHandler_PatchTestRunThrowsError_MarksTestExecutionAsFatal() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Throws(new System.Exception()); - - var sources = new List { "source1", "source2" }; - var testRunCriteria = new TestRunCriteria(sources, 1); - var e = new TestRunStartEventArgs(testRunCriteria); - testProcessor.TestRunStartHandler(sender, e); - - dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); - dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); - serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); - serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Never); - Assert.IsNull(testProcessor._testRunShard); - Assert.IsTrue(testProcessor.FatalTestExecution); - } - - [Test] - public void TestRunStartHandler_PostTestRunShardReturnsNull_MarksTestExecutionAsFatal() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns(new TestRunDto()); - serviceClientMock.Setup(sc => sc.PostTestRunShardInfo(It.IsAny())).Returns((TestRunShardDto?)null); - - var sources = new List { "source1", "source2" }; - var testRunCriteria = new TestRunCriteria(sources, 1); - var e = new TestRunStartEventArgs(testRunCriteria); - testProcessor.TestRunStartHandler(sender, e); - - dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); - dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); - serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); - serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Once); - Assert.IsNull(testProcessor._testRunShard); - Assert.IsTrue(testProcessor.FatalTestExecution); - } - - [Test] - public void TestRunStartHandler_PostTestRunShardThrowsError_MarksTestExecutionAsFatal() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - serviceClientMock.Setup(sc => sc.PatchTestRunInfo(It.IsAny())).Returns(new TestRunDto()); - serviceClientMock.Setup(sc => sc.PostTestRunShardInfo(It.IsAny())).Throws(new System.Exception()); - - var sources = new List { "source1", "source2" }; - var testRunCriteria = new TestRunCriteria(sources, 1); - var e = new TestRunStartEventArgs(testRunCriteria); - testProcessor.TestRunStartHandler(sender, e); - - dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Once); - dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Once); - serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Once); - serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Once); - Assert.IsNull(testProcessor._testRunShard); - Assert.IsTrue(testProcessor.FatalTestExecution); - } - - [Test] - public void TestRunStartHandler_EnableResultPublishIsFalse_ShouldBeNoOp() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - _cloudRunMetadata.EnableResultPublish = false; - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var sources = new List { "source1", "source2" }; - var testRunCriteria = new TestRunCriteria(sources, 1); - var e = new TestRunStartEventArgs(testRunCriteria); - testProcessor.TestRunStartHandler(sender, e); - - dataProcessorMock.Verify(dp => dp.GetTestRun(), Times.Never); - dataProcessorMock.Verify(dp => dp.GetTestRunShard(), Times.Never); - serviceClientMock.Verify(sc => sc.PatchTestRunInfo(It.IsAny()), Times.Never); - serviceClientMock.Verify(sc => sc.PostTestRunShardInfo(It.IsAny()), Times.Never); - Assert.IsNull(testProcessor._testRunShard); - Assert.IsFalse(testProcessor.FatalTestExecution); - } - - [Test] - public void TestCaseResultHandler_TestPassed_AddsTestResultToTestResultsList() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testResults = new TestResults - { - Status = TestCaseResultStatus.s_pASSED - }; - - dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); - - var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); - - testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); - - Assert.AreEqual(1, testProcessor.TestResults.Count); - Assert.AreEqual(testResults, testProcessor.TestResults[0]); - Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 1); - Assert.IsTrue(testProcessor.PassedTestCount == 1); - Assert.IsTrue(testProcessor.FailedTestCount == 0); - Assert.IsTrue(testProcessor.SkippedTestCount == 0); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); - } - - [Test] - public void TestCaseResultHandler_TestFailed_AddsTestResultToTestResultsList() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testResults = new TestResults - { - Status = TestCaseResultStatus.s_fAILED - }; - - dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); - - var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); - - testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); - - Assert.AreEqual(1, testProcessor.TestResults.Count); - Assert.AreEqual(testResults, testProcessor.TestResults[0]); - Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 1); - Assert.IsTrue(testProcessor.PassedTestCount == 0); - Assert.IsTrue(testProcessor.FailedTestCount == 1); - Assert.IsTrue(testProcessor.SkippedTestCount == 0); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); - } - - [Test] - public void TestCaseResultHandler_TestSkipped_AddsTestResultToTestResultsList() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testResults = new TestResults - { - Status = TestCaseResultStatus.s_sKIPPED - }; - - dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); - - var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); - - testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); - - Assert.AreEqual(1, testProcessor.TestResults.Count); - Assert.AreEqual(testResults, testProcessor.TestResults[0]); - Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 1); - Assert.IsTrue(testProcessor.PassedTestCount == 0); - Assert.IsTrue(testProcessor.FailedTestCount == 0); - Assert.IsTrue(testProcessor.SkippedTestCount == 1); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); - } - - [Test] - public void TestCaseResultHandler_ShouldPassErrorMessageAndStackTraceForScalableErrorParsing() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testResults = new TestResults - { - Status = TestCaseResultStatus.s_sKIPPED - }; - dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); - - var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); - - testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult) - { - Result = - { - ErrorMessage = "Error message", - ErrorStackTrace = "Error stack trace" - } - }); - - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage("Error message"), Times.Once); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage("Error stack trace"), Times.Once); - } - - [Test] - public void TestCaseResultHandler_EnableResultPublishFalse_OnlyParseScalableErrorMessage() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - _cloudRunMetadata.EnableResultPublish = false; - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testResults = new TestResults - { - Status = TestCaseResultStatus.s_sKIPPED - }; - - dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Returns(testResults); - - var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); - - testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); - - Assert.AreEqual(0, testProcessor.TestResults.Count); - Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 0); - Assert.IsTrue(testProcessor.PassedTestCount == 0); - Assert.IsTrue(testProcessor.FailedTestCount == 0); - Assert.IsTrue(testProcessor.SkippedTestCount == 0); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Exactly(2)); - } - - [Test] - public void TestCaseResultHandler_ExceptionThrown_ShouldBeNoOp() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - var testResults = new TestResults - { - Status = TestCaseResultStatus.s_sKIPPED - }; - - dataProcessorMock.Setup(dp => dp.GetTestCaseResultData(It.IsAny())).Throws(new System.Exception()); - - var testResult = new TestResult(new TestCase("Test", new System.Uri("file://test.cs"), "test-source")); - - testProcessor.TestCaseResultHandler(sender, new TestResultEventArgs(testResult)); - - Assert.AreEqual(0, testProcessor.TestResults.Count); - Assert.IsTrue(testProcessor.RawTestResultsMap.Keys.Count == 0); - Assert.IsTrue(testProcessor.PassedTestCount == 0); - Assert.IsTrue(testProcessor.FailedTestCount == 0); - Assert.IsTrue(testProcessor.SkippedTestCount == 0); - cloudRunErrorParserMock.Verify(c => c.HandleScalableRunErrorMessage(It.IsAny()), Times.Never); - } - - [Test] - public void TestRunCompleteHandler_UploadsTestResults() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - var testResults = new List - { - new() { Status = TestCaseResultStatus.s_pASSED }, - new() { Status = TestCaseResultStatus.s_fAILED }, - new() { Status = TestCaseResultStatus.s_sKIPPED } - }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); - } - - [Test] - public void TestRunCompleteHandler_UploadsTestResultsThrows_IgnoresException() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - serviceClientMock.Setup(c => c.UploadBatchTestResults(It.IsAny())).Throws(new System.Exception()); - - var testResults = new List - { - new() { Status = TestCaseResultStatus.s_pASSED }, - new() { Status = TestCaseResultStatus.s_fAILED }, - new() { Status = TestCaseResultStatus.s_sKIPPED } - }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); - } - - [Test] - public void TestRunCompleteHandler_PatchesTestRunShardInfo() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - testProcessor._testRunShard = new TestRunShardDto(); - testProcessor.TotalTestCount = 100; - - var testResults = new List { }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); - serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); - Assert.AreEqual("CLIENT_COMPLETE", testProcessor._testRunShard.Summary!.Status); - Assert.IsNotNull(testProcessor._testRunShard.Summary!.EndTime); - Assert.IsNotNull(testProcessor._testRunShard.Summary!.TotalTime); - Assert.AreEqual(100, testProcessor._testRunShard.Summary!.UploadMetadata!.NumTestResults); - Assert.AreEqual(0, testProcessor._testRunShard.Summary!.UploadMetadata!.NumTotalAttachments); - Assert.AreEqual(0, testProcessor._testRunShard.Summary!.UploadMetadata!.SizeTotalAttachments); - Assert.IsTrue(testProcessor._testRunShard.UploadCompleted); - } - - [Test] - public void TestRunCompleteHandler_PatchesTestRunShardInfoThrows_DisplaysInformationMessagesAndPortalUrl() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - serviceClientMock.Setup(c => c.PostTestRunShardInfo(It.IsAny())).Throws(new System.Exception()); - - testProcessor._testRunShard = new TestRunShardDto(); - - var testResults = new List { }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); - serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); - consoleWriterMock.Verify(c => c.WriteLine("\nTest Report: " + _cloudRunMetadata.PortalUrl), Times.Once); - cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); - } - - [Test] - public void TestRunCompleteHandler_DisplaysTestRunUrl() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - testProcessor._testRunShard = new TestRunShardDto(); - - var testResults = new List { }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); - serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); - consoleWriterMock.Verify(c => c.WriteLine("\nTest Report: " + _cloudRunMetadata.PortalUrl), Times.Once); - } - - [Test] - public void TestRunCompleteHandler_DisplaysMessagesOnEnd() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - testProcessor._testRunShard = new TestRunShardDto(); - - var testResults = new List { }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Once); - serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Once); - consoleWriterMock.Verify(c => c.WriteLine("\nTest Report: " + _cloudRunMetadata.PortalUrl), Times.Once); - cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); - } - - [Test] - public void TestRunCompleteHandler_FatalExecutionSetToTrue_DisplaysMessagesOnEnd() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - testProcessor.FatalTestExecution = true; - - var testResults = new List { }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); - serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Never); - cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); - } - - [Test] - public void TestRunCompleteHandler_EnableResultPublishSetToFalse_DisplaysMessagesOnEnd() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var consoleWriterMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var sender = new object(); - - _cloudRunMetadata.EnableResultPublish = false; - - var testResults = new List { }; - testProcessor.TestResults = testResults; - testProcessor.TestRunCompleteHandler(sender, new TestRunCompleteEventArgs(null, false, false, null, null, TimeSpan.Zero)); - - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); - serviceClientMock.Verify(c => c.UploadBatchTestResults(It.IsAny()), Times.Never); - serviceClientMock.Verify(c => c.PostTestRunShardInfo(It.IsAny()), Times.Never); - cloudRunErrorParserMock.Verify(c => c.DisplayMessages(), Times.Exactly(1)); - } - [Test] - public void CheckAndRenewSasUri_WhenUriExpired_FetchesNewSasUri() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var consoleWriterMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var expiredTestResultsSasUri = new TestResultsUri { Uri = "http://example.com", ExpiresAt = DateTime.UtcNow.AddMinutes(-5).ToString(), AccessLevel = AccessLevel.Read }; - var newTestResultsSasUri = new TestResultsUri { Uri = "http://newexample.com", ExpiresAt = DateTime.UtcNow.AddHours(1).ToString(), AccessLevel = AccessLevel.Read }; - testProcessor._testResultsSasUri = expiredTestResultsSasUri; - serviceClientMock.Setup(sc => sc.GetTestRunResultsUri()).Returns(newTestResultsSasUri); - TestResultsUri? result = testProcessor.CheckAndRenewSasUri(); - Assert.AreEqual(newTestResultsSasUri, result); - loggerMock.Verify(l => l.Info(It.IsAny()), Times.AtLeastOnce); - } - [Test] - public void CheckAndRenewSasUri_WhenUriNotExpired_DoesNotFetchNewSasUri() - { - var loggerMock = new Mock(); - var dataProcessorMock = new Mock(); - var consoleWriterMock = new Mock(); - var cloudRunErrorParserMock = new Mock(); - var serviceClientMock = new Mock(); - var testProcessor = new TestProcessor(_cloudRunMetadata, _cIInfo, loggerMock.Object, dataProcessorMock.Object, cloudRunErrorParserMock.Object, serviceClientMock.Object, consoleWriterMock.Object); - var validTestResultsSasUri = new TestResultsUri { Uri = "http://example.com?se=" + DateTime.UtcNow.AddMinutes(15).ToString("o"), ExpiresAt = DateTime.UtcNow.AddMinutes(15).ToString(), AccessLevel = AccessLevel.Read }; - testProcessor._testResultsSasUri = validTestResultsSasUri; - TestResultsUri? result = testProcessor.CheckAndRenewSasUri(); - Assert.AreEqual(validTestResultsSasUri, result); - serviceClientMock.Verify(sc => sc.GetTestRunResultsUri(), Times.Never); - loggerMock.Verify(l => l.Info(It.IsAny()), Times.Never); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/TestUtils.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/TestUtils.cs deleted file mode 100644 index 52308c93a16c..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/TestUtils.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Linq; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests; - -public class TestUtils -{ - public static string GetPlaywrightServiceAPIEndpoint(string workspaceId, string region) - { - return $"https://{region}.api.playwright.microsoft.com/accounts/{workspaceId}/browsers"; - } - - public static string GetWorkspaceIdFromDashboardEndpoint(string dashboardEndpoint) - { - var parts = dashboardEndpoint.Split('/'); - return parts.Last(); - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/CiInfoProviderTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/CiInfoProviderTests.cs deleted file mode 100644 index d78407b51652..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/CiInfoProviderTests.cs +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; - -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Utility -{ - [TestFixture] - public class CiInfoProviderTests - { - private Dictionary _originalEnvironmentVariables = new(); - - [OneTimeSetUp] - public void Init() - { - _originalEnvironmentVariables = Environment.GetEnvironmentVariables() - .Cast() - .ToDictionary(entry => (string)entry.Key, entry => (string)entry.Value!)!; - } - - [SetUp] - public void Setup() - { - foreach (KeyValuePair kvp in _originalEnvironmentVariables) - { - Environment.SetEnvironmentVariable(kvp.Key, kvp.Value); - } - - var keysToRemove = Environment.GetEnvironmentVariables() - .Cast() - .Select(entry => (string)entry.Key) - .Where(key => key.StartsWith("github", StringComparison.OrdinalIgnoreCase) || key.StartsWith("gh", StringComparison.OrdinalIgnoreCase) || key.StartsWith("ado", StringComparison.OrdinalIgnoreCase) || key.StartsWith("azure", StringComparison.OrdinalIgnoreCase) || key.StartsWith("tf", StringComparison.OrdinalIgnoreCase)) - .ToList(); - - foreach (var key in keysToRemove) - { - Environment.SetEnvironmentVariable(key, null); // Remove environment variable - } - } - - [Test] - public void GetCIProvider_GitHubActions_ReturnsGitHubActions() - { - Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); - - string ciProvider = CiInfoProvider.GetCIProvider(); - - Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciProvider); - } - - [Test] - public void GetCIProvider_AzureDevOps_ReturnsAzureDevOps() - { - Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", "some_value"); - Environment.SetEnvironmentVariable("TF_BUILD", "some_value"); - - string ciProvider = CiInfoProvider.GetCIProvider(); - - Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, ciProvider); - } - - [Test] - public void GetCIProvider_Default_ReturnsDefault() - { - Environment.SetEnvironmentVariable("GITHUB_ACTIONS", null); - Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", null); - Environment.SetEnvironmentVariable("TF_BUILD", null); - - string ciProvider = CiInfoProvider.GetCIProvider(); - - Assert.AreEqual(CIConstants.s_dEFAULT, ciProvider); - } - [Test] - public void GetCIInfo_GitHubActions_ReturnsGitHubActionsCIInfo() - { - Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY_ID", "repo_id"); - Environment.SetEnvironmentVariable("GITHUB_ACTOR", "actor"); - Environment.SetEnvironmentVariable("GITHUB_SHA", "commit_sha"); - Environment.SetEnvironmentVariable("GITHUB_SERVER_URL", "server_url"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "repository"); - Environment.SetEnvironmentVariable("GITHUB_RUN_ID", "run_id"); - Environment.SetEnvironmentVariable("GITHUB_RUN_ATTEMPT", "1"); - Environment.SetEnvironmentVariable("GITHUB_JOB", "job_id"); - Environment.SetEnvironmentVariable("GITHUB_REF_NAME", "refs/heads/branch_name"); - Environment.SetEnvironmentVariable("GITHUB_HEAD_REF", "refs/heads/head_branch_name"); - - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - - Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciInfo.Provider); - Assert.AreEqual("repo_id", ciInfo.Repo); - Assert.AreEqual("refs/heads/branch_name", ciInfo.Branch); - Assert.AreEqual("actor", ciInfo.Author); - Assert.AreEqual("commit_sha", ciInfo.CommitId); - Assert.AreEqual("server_url/repository/commit/commit_sha", ciInfo.RevisionUrl); - Assert.AreEqual("run_id", ciInfo.RunId); - Assert.AreEqual(1, ciInfo.RunAttempt); - Assert.AreEqual("job_id", ciInfo.JobId); - } - - [Test] - public void GetCIInfo_GitHubActions_ReturnsGitHubActionsCIInfo_WithRefPrefixWhenEventNameIsPullRequest() - { - Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY_ID", "repo_id"); - Environment.SetEnvironmentVariable("GITHUB_ACTOR", "actor"); - Environment.SetEnvironmentVariable("GITHUB_SHA", "commit_sha"); - Environment.SetEnvironmentVariable("GITHUB_SERVER_URL", "server_url"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "repository"); - Environment.SetEnvironmentVariable("GITHUB_RUN_ID", "run_id"); - Environment.SetEnvironmentVariable("GITHUB_RUN_ATTEMPT", "1"); - Environment.SetEnvironmentVariable("GITHUB_JOB", "job_id"); - Environment.SetEnvironmentVariable("GITHUB_REF", "refs/heads/feature/branch_name"); - Environment.SetEnvironmentVariable("GITHUB_HEAD_REF", "refs/heads/head_branch_name"); - Environment.SetEnvironmentVariable("GITHUB_EVENT_NAME", "pull_request"); - - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - - Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciInfo.Provider); - Assert.AreEqual("repo_id", ciInfo.Repo); - Assert.AreEqual("refs/heads/head_branch_name", ciInfo.Branch); - Assert.AreEqual("actor", ciInfo.Author); - Assert.AreEqual("commit_sha", ciInfo.CommitId); - Assert.AreEqual("server_url/repository/commit/commit_sha", ciInfo.RevisionUrl); - Assert.AreEqual("run_id", ciInfo.RunId); - Assert.AreEqual(1, ciInfo.RunAttempt); - Assert.AreEqual("job_id", ciInfo.JobId); - } - - [Test] - public void GetCIInfo_GitHubActions_ReturnsGitHubActionsCIInfo_WithRefPrefixWhenEventNameIsPullRequestTarget() - { - Environment.SetEnvironmentVariable("GITHUB_ACTIONS", "true"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY_ID", "repo_id"); - Environment.SetEnvironmentVariable("GITHUB_ACTOR", "actor"); - Environment.SetEnvironmentVariable("GITHUB_SHA", "commit_sha"); - Environment.SetEnvironmentVariable("GITHUB_SERVER_URL", "server_url"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "repository"); - Environment.SetEnvironmentVariable("GITHUB_RUN_ID", "run_id"); - Environment.SetEnvironmentVariable("GITHUB_RUN_ATTEMPT", "1"); - Environment.SetEnvironmentVariable("GITHUB_JOB", "job_id"); - Environment.SetEnvironmentVariable("GITHUB_REF", "refs/heads/feature/branch_name"); - Environment.SetEnvironmentVariable("GITHUB_HEAD_REF", "refs/heads/head_branch_name"); - Environment.SetEnvironmentVariable("GITHUB_EVENT_NAME", "pull_request_target"); - - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - - Assert.AreEqual(CIConstants.s_gITHUB_ACTIONS, ciInfo.Provider); - Assert.AreEqual("repo_id", ciInfo.Repo); - Assert.AreEqual("refs/heads/head_branch_name", ciInfo.Branch); - Assert.AreEqual("actor", ciInfo.Author); - Assert.AreEqual("commit_sha", ciInfo.CommitId); - Assert.AreEqual("server_url/repository/commit/commit_sha", ciInfo.RevisionUrl); - Assert.AreEqual("run_id", ciInfo.RunId); - Assert.AreEqual(1, ciInfo.RunAttempt); - Assert.AreEqual("job_id", ciInfo.JobId); - } - - [Test] - public void GetCIInfo_AzureDevOps_ReturnsAzureDevOpsCIInfo() - { - Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", "some_value"); - Environment.SetEnvironmentVariable("TF_BUILD", "some_value"); - Environment.SetEnvironmentVariable("BUILD_REPOSITORY_ID", "repo_id"); - Environment.SetEnvironmentVariable("BUILD_SOURCEBRANCH", "branch_name"); - Environment.SetEnvironmentVariable("BUILD_REQUESTEDFOR", "author"); - Environment.SetEnvironmentVariable("BUILD_SOURCEVERSION", "commit_sha"); - Environment.SetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", "collection_uri/"); - Environment.SetEnvironmentVariable("SYSTEM_TEAMPROJECT", "team_project"); - Environment.SetEnvironmentVariable("BUILD_REPOSITORY_NAME", "repository_name"); - Environment.SetEnvironmentVariable("RELEASE_ATTEMPTNUMBER", "1"); - Environment.SetEnvironmentVariable("SYSTEM_JOBATTEMPT", "2"); - Environment.SetEnvironmentVariable("RELEASE_DEPLOYMENTID", "deployment_id"); - Environment.SetEnvironmentVariable("SYSTEM_DEFINITIONID", "definition_id"); - Environment.SetEnvironmentVariable("SYSTEM_JOBID", "job_id"); - - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - - Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, ciInfo.Provider); - Assert.AreEqual("repo_id", ciInfo.Repo); - Assert.AreEqual("branch_name", ciInfo.Branch); - Assert.AreEqual("author", ciInfo.Author); - Assert.AreEqual("commit_sha", ciInfo.CommitId); - Assert.AreEqual("collection_uri/team_project/_git/repository_name/commit/commit_sha", ciInfo.RevisionUrl); - Assert.AreEqual("definition_id-job_id", ciInfo.RunId); - Assert.AreEqual(1, ciInfo.RunAttempt); - Assert.AreEqual("deployment_id", ciInfo.JobId); - } - - [Test] - public void GetCIInfo_AzureDevOpsWithReleaseInfo_ReturnsAzureDevOpsCIInfo() - { - Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", "some_value"); - Environment.SetEnvironmentVariable("TF_BUILD", "some_value"); - Environment.SetEnvironmentVariable("BUILD_REPOSITORY_ID", "repo_id"); - Environment.SetEnvironmentVariable("BUILD_SOURCEBRANCH", "branch_name"); - Environment.SetEnvironmentVariable("BUILD_REQUESTEDFOR", "author"); - Environment.SetEnvironmentVariable("BUILD_SOURCEVERSION", "commit_sha"); - Environment.SetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", "collection_uri/"); - Environment.SetEnvironmentVariable("SYSTEM_TEAMPROJECT", "team_project"); - Environment.SetEnvironmentVariable("BUILD_REPOSITORY_NAME", "repository_name"); - Environment.SetEnvironmentVariable("RELEASE_ATTEMPTNUMBER", "1"); - Environment.SetEnvironmentVariable("SYSTEM_JOBATTEMPT", "2"); - Environment.SetEnvironmentVariable("RELEASE_DEPLOYMENTID", "deployment_id"); - Environment.SetEnvironmentVariable("SYSTEM_DEFINITIONID", "definition_id"); - Environment.SetEnvironmentVariable("SYSTEM_JOBID", "job_id"); - Environment.SetEnvironmentVariable("RELEASE_DEFINITIONID", "release-def"); - Environment.SetEnvironmentVariable("RELEASE_DEPLOYMENTID", "release-dep"); - - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - - Assert.AreEqual(CIConstants.s_aZURE_DEVOPS, ciInfo.Provider); - Assert.AreEqual("repo_id", ciInfo.Repo); - Assert.AreEqual("branch_name", ciInfo.Branch); - Assert.AreEqual("author", ciInfo.Author); - Assert.AreEqual("commit_sha", ciInfo.CommitId); - Assert.AreEqual("collection_uri/team_project/_git/repository_name/commit/commit_sha", ciInfo.RevisionUrl); - Assert.AreEqual("release-def-release-dep", ciInfo.RunId); - Assert.AreEqual(1, ciInfo.RunAttempt); - Assert.AreEqual("release-dep", ciInfo.JobId); - } - - [Test] - public void GetCIInfo_Default_ReturnsDefaultCIInfo() - { - Environment.SetEnvironmentVariable("GITHUB_ACTIONS", null); - Environment.SetEnvironmentVariable("AZURE_HTTP_USER_AGENT", null); - Environment.SetEnvironmentVariable("TF_BUILD", null); - Environment.SetEnvironmentVariable("REPO", "repo"); - Environment.SetEnvironmentVariable("BRANCH", "branch"); - Environment.SetEnvironmentVariable("AUTHOR", "author"); - Environment.SetEnvironmentVariable("COMMIT_ID", "commit_sha"); - Environment.SetEnvironmentVariable("REVISION_URL", "revision_url"); - Environment.SetEnvironmentVariable("RUN_ID", "run_id"); - Environment.SetEnvironmentVariable("RUN_ATTEMPT", "1"); - Environment.SetEnvironmentVariable("JOB_ID", "job_id"); - - CIInfo ciInfo = CiInfoProvider.GetCIInfo(); - - Assert.AreEqual(CIConstants.s_dEFAULT, ciInfo.Provider); - Assert.AreEqual("repo", ciInfo.Repo); - Assert.AreEqual("branch", ciInfo.Branch); - Assert.AreEqual("author", ciInfo.Author); - Assert.AreEqual("commit_sha", ciInfo.CommitId); - Assert.AreEqual("revision_url", ciInfo.RevisionUrl); - Assert.AreEqual("run_id", ciInfo.RunId); - Assert.AreEqual(1, ciInfo.RunAttempt); - Assert.AreEqual("job_id", ciInfo.JobId); - } - } -} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/ReporterUtilsTests.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/ReporterUtilsTests.cs deleted file mode 100644 index 6f2627690b32..000000000000 --- a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/tests/Utility/ReporterUtilsTests.cs +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Model; -using Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Utility; -using Microsoft.IdentityModel.JsonWebTokens; -using Microsoft.IdentityModel.Tokens; -using Moq; -namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Utility; - -[TestFixture] -public class ReporterUtilsTests -{ - private static string GetToken(Dictionary claims, DateTime? expires = null) - { - var tokenHandler = new JsonWebTokenHandler(); - var token = tokenHandler.CreateToken(new SecurityTokenDescriptor - { - Claims = claims, - Expires = expires ?? DateTime.UtcNow.AddMinutes(10), - }); - return token!; - } - - [Test] - public void IsTimeGreaterThanCurrentPlus10Minutes_ValidFutureSasUri_ReturnsTrue() - { - var reporterUtils = new ReporterUtils(); - string sasUri = "https://example.com/sas?se=" + DateTime.UtcNow.AddMinutes(15).ToString("o"); // 15 minutes in the future - bool result = reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(sasUri); - Assert.IsTrue(result); - } - - [Test] - public void IsTimeGreaterThanCurrentPlus10Minutes_ExpiredSasUri_ReturnsFalse() - { - var reporterUtils = new ReporterUtils(); - string sasUri = "https://example.com/sas?se=" + DateTime.UtcNow.AddMinutes(-5).ToString("o"); // 5 minutes in the past - bool result = reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(sasUri); - Assert.IsFalse(result); - } - - [Test] - public void IsTimeGreaterThanCurrentPlus10Minutes_InvalidSasUri_ReturnsFalse() - { - var reporterUtils = new ReporterUtils(); - string sasUri = "not_a_valid_sas_uri"; // Invalid SAS URI - bool result = reporterUtils.IsTimeGreaterThanCurrentPlus10Minutes(sasUri); - Assert.IsFalse(result); - } - - [Test] - public void ParseWorkspaceIdFromAccessToken_CustomToken_ReturnsTokenDetails() - { - var reporterUtils = new ReporterUtils(); - var accessToken = GetToken(new Dictionary - { - { "aid", "custom_aid" }, - { "oid", "custom_oid" }, - { "id", "custom_id" }, - { "name", "custom_username" }, - }); - - TokenDetails result = reporterUtils.ParseWorkspaceIdFromAccessToken(null, accessToken); - - Assert.AreEqual("custom_aid", result.aid); - Assert.AreEqual("custom_oid", result.oid); - Assert.AreEqual("custom_id", result.id); - Assert.AreEqual("custom_username", result.userName); - } - - [Test] - public void ParseWorkspaceIdFromAccessToken_EntraToken_ReturnsTokenDetails() - { - var reporterUtils = new ReporterUtils(); - var jsonWebTokenHandler = new JsonWebTokenHandler(); - var accessToken = GetToken(new Dictionary - { - { "oid", "entra_oid" }, - { "name", "entra_username" }, - }); - - TokenDetails result = reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler, accessToken); - - Assert.AreEqual("entra_oid", result.oid); - Assert.AreEqual(string.Empty, result.id); - Assert.AreEqual("entra_username", result.userName); - } - - [Test] - public void ParseWorkspaceIdFromAccessToken_NullToken_ThrowsArgumentNullException() - { - var reporterUtils = new ReporterUtils(); - var jsonWebTokenHandler = new JsonWebTokenHandler(); - string? accessToken = null; - - Assert.Throws(() => reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler, accessToken)); - } - - [Test] - public void ParseWorkspaceIdFromAccessToken_EmptyToken_ThrowsArgumentNullException() - { - var reporterUtils = new ReporterUtils(); - var jsonWebTokenHandler = new JsonWebTokenHandler(); - string accessToken = string.Empty; - - Assert.Throws(() => reporterUtils.ParseWorkspaceIdFromAccessToken(jsonWebTokenHandler, accessToken)); - } - [Test] - public void GetRunId_DefaultProvider_ReturnsNewGuid() - { - var cIInfo = new CIInfo { Provider = CIConstants.s_dEFAULT }; - var result = ReporterUtils.GetRunId(cIInfo); - Assert.IsNotNull(result); - Assert.IsTrue(Guid.TryParse(result, out _)); - } - - [Test] - public void GetRunId_NonDefaultProvider_ReturnsSha1Hash() - { - var cIInfo = new CIInfo { Provider = "NonDefaultProvider", Repo = "Repo", RunId = "RunId", RunAttempt = 1 }; - var expectedRunIdBeforeHash = $"{cIInfo.Provider}-{cIInfo.Repo}-{cIInfo.RunId}-{cIInfo.RunAttempt}"; - var result = ReporterUtils.GetRunId(cIInfo); - Assert.IsNotNull(result); - Assert.AreEqual(40, result.Length); - Assert.AreEqual(ReporterUtils.CalculateSha1Hash(expectedRunIdBeforeHash), result); - } - - [Test] - public void GetRunName_GitHubActionsPullRequest_ReturnsExpectedValue() - { - var ciInfo = new CIInfo { Provider = CIConstants.s_gITHUB_ACTIONS }; - Environment.SetEnvironmentVariable("GITHUB_EVENT_NAME", "pull_request"); - Environment.SetEnvironmentVariable("GITHUB_REF_NAME", "543/refs/merge"); - Environment.SetEnvironmentVariable("GITHUB_REPOSITORY", "owner/repo"); - - var result = ReporterUtils.GetRunName(ciInfo); - - var expected = "PR# 543 on Repo: owner/repo (owner/repo/pull/543)"; - Assert.AreEqual(expected, result); - } - [Test] - public void TruncateData_ValueExceedsMaxLength_ReturnsTruncatedString() - { - string value = "This is a very long string that exceeds the maximum length."; - int maxLength = 20; - - var result = ReporterUtils.TruncateData(value, maxLength); - - Assert.AreEqual("This is a very long ", result); - } - - [Test] - public void TruncateData_ValueWithinMaxLength_ReturnsOriginalString() - { - string value = "Short string"; - int maxLength = 20; - - var result = ReporterUtils.TruncateData(value, maxLength); - - Assert.AreEqual(value, result); - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln deleted file mode 100644 index 5a624bf0b30f..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Azure.ResourceManager.PlaywrightTesting.sln +++ /dev/null @@ -1,63 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30309.148 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{372C84B3-CF2C-4B7F-A895-20CE01F978C9}") = "Azure.ResourceManager.PlaywrightTesting", "src\Azure.ResourceManager.PlaywrightTesting.csproj", "{159D69CE-BC46-4588-B8FC-1457EA6B726D}" -EndProject -Project("{372C84B3-CF2C-4B7F-A895-20CE01F978C9}") = "Azure.ResourceManager.PlaywrightTesting.Tests", "tests\Azure.ResourceManager.PlaywrightTesting.Tests.csproj", "{5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}" -EndProject -Global - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {60485F7B-B9BD-4B82-847A-0414A6EEE1AE} - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Debug|x64.ActiveCfg = Debug|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Debug|x64.Build.0 = Debug|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Debug|x86.ActiveCfg = Debug|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Debug|x86.Build.0 = Debug|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Release|Any CPU.Build.0 = Release|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Release|x64.ActiveCfg = Release|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Release|x64.Build.0 = Release|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Release|x86.ActiveCfg = Release|Any CPU - {159D69CE-BC46-4588-B8FC-1457EA6B726D}.Release|x86.Build.0 = Release|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Debug|x64.ActiveCfg = Debug|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Debug|x64.Build.0 = Debug|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Debug|x86.ActiveCfg = Debug|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Debug|x86.Build.0 = Debug|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Release|Any CPU.Build.0 = Release|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Release|x64.ActiveCfg = Release|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Release|x64.Build.0 = Release|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Release|x86.ActiveCfg = Release|Any CPU - {5DB28A7E-A376-4DF3-BA28-3CE73AF84E28}.Release|x86.Build.0 = Release|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Debug|x64.ActiveCfg = Debug|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Debug|x64.Build.0 = Debug|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Debug|x86.ActiveCfg = Debug|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Debug|x86.Build.0 = Debug|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Release|Any CPU.Build.0 = Release|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Release|x64.ActiveCfg = Release|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Release|x64.Build.0 = Release|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Release|x86.ActiveCfg = Release|Any CPU - {8F049932-7F19-4BAA-95DA-C0E265E88842}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/CHANGELOG.md b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/CHANGELOG.md deleted file mode 100644 index 2b8b031e7c9a..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/CHANGELOG.md +++ /dev/null @@ -1,34 +0,0 @@ -# Release History - -## 1.1.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0 (2024-12-18) - -### Features Added - -- Upgraded api-version from '2023-10-01-preview' to '2024-12-01'. Spec detail available at https://github.com/Azure/azure-rest-api-specs/tree/c39acac0b3b7ceeee03b594a7b49c9bad6b8e9f2/specification/playwrighttesting/PlaywrightTesting.Management. -- Exposed `JsonModelWriteCore` for model serialization procedure. - -## 1.0.0-beta.1 (2024-01-19) - -### General New Features - -This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: - - - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. - - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. - - HTTP pipeline with custom policies. - - Better error-handling. - - Support uniform telemetry across all languages. - -This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). - -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/README.md b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/README.md deleted file mode 100644 index 27fbef65ae09..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Microsoft Azure Playwright Testing management client library for .NET - -Microsoft Playwright Testing is a fully managed service for end-to-end testing built on top of Playwright. With Playwright, you can automate end-to-end tests to ensure your web applications work the way you expect it to, across different web browsers and operating systems. The service abstracts the complexity and infrastructure for running Playwright tests with high parallelization. - -This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: - - - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. - - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. - - HTTP pipeline with custom policies. - - Better error-handling. - - Support uniform telemetry across all languages. - -## Getting started - -### Install the package - -Install the Microsoft Azure Playwright Testing management library for .NET with [NuGet](https://www.nuget.org/): - -```dotnetcli -dotnet add package Azure.ResourceManager.PlaywrightTesting -``` - -### Prerequisites - -* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). - -### Authenticate the Client - -To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). - -## Key concepts - -Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) - -## Documentation - -Documentation is available to help you learn how to use this package: - -- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). -- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). -- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). - -## Examples - -Code samples for using the management library for .NET can be found in the following locations -- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) - -## Troubleshooting - -- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). -- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. - -## Next steps - -For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). - -## Contributing - -For details on contributing to this repository, see the [contributing -guide][cg]. - -This project welcomes contributions and suggestions. Most contributions -require you to agree to a Contributor License Agreement (CLA) declaring -that you have the right to, and actually do, grant us the rights to use -your contribution. For details, visit . - -When you submit a pull request, a CLA-bot will automatically determine -whether you need to provide a CLA and decorate the PR appropriately -(for example, label, comment). Follow the instructions provided by the -bot. You'll only need to do this action once across all repositories -using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For -more information, see the [Code of Conduct FAQ][coc_faq] or contact - with any other questions or comments. - - -[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md -[coc]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs deleted file mode 100644 index 2e7e392ab2ed..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs +++ /dev/null @@ -1,441 +0,0 @@ -namespace Azure.ResourceManager.PlaywrightTesting -{ - public partial class AzureResourceManagerPlaywrightTestingContext : System.ClientModel.Primitives.ModelReaderWriterContext - { - internal AzureResourceManagerPlaywrightTestingContext() { } - public static Azure.ResourceManager.PlaywrightTesting.AzureResourceManagerPlaywrightTestingContext Default { get { throw null; } } - protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } - } - public partial class PlaywrightTestingAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PlaywrightTestingAccountCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string accountName, 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 accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string accountName, 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 PlaywrightTestingAccountData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingAccountData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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.PlaywrightTesting.PlaywrightTestingAccountData 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 PlaywrightTestingAccountQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PlaywrightTestingAccountQuotaCollection() { } - public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingAccountQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingAccountQuotaData() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountQuotaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected PlaywrightTestingAccountQuotaResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected PlaywrightTestingAccountResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { 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 Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaCollection GetAllPlaywrightTestingAccountQuota() { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPlaywrightTestingAccountQuota(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountQuotaAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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.PlaywrightTesting.PlaywrightTestingAccountData 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.Response Update(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public static partial class PlaywrightTestingExtensions - { - public static Azure.Response CheckPlaywrightTestingNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location) { throw null; } - public static Azure.Response GetPlaywrightTestingAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class PlaywrightTestingQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PlaywrightTestingQuotaCollection() { } - public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingQuotaData() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData 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.PlaywrightTesting.PlaywrightTestingQuotaData 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 PlaywrightTestingQuotaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected PlaywrightTestingQuotaResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingQuotaData 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.PlaywrightTesting.PlaywrightTestingQuotaData 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.PlaywrightTesting.Mocking -{ - public partial class MockablePlaywrightTestingArmClient : Azure.ResourceManager.ArmResource - { - protected MockablePlaywrightTestingArmClient() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class MockablePlaywrightTestingResourceGroupResource : Azure.ResourceManager.ArmResource - { - protected MockablePlaywrightTestingResourceGroupResource() { } - public virtual Azure.Response GetPlaywrightTestingAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() { throw null; } - } - public partial class MockablePlaywrightTestingSubscriptionResource : Azure.ResourceManager.ArmResource - { - protected MockablePlaywrightTestingSubscriptionResource() { } - public virtual Azure.Response CheckPlaywrightTestingNameAvailability(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(string location) { throw null; } - public virtual Azure.Pageable GetPlaywrightTestingAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPlaywrightTestingQuota(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } -} -namespace Azure.ResourceManager.PlaywrightTesting.Models -{ - public partial class AccountUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AccountUpdateProperties() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties 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.PlaywrightTesting.Models.AccountUpdateProperties 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 static partial class ArmPlaywrightTestingModelFactory - { - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData PlaywrightTestingAccountData(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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties properties = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties PlaywrightTestingAccountFreeTrialProperties(System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset expiryOn = default(System.DateTimeOffset), int allocatedValue = 0, int usedValue = 0, float percentageUsed = 0f) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties PlaywrightTestingAccountProperties(System.Uri dashboardUri = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? regionalAffinity = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? scalableExecution = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? reporting = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? localAuth = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData PlaywrightTestingAccountQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties properties = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties PlaywrightTestingAccountQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties PlaywrightTestingFreeTrialProperties(string accountId = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState state = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? reason = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason?), string message = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData PlaywrightTestingQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties properties = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties PlaywrightTestingQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? offeringType = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - } - public partial class PlaywrightTestingAccountFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingAccountFreeTrialProperties() { } - public int AllocatedValue { get { throw null; } } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public System.DateTimeOffset ExpiryOn { get { throw null; } } - public float PercentageUsed { get { throw null; } } - public int UsedValue { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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 PlaywrightTestingAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingAccountPatch() { } - public Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties Properties { 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) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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 PlaywrightTestingAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingAccountProperties() { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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 PlaywrightTestingAccountQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingAccountQuotaProperties() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties FreeTrial { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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 PlaywrightTestingEnablementStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingEnablementStatus(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus 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.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class PlaywrightTestingFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingFreeTrialProperties() { } - public string AccountId { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState State { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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 PlaywrightTestingFreeTrialState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingFreeTrialState(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Active { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Expired { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotEligible { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotRegistered { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState 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.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class PlaywrightTestingNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingNameAvailabilityContent() { } - public string Name { get { throw null; } set { } } - public string Type { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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 PlaywrightTestingNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingNameAvailabilityResult() { } - public bool? IsNameAvailable { get { throw null; } } - public string Message { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? Reason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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 PlaywrightTestingNameUnavailableReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingNameUnavailableReason(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason AlreadyExists { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason Invalid { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason 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.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PlaywrightTestingOfferingType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingOfferingType(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType GeneralAvailability { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType NotApplicable { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PrivatePreview { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PublicPreview { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType 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.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PlaywrightTestingProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState 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.PlaywrightTesting.Models.PlaywrightTestingProvisioningState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PlaywrightTestingQuotaName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingQuotaName(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName Reporting { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName ScalableExecution { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName 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.PlaywrightTesting.Models.PlaywrightTestingQuotaName left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName right) { throw null; } - public override string ToString() { throw null; } - } - public partial class PlaywrightTestingQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingQuotaProperties() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties FreeTrial { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? OfferingType { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs deleted file mode 100644 index 2e7e392ab2ed..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs +++ /dev/null @@ -1,441 +0,0 @@ -namespace Azure.ResourceManager.PlaywrightTesting -{ - public partial class AzureResourceManagerPlaywrightTestingContext : System.ClientModel.Primitives.ModelReaderWriterContext - { - internal AzureResourceManagerPlaywrightTestingContext() { } - public static Azure.ResourceManager.PlaywrightTesting.AzureResourceManagerPlaywrightTestingContext Default { get { throw null; } } - protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } - } - public partial class PlaywrightTestingAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PlaywrightTestingAccountCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string accountName, 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 accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string accountName, 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 PlaywrightTestingAccountData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingAccountData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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.PlaywrightTesting.PlaywrightTestingAccountData 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 PlaywrightTestingAccountQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PlaywrightTestingAccountQuotaCollection() { } - public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingAccountQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingAccountQuotaData() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountQuotaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected PlaywrightTestingAccountQuotaResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected PlaywrightTestingAccountResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { 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 Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaCollection GetAllPlaywrightTestingAccountQuota() { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPlaywrightTestingAccountQuota(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountQuotaAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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.PlaywrightTesting.PlaywrightTestingAccountData 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.Response Update(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public static partial class PlaywrightTestingExtensions - { - public static Azure.Response CheckPlaywrightTestingNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location) { throw null; } - public static Azure.Response GetPlaywrightTestingAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class PlaywrightTestingQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PlaywrightTestingQuotaCollection() { } - public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingQuotaData() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties Properties { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData 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.PlaywrightTesting.PlaywrightTestingQuotaData 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 PlaywrightTestingQuotaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected PlaywrightTestingQuotaResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingQuotaData 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.PlaywrightTesting.PlaywrightTestingQuotaData 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.PlaywrightTesting.Mocking -{ - public partial class MockablePlaywrightTestingArmClient : Azure.ResourceManager.ArmResource - { - protected MockablePlaywrightTestingArmClient() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class MockablePlaywrightTestingResourceGroupResource : Azure.ResourceManager.ArmResource - { - protected MockablePlaywrightTestingResourceGroupResource() { } - public virtual Azure.Response GetPlaywrightTestingAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() { throw null; } - } - public partial class MockablePlaywrightTestingSubscriptionResource : Azure.ResourceManager.ArmResource - { - protected MockablePlaywrightTestingSubscriptionResource() { } - public virtual Azure.Response CheckPlaywrightTestingNameAvailability(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(string location) { throw null; } - public virtual Azure.Pageable GetPlaywrightTestingAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPlaywrightTestingQuota(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } -} -namespace Azure.ResourceManager.PlaywrightTesting.Models -{ - public partial class AccountUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AccountUpdateProperties() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties 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.PlaywrightTesting.Models.AccountUpdateProperties 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 static partial class ArmPlaywrightTestingModelFactory - { - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData PlaywrightTestingAccountData(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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties properties = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties PlaywrightTestingAccountFreeTrialProperties(System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset expiryOn = default(System.DateTimeOffset), int allocatedValue = 0, int usedValue = 0, float percentageUsed = 0f) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties PlaywrightTestingAccountProperties(System.Uri dashboardUri = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? regionalAffinity = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? scalableExecution = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? reporting = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? localAuth = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData PlaywrightTestingAccountQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties properties = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties PlaywrightTestingAccountQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties PlaywrightTestingFreeTrialProperties(string accountId = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState state = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? reason = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason?), string message = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData PlaywrightTestingQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties properties = null) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties PlaywrightTestingQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? offeringType = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - } - public partial class PlaywrightTestingAccountFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingAccountFreeTrialProperties() { } - public int AllocatedValue { get { throw null; } } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public System.DateTimeOffset ExpiryOn { get { throw null; } } - public float PercentageUsed { get { throw null; } } - public int UsedValue { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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 PlaywrightTestingAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingAccountPatch() { } - public Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties Properties { 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) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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 PlaywrightTestingAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingAccountProperties() { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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 PlaywrightTestingAccountQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingAccountQuotaProperties() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties FreeTrial { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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 PlaywrightTestingEnablementStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingEnablementStatus(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus 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.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class PlaywrightTestingFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingFreeTrialProperties() { } - public string AccountId { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState State { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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 PlaywrightTestingFreeTrialState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingFreeTrialState(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Active { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Expired { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotEligible { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotRegistered { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState 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.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class PlaywrightTestingNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PlaywrightTestingNameAvailabilityContent() { } - public string Name { get { throw null; } set { } } - public string Type { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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 PlaywrightTestingNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingNameAvailabilityResult() { } - public bool? IsNameAvailable { get { throw null; } } - public string Message { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? Reason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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 PlaywrightTestingNameUnavailableReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingNameUnavailableReason(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason AlreadyExists { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason Invalid { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason 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.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PlaywrightTestingOfferingType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingOfferingType(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType GeneralAvailability { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType NotApplicable { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PrivatePreview { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PublicPreview { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType 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.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PlaywrightTestingProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState 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.PlaywrightTesting.Models.PlaywrightTestingProvisioningState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PlaywrightTestingQuotaName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PlaywrightTestingQuotaName(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName Reporting { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName ScalableExecution { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName 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.PlaywrightTesting.Models.PlaywrightTestingQuotaName left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName right) { throw null; } - public override string ToString() { throw null; } - } - public partial class PlaywrightTestingQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PlaywrightTestingQuotaProperties() { } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties FreeTrial { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? OfferingType { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/assets.json b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/assets.json deleted file mode 100644 index 6833167d262e..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "net", - "TagPrefix": "net/playwrighttesting/Azure.ResourceManager.PlaywrightTesting", - "Tag": "net/playwrighttesting/Azure.ResourceManager.PlaywrightTesting_162983de9d" -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Azure.ResourceManager.PlaywrightTesting.csproj b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Azure.ResourceManager.PlaywrightTesting.csproj deleted file mode 100644 index 3a6c788a4d95..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Azure.ResourceManager.PlaywrightTesting.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - 1.1.0-beta.1 - - 1.0.0 - Azure.ResourceManager.PlaywrightTesting - Azure Resource Manager client SDK for Azure resource provider PlaywrightTesting. - azure;management;arm;resource manager;playwrighttesting - - diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs deleted file mode 100644 index c94030a90fca..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs +++ /dev/null @@ -1,155 +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; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.PlaywrightTesting.Models -{ - /// Model factory for models. - public static partial class ArmPlaywrightTestingModelFactory - { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static PlaywrightTestingAccountData PlaywrightTestingAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PlaywrightTestingAccountProperties properties = null) - { - tags ??= new Dictionary(); - - return new PlaywrightTestingAccountData( - id, - name, - resourceType, - systemData, - tags, - location, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The Playwright testing dashboard URI for the account resource. - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. - /// The status of the last operation. - /// A new instance for mocking. - public static PlaywrightTestingAccountProperties PlaywrightTestingAccountProperties(Uri dashboardUri = null, PlaywrightTestingEnablementStatus? regionalAffinity = null, PlaywrightTestingEnablementStatus? scalableExecution = null, PlaywrightTestingEnablementStatus? reporting = null, PlaywrightTestingEnablementStatus? localAuth = null, PlaywrightTestingProvisioningState? provisioningState = null) - { - return new PlaywrightTestingAccountProperties( - dashboardUri, - regionalAffinity, - scalableExecution, - reporting, - localAuth, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Indicates if the resource name is available. - /// The reason why the given name is not available. - /// Detailed reason why the given name is not available. - /// A new instance for mocking. - public static PlaywrightTestingNameAvailabilityResult PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable = null, PlaywrightTestingNameUnavailableReason? reason = null, string message = null) - { - return new PlaywrightTestingNameAvailabilityResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static PlaywrightTestingQuotaData PlaywrightTestingQuotaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlaywrightTestingQuotaProperties properties = null) - { - return new PlaywrightTestingQuotaData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The subscription quota resource free-trial properties. - /// Indicates the offering type for the subscription. - /// The status of the last operation. - /// A new instance for mocking. - public static PlaywrightTestingQuotaProperties PlaywrightTestingQuotaProperties(PlaywrightTestingFreeTrialProperties freeTrial = null, PlaywrightTestingOfferingType? offeringType = null, PlaywrightTestingProvisioningState? provisioningState = null) - { - return new PlaywrightTestingQuotaProperties(freeTrial, offeringType, provisioningState, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The Playwright service account id. - /// The free-trial state. - /// A new instance for mocking. - public static PlaywrightTestingFreeTrialProperties PlaywrightTestingFreeTrialProperties(string accountId = null, PlaywrightTestingFreeTrialState state = default) - { - return new PlaywrightTestingFreeTrialProperties(accountId, state, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static PlaywrightTestingAccountQuotaData PlaywrightTestingAccountQuotaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlaywrightTestingAccountQuotaProperties properties = null) - { - return new PlaywrightTestingAccountQuotaData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The Playwright service account quota resource free-trial properties. - /// The status of the last operation. - /// A new instance for mocking. - public static PlaywrightTestingAccountQuotaProperties PlaywrightTestingAccountQuotaProperties(PlaywrightTestingAccountFreeTrialProperties freeTrial = null, PlaywrightTestingProvisioningState? provisioningState = null) - { - return new PlaywrightTestingAccountQuotaProperties(freeTrial, provisioningState, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The free-trial createdAt utcDateTime. - /// The free-trial expiryAt utcDateTime. - /// The free-trial allocated limit value eg. allocated free minutes. - /// The free-trial used value eg. used free minutes. - /// The free-trial percentage used. - /// A new instance for mocking. - public static PlaywrightTestingAccountFreeTrialProperties PlaywrightTestingAccountFreeTrialProperties(DateTimeOffset createdOn = default, DateTimeOffset expiryOn = default, int allocatedValue = default, int usedValue = default, float percentageUsed = default) - { - return new PlaywrightTestingAccountFreeTrialProperties( - createdOn, - expiryOn, - allocatedValue, - usedValue, - percentageUsed, - serializedAdditionalRawData: null); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs deleted file mode 100644 index b1963f3e762b..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.PlaywrightTesting.Mocking -{ - /// A class to add extension methods to ArmClient. - public partial class MockablePlaywrightTestingArmClient : ArmResource - { - /// Initializes a new instance of the class for mocking. - protected MockablePlaywrightTestingArmClient() - { - } - - /// 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 MockablePlaywrightTestingArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - internal MockablePlaywrightTestingArmClient(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. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(ResourceIdentifier id) - { - PlaywrightTestingAccountResource.ValidateResourceId(id); - return new PlaywrightTestingAccountResource(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 PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(ResourceIdentifier id) - { - PlaywrightTestingQuotaResource.ValidateResourceId(id); - return new PlaywrightTestingQuotaResource(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 PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(ResourceIdentifier id) - { - PlaywrightTestingAccountQuotaResource.ValidateResourceId(id); - return new PlaywrightTestingAccountQuotaResource(Client, id); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs deleted file mode 100644 index 4da148cf71e2..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs +++ /dev/null @@ -1,105 +0,0 @@ -// 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.Core; - -namespace Azure.ResourceManager.PlaywrightTesting.Mocking -{ - /// A class to add extension methods to ResourceGroupResource. - public partial class MockablePlaywrightTestingResourceGroupResource : ArmResource - { - /// Initializes a new instance of the class for mocking. - protected MockablePlaywrightTestingResourceGroupResource() - { - } - - /// 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 MockablePlaywrightTestingResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of PlaywrightTestingAccountResources in the ResourceGroupResource. - /// An object representing collection of PlaywrightTestingAccountResources and their operations over a PlaywrightTestingAccountResource. - public virtual PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() - { - return GetCachedClient(client => new PlaywrightTestingAccountCollection(client, Id)); - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetPlaywrightTestingAccountAsync(string accountName, CancellationToken cancellationToken = default) - { - return await GetPlaywrightTestingAccounts().GetAsync(accountName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetPlaywrightTestingAccount(string accountName, CancellationToken cancellationToken = default) - { - return GetPlaywrightTestingAccounts().Get(accountName, cancellationToken); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs deleted file mode 100644 index 0d7eb6e75f11..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting.Mocking -{ - /// A class to add extension methods to SubscriptionResource. - public partial class MockablePlaywrightTestingSubscriptionResource : ArmResource - { - private ClientDiagnostics _playwrightTestingAccountAccountsClientDiagnostics; - private AccountsRestOperations _playwrightTestingAccountAccountsRestClient; - - /// Initializes a new instance of the class for mocking. - protected MockablePlaywrightTestingSubscriptionResource() - { - } - - /// 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 MockablePlaywrightTestingSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private ClientDiagnostics PlaywrightTestingAccountAccountsClientDiagnostics => _playwrightTestingAccountAccountsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", PlaywrightTestingAccountResource.ResourceType.Namespace, Diagnostics); - private AccountsRestOperations PlaywrightTestingAccountAccountsRestClient => _playwrightTestingAccountAccountsRestClient ??= new AccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PlaywrightTestingAccountResource.ResourceType)); - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of PlaywrightTestingQuotaResources in the SubscriptionResource. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// An object representing collection of PlaywrightTestingQuotaResources and their operations over a PlaywrightTestingQuotaResource. - public virtual PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(string location) - { - return new PlaywrightTestingQuotaCollection(Client, Id, location); - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetPlaywrightTestingQuotaAsync(string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - return await GetAllPlaywrightTestingQuota(location).GetAsync(quotaName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetPlaywrightTestingQuota(string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - return GetAllPlaywrightTestingQuota(location).Get(quotaName, cancellationToken); - } - - /// - /// List Account resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts - /// - /// - /// Operation Id - /// Account_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetPlaywrightTestingAccountsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => PlaywrightTestingAccountAccountsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PlaywrightTestingAccountAccountsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountResource(Client, PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(e)), PlaywrightTestingAccountAccountsClientDiagnostics, Pipeline, "MockablePlaywrightTestingSubscriptionResource.GetPlaywrightTestingAccounts", "value", "nextLink", cancellationToken); - } - - /// - /// List Account resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts - /// - /// - /// Operation Id - /// Account_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetPlaywrightTestingAccounts(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => PlaywrightTestingAccountAccountsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PlaywrightTestingAccountAccountsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountResource(Client, PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(e)), PlaywrightTestingAccountAccountsClientDiagnostics, Pipeline, "MockablePlaywrightTestingSubscriptionResource.GetPlaywrightTestingAccounts", "value", "nextLink", cancellationToken); - } - - /// - /// Adds check global name availability operation, normally used if a resource name must be globally unique. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability - /// - /// - /// Operation Id - /// Accounts_CheckPlaywrightTestingNameAvailability - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The CheckAvailability request. - /// The cancellation token to use. - /// is null. - public virtual async Task> CheckPlaywrightTestingNameAvailabilityAsync(PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = PlaywrightTestingAccountAccountsClientDiagnostics.CreateScope("MockablePlaywrightTestingSubscriptionResource.CheckPlaywrightTestingNameAvailability"); - scope.Start(); - try - { - var response = await PlaywrightTestingAccountAccountsRestClient.CheckPlaywrightTestingNameAvailabilityAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Adds check global name availability operation, normally used if a resource name must be globally unique. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability - /// - /// - /// Operation Id - /// Accounts_CheckPlaywrightTestingNameAvailability - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The CheckAvailability request. - /// The cancellation token to use. - /// is null. - public virtual Response CheckPlaywrightTestingNameAvailability(PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = PlaywrightTestingAccountAccountsClientDiagnostics.CreateScope("MockablePlaywrightTestingSubscriptionResource.CheckPlaywrightTestingNameAvailability"); - scope.Start(); - try - { - var response = PlaywrightTestingAccountAccountsRestClient.CheckPlaywrightTestingNameAvailability(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs deleted file mode 100644 index 8ac39d8a7c03..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs +++ /dev/null @@ -1,427 +0,0 @@ -// 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.Core; -using Azure.ResourceManager.PlaywrightTesting.Mocking; -using Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// A class to add extension methods to Azure.ResourceManager.PlaywrightTesting. - public static partial class PlaywrightTestingExtensions - { - private static MockablePlaywrightTestingArmClient GetMockablePlaywrightTestingArmClient(ArmClient client) - { - return client.GetCachedClient(client0 => new MockablePlaywrightTestingArmClient(client0)); - } - - private static MockablePlaywrightTestingResourceGroupResource GetMockablePlaywrightTestingResourceGroupResource(ArmResource resource) - { - return resource.GetCachedClient(client => new MockablePlaywrightTestingResourceGroupResource(client, resource.Id)); - } - - private static MockablePlaywrightTestingSubscriptionResource GetMockablePlaywrightTestingSubscriptionResource(ArmResource resource) - { - return resource.GetCachedClient(client => new MockablePlaywrightTestingSubscriptionResource(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 PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockablePlaywrightTestingArmClient(client).GetPlaywrightTestingAccountResource(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 PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockablePlaywrightTestingArmClient(client).GetPlaywrightTestingQuotaResource(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 PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockablePlaywrightTestingArmClient(client).GetPlaywrightTestingAccountQuotaResource(id); - } - - /// - /// Gets a collection of PlaywrightTestingAccountResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of PlaywrightTestingAccountResources and their operations over a PlaywrightTestingAccountResource. - public static PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccounts(); - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Name of account. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetPlaywrightTestingAccountAsync(this ResourceGroupResource resourceGroupResource, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccountAsync(accountName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Name of account. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetPlaywrightTestingAccount(this ResourceGroupResource resourceGroupResource, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccount(accountName, cancellationToken); - } - - /// - /// Gets a collection of PlaywrightTestingQuotaResources in the SubscriptionResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// An object representing collection of PlaywrightTestingQuotaResources and their operations over a PlaywrightTestingQuotaResource. - public static PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this SubscriptionResource subscriptionResource, string location) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetAllPlaywrightTestingQuota(location); - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetPlaywrightTestingQuotaAsync(this SubscriptionResource subscriptionResource, string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return await GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingQuotaAsync(location, quotaName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetPlaywrightTestingQuota(this SubscriptionResource subscriptionResource, string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingQuota(location, quotaName, cancellationToken); - } - - /// - /// List Account resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts - /// - /// - /// Operation Id - /// Account_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance 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 GetPlaywrightTestingAccountsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingAccountsAsync(cancellationToken); - } - - /// - /// List Account resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts - /// - /// - /// Operation Id - /// Account_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance 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 GetPlaywrightTestingAccounts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingAccounts(cancellationToken); - } - - /// - /// Adds check global name availability operation, normally used if a resource name must be globally unique. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability - /// - /// - /// Operation Id - /// Accounts_CheckPlaywrightTestingNameAvailability - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The CheckAvailability request. - /// The cancellation token to use. - /// or is null. - public static async Task> CheckPlaywrightTestingNameAvailabilityAsync(this SubscriptionResource subscriptionResource, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return await GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).CheckPlaywrightTestingNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); - } - - /// - /// Adds check global name availability operation, normally used if a resource name must be globally unique. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability - /// - /// - /// Operation Id - /// Accounts_CheckPlaywrightTestingNameAvailability - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The CheckAvailability request. - /// The cancellation token to use. - /// or is null. - public static Response CheckPlaywrightTestingNameAvailability(this SubscriptionResource subscriptionResource, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).CheckPlaywrightTestingNameAvailability(content, cancellationToken); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Argument.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Argument.cs deleted file mode 100644 index 79257492bf24..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Argument.cs +++ /dev/null @@ -1,129 +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; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal static class Argument - { - public static void AssertNotNull(T value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - } - - public static void AssertNotNull(T? value, string name) - where T : struct - { - if (!value.HasValue) - { - throw new ArgumentNullException(name); - } - } - - public static void AssertNotNullOrEmpty(IEnumerable value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (value is ICollection collectionOfT && collectionOfT.Count == 0) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - if (value is ICollection collection && collection.Count == 0) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - using IEnumerator e = value.GetEnumerator(); - if (!e.MoveNext()) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - } - - public static void AssertNotNullOrEmpty(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (value.Length == 0) - { - 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs deleted file mode 100644 index 7388594c21fc..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs +++ /dev/null @@ -1,167 +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; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull - { - private IDictionary _innerDictionary; - - public ChangeTrackingDictionary() - { - } - - public ChangeTrackingDictionary(IDictionary dictionary) - { - if (dictionary == null) - { - return; - } - _innerDictionary = new Dictionary(dictionary); - } - - public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) - { - if (dictionary == null) - { - return; - } - _innerDictionary = new Dictionary(); - foreach (var pair in dictionary) - { - _innerDictionary.Add(pair); - } - } - - public bool IsUndefined => _innerDictionary == null; - - public int Count => IsUndefined ? 0 : EnsureDictionary().Count; - - public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; - - public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; - - public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; - - public TValue this[TKey key] - { - get - { - if (IsUndefined) - { - throw new KeyNotFoundException(nameof(key)); - } - return EnsureDictionary()[key]; - } - set - { - EnsureDictionary()[key] = value; - } - } - - IEnumerable IReadOnlyDictionary.Keys => Keys; - - IEnumerable IReadOnlyDictionary.Values => Values; - - public IEnumerator> GetEnumerator() - { - if (IsUndefined) - { - IEnumerator> enumerateEmpty() - { - yield break; - } - return enumerateEmpty(); - } - return EnsureDictionary().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Add(KeyValuePair item) - { - EnsureDictionary().Add(item); - } - - public void Clear() - { - EnsureDictionary().Clear(); - } - - public bool Contains(KeyValuePair item) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int index) - { - if (IsUndefined) - { - return; - } - EnsureDictionary().CopyTo(array, index); - } - - public bool Remove(KeyValuePair item) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().Remove(item); - } - - public void Add(TKey key, TValue value) - { - EnsureDictionary().Add(key, value); - } - - public bool ContainsKey(TKey key) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().ContainsKey(key); - } - - public bool Remove(TKey key) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().Remove(key); - } - - public bool TryGetValue(TKey key, out TValue value) - { - if (IsUndefined) - { - value = default; - return false; - } - return EnsureDictionary().TryGetValue(key, out value); - } - - public IDictionary EnsureDictionary() - { - return _innerDictionary ??= new Dictionary(); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs deleted file mode 100644 index 3db0b111aa9c..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs +++ /dev/null @@ -1,153 +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.Linq; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal class ChangeTrackingList : IList, IReadOnlyList - { - private IList _innerList; - - public ChangeTrackingList() - { - } - - public ChangeTrackingList(IList innerList) - { - if (innerList != null) - { - _innerList = innerList; - } - } - - public ChangeTrackingList(IReadOnlyList innerList) - { - if (innerList != null) - { - _innerList = innerList.ToList(); - } - } - - public bool IsUndefined => _innerList == null; - - public int Count => IsUndefined ? 0 : EnsureList().Count; - - public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; - - public T this[int index] - { - get - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - return EnsureList()[index]; - } - set - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - EnsureList()[index] = value; - } - } - - public void Reset() - { - _innerList = null; - } - - public IEnumerator GetEnumerator() - { - if (IsUndefined) - { - IEnumerator enumerateEmpty() - { - yield break; - } - return enumerateEmpty(); - } - return EnsureList().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Add(T item) - { - EnsureList().Add(item); - } - - public void Clear() - { - EnsureList().Clear(); - } - - public bool Contains(T item) - { - if (IsUndefined) - { - return false; - } - return EnsureList().Contains(item); - } - - public void CopyTo(T[] array, int arrayIndex) - { - if (IsUndefined) - { - return; - } - EnsureList().CopyTo(array, arrayIndex); - } - - public bool Remove(T item) - { - if (IsUndefined) - { - return false; - } - return EnsureList().Remove(item); - } - - public int IndexOf(T item) - { - if (IsUndefined) - { - return -1; - } - return EnsureList().IndexOf(item); - } - - public void Insert(int index, T item) - { - EnsureList().Insert(index, item); - } - - public void RemoveAt(int index) - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - EnsureList().RemoveAt(index); - } - - public IList EnsureList() - { - return _innerList ??= new List(); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs deleted file mode 100644 index 697bc68caae9..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs +++ /dev/null @@ -1,409 +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.Diagnostics; -using System.Globalization; -using System.Text.Json; -using System.Xml; -using Azure.Core; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal static 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()); - - public static object GetObject(this JsonElement element) - { - switch (element.ValueKind) - { - case JsonValueKind.String: - return element.GetString(); - case JsonValueKind.Number: - if (element.TryGetInt32(out int intValue)) - { - return intValue; - } - if (element.TryGetInt64(out long longValue)) - { - return longValue; - } - return element.GetDouble(); - case JsonValueKind.True: - return true; - case JsonValueKind.False: - return false; - case JsonValueKind.Undefined: - case JsonValueKind.Null: - return null; - case JsonValueKind.Object: - var 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(); - foreach (var item in element.EnumerateArray()) - { - list.Add(item.GetObject()); - } - return list.ToArray(); - default: - throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); - } - } - - public static byte[] GetBytesFromBase64(this JsonElement element, string format) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - - return format switch - { - "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), - "D" => element.GetBytesFromBase64(), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - } - - public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch - { - "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), - _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) - }; - - public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); - - public static char GetChar(this JsonElement element) - { - if (element.ValueKind == JsonValueKind.String) - { - var text = element.GetString(); - if (text == null || text.Length != 1) - { - throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); - } - return text[0]; - } - else - { - throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); - } - } - - [Conditional("DEBUG")] - 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"); - } - - public static string GetRequiredString(this JsonElement element) - { - var 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}'."); - } - return value; - } - - public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) - { - writer.WriteStringValue(TypeFormatters.ToString(value, format)); - } - - public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) - { - writer.WriteStringValue(TypeFormatters.ToString(value, format)); - } - - public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) - { - writer.WriteStringValue(TypeFormatters.ToString(value, format)); - } - - public static void WriteStringValue(this Utf8JsonWriter writer, char value) - { - writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); - } - - public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - switch (format) - { - case "U": - writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); - break; - case "D": - writer.WriteBase64StringValue(value); - break; - default: - throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); - } - } - - public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) - { - if (format != "U") - { - throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); - } - writer.WriteNumberValue(value.ToUnixTimeSeconds()); - } - - public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) - { - switch (value) - { - case null: - writer.WriteNullValue(); - break; - case IJsonModel jsonModel: - jsonModel.Write(writer, options ?? WireOptions); - break; - case IUtf8JsonSerializable serializable: - serializable.Write(writer); - break; - case byte[] bytes: - writer.WriteBase64StringValue(bytes); - break; - case BinaryData bytes0: - writer.WriteBase64StringValue(bytes0); - break; - case JsonElement json: - json.WriteTo(writer); - break; - case int i: - writer.WriteNumberValue(i); - break; - case decimal d: - writer.WriteNumberValue(d); - break; - case double d0: - if (double.IsNaN(d0)) - { - writer.WriteStringValue("NaN"); - } - else - { - writer.WriteNumberValue(d0); - } - break; - case float f: - writer.WriteNumberValue(f); - break; - case long l: - writer.WriteNumberValue(l); - break; - case string s: - writer.WriteStringValue(s); - break; - case bool b: - writer.WriteBooleanValue(b); - break; - case Guid g: - writer.WriteStringValue(g); - break; - case DateTimeOffset dateTimeOffset: - writer.WriteStringValue(dateTimeOffset, "O"); - break; - case DateTime dateTime: - writer.WriteStringValue(dateTime, "O"); - break; - case IEnumerable> enumerable: - writer.WriteStartObject(); - foreach (var pair in enumerable) - { - writer.WritePropertyName(pair.Key); - writer.WriteObjectValue(pair.Value, options); - } - writer.WriteEndObject(); - break; - case IEnumerable objectEnumerable: - writer.WriteStartArray(); - foreach (var item in objectEnumerable) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - break; - case TimeSpan timeSpan: - writer.WriteStringValue(timeSpan, "P"); - break; - default: - throw new NotSupportedException($"Not supported type {value.GetType()}"); - } - } - - public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) - { - 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Optional.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Optional.cs deleted file mode 100644 index f7c7d4074242..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Optional.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal static class Optional - { - public static bool IsCollectionDefined(IEnumerable collection) - { - return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); - } - - public static bool IsCollectionDefined(IDictionary collection) - { - return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); - } - - public static bool IsCollectionDefined(IReadOnlyDictionary collection) - { - return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); - } - - public static bool IsDefined(T? value) - where T : struct - { - return value.HasValue; - } - - public static bool IsDefined(object value) - { - return value != null; - } - - public static bool IsDefined(JsonElement value) - { - return value.ValueKind != JsonValueKind.Undefined; - } - - public static bool IsDefined(string value) - { - return value != null; - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs deleted file mode 100644 index d878f34eaca0..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal class Utf8JsonRequestContent : RequestContent - { - private readonly MemoryStream _stream; - private readonly RequestContent _content; - - public Utf8JsonRequestContent() - { - _stream = new MemoryStream(); - _content = Create(_stream); - JsonWriter = new Utf8JsonWriter(_stream); - } - - public Utf8JsonWriter JsonWriter { get; } - - public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) - { - await JsonWriter.FlushAsync().ConfigureAwait(false); - await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); - } - - 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; - return true; - } - - public override void Dispose() - { - JsonWriter.Dispose(); - _content.Dispose(); - _stream.Dispose(); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingAccountOperationSource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingAccountOperationSource.cs deleted file mode 100644 index 15a13e5b8ce1..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingAccountOperationSource.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.PlaywrightTesting -{ - internal class PlaywrightTestingAccountOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal PlaywrightTestingAccountOperationSource(ArmClient client) - { - _client = client; - } - - PlaywrightTestingAccountResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPlaywrightTestingContext.Default); - return new PlaywrightTestingAccountResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPlaywrightTestingContext.Default); - return await Task.FromResult(new PlaywrightTestingAccountResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingArmOperation.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingArmOperation.cs deleted file mode 100644 index 8f1f55282a50..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingArmOperation.cs +++ /dev/null @@ -1,96 +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; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.PlaywrightTesting -{ -#pragma warning disable SA1649 // File name should match first type name - internal class PlaywrightTestingArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name - { - private readonly OperationInternal _operation; - private readonly RehydrationToken? _completeRehydrationToken; - private readonly NextLinkOperationImplementation _nextLinkOperation; - private readonly string _operationId; - - /// Initializes a new instance of PlaywrightTestingArmOperation for mocking. - protected PlaywrightTestingArmOperation() - { - } - - internal PlaywrightTestingArmOperation(Response response, RehydrationToken? rehydrationToken = null) - { - _operation = OperationInternal.Succeeded(response); - _completeRehydrationToken = rehydrationToken; - _operationId = GetOperationId(rehydrationToken); - } - - internal PlaywrightTestingArmOperation(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) - { - _nextLinkOperation = nextLinkOperationValue; - _operationId = _nextLinkOperation.OperationId; - } - else - { - _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); - _operationId = GetOperationId(_completeRehydrationToken); - } - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "PlaywrightTestingArmOperation", fallbackStrategy: new SequentialDelayStrategy()); - } - - private string GetOperationId(RehydrationToken? rehydrationToken) - { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerPlaywrightTestingContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); - } - /// - 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingArmOperationOfT.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingArmOperationOfT.cs deleted file mode 100644 index d592fc530911..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/LongRunningOperation/PlaywrightTestingArmOperationOfT.cs +++ /dev/null @@ -1,102 +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; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.PlaywrightTesting -{ -#pragma warning disable SA1649 // File name should match first type name - internal class PlaywrightTestingArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name - { - private readonly OperationInternal _operation; - private readonly RehydrationToken? _completeRehydrationToken; - private readonly NextLinkOperationImplementation _nextLinkOperation; - private readonly string _operationId; - - /// Initializes a new instance of PlaywrightTestingArmOperation for mocking. - protected PlaywrightTestingArmOperation() - { - } - - internal PlaywrightTestingArmOperation(Response response, RehydrationToken? rehydrationToken = null) - { - _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); - _completeRehydrationToken = rehydrationToken; - _operationId = GetOperationId(rehydrationToken); - } - - internal PlaywrightTestingArmOperation(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) - { - _nextLinkOperation = nextLinkOperationValue; - _operationId = _nextLinkOperation.OperationId; - } - else - { - _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); - _operationId = GetOperationId(_completeRehydrationToken); - } - _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "PlaywrightTestingArmOperation", fallbackStrategy: new SequentialDelayStrategy()); - } - - private string GetOperationId(RehydrationToken? rehydrationToken) - { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerPlaywrightTestingContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); - } - /// - public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - - /// - public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - - /// - public override T Value => _operation.Value; - - /// - public override bool HasValue => _operation.HasValue; - - /// - 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 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountListResult.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountListResult.Serialization.cs deleted file mode 100644 index e0141801e7a7..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountListResult.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.PlaywrightTesting.Models -{ - internal partial class AccountListResult : 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(AccountListResult)} 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 - } - } - } - - AccountListResult 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(AccountListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAccountListResult(document.RootElement, options); - } - - internal static AccountListResult DeserializeAccountListResult(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(PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(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 AccountListResult(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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(AccountListResult)} does not support writing '{options.Format}' format."); - } - } - - AccountListResult 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 DeserializeAccountListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AccountListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountListResult.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountListResult.cs deleted file mode 100644 index 01ffb6f8871b..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountListResult.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.PlaywrightTesting.Models -{ - /// The response of a Account list operation. - internal partial class AccountListResult - { - /// - /// 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 Account items on this page. - /// is null. - internal AccountListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The Account items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal AccountListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AccountListResult() - { - } - - /// The Account items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.Serialization.cs deleted file mode 100644 index 62f2bca06dac..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.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.PlaywrightTesting.Models -{ - internal partial class AccountQuotaListResult : 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(AccountQuotaListResult)} 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 - } - } - } - - AccountQuotaListResult 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(AccountQuotaListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAccountQuotaListResult(document.RootElement, options); - } - - internal static AccountQuotaListResult DeserializeAccountQuotaListResult(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(PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(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 AccountQuotaListResult(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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(AccountQuotaListResult)} does not support writing '{options.Format}' format."); - } - } - - AccountQuotaListResult 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 DeserializeAccountQuotaListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AccountQuotaListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.cs deleted file mode 100644 index 8c0efeb7c87e..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.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.PlaywrightTesting.Models -{ - /// The response of a AccountQuota list operation. - internal partial class AccountQuotaListResult - { - /// - /// 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 AccountQuota items on this page. - /// is null. - internal AccountQuotaListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The AccountQuota items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal AccountQuotaListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AccountQuotaListResult() - { - } - - /// The AccountQuota items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.Serialization.cs deleted file mode 100644 index f1eaa1c6c8bc..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.Serialization.cs +++ /dev/null @@ -1,178 +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.PlaywrightTesting.Models -{ - public partial class AccountUpdateProperties : 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(AccountUpdateProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(RegionalAffinity)) - { - writer.WritePropertyName("regionalAffinity"u8); - writer.WriteStringValue(RegionalAffinity.Value.ToString()); - } - if (Optional.IsDefined(ScalableExecution)) - { - writer.WritePropertyName("scalableExecution"u8); - writer.WriteStringValue(ScalableExecution.Value.ToString()); - } - if (Optional.IsDefined(Reporting)) - { - writer.WritePropertyName("reporting"u8); - writer.WriteStringValue(Reporting.Value.ToString()); - } - if (Optional.IsDefined(LocalAuth)) - { - writer.WritePropertyName("localAuth"u8); - writer.WriteStringValue(LocalAuth.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 - } - } - } - - AccountUpdateProperties 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(AccountUpdateProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAccountUpdateProperties(document.RootElement, options); - } - - internal static AccountUpdateProperties DeserializeAccountUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PlaywrightTestingEnablementStatus? regionalAffinity = default; - PlaywrightTestingEnablementStatus? scalableExecution = default; - PlaywrightTestingEnablementStatus? reporting = default; - PlaywrightTestingEnablementStatus? localAuth = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("regionalAffinity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - regionalAffinity = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("scalableExecution"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scalableExecution = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("reporting"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reporting = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("localAuth"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - localAuth = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AccountUpdateProperties(regionalAffinity, scalableExecution, reporting, localAuth, 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(AccountUpdateProperties)} does not support writing '{options.Format}' format."); - } - } - - AccountUpdateProperties 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 DeserializeAccountUpdateProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AccountUpdateProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.cs deleted file mode 100644 index 8b2a1993cff1..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.cs +++ /dev/null @@ -1,77 +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.PlaywrightTesting.Models -{ - /// The updatable properties of the Account. - public partial class AccountUpdateProperties - { - /// - /// 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 AccountUpdateProperties() - { - } - - /// Initializes a new instance of . - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. - /// Keeps track of any properties unknown to the library. - internal AccountUpdateProperties(PlaywrightTestingEnablementStatus? regionalAffinity, PlaywrightTestingEnablementStatus? scalableExecution, PlaywrightTestingEnablementStatus? reporting, PlaywrightTestingEnablementStatus? localAuth, IDictionary serializedAdditionalRawData) - { - RegionalAffinity = regionalAffinity; - ScalableExecution = scalableExecution; - Reporting = reporting; - LocalAuth = localAuth; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - public PlaywrightTestingEnablementStatus? RegionalAffinity { get; set; } - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - public PlaywrightTestingEnablementStatus? ScalableExecution { get; set; } - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - public PlaywrightTestingEnablementStatus? Reporting { get; set; } - /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. - public PlaywrightTestingEnablementStatus? LocalAuth { get; set; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AzureResourceManagerPlaywrightTestingContext.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AzureResourceManagerPlaywrightTestingContext.cs deleted file mode 100644 index 89f818d17388..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AzureResourceManagerPlaywrightTestingContext.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// 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' - /// - [ModelReaderWriterBuildable(typeof(AccountListResult))] - [ModelReaderWriterBuildable(typeof(AccountQuotaListResult))] - [ModelReaderWriterBuildable(typeof(AccountUpdateProperties))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountData))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountFreeTrialProperties))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountPatch))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountProperties))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountQuotaData))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountQuotaProperties))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountQuotaResource))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingAccountResource))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingFreeTrialProperties))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingNameAvailabilityContent))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingNameAvailabilityResult))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingQuotaData))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingQuotaProperties))] - [ModelReaderWriterBuildable(typeof(PlaywrightTestingQuotaResource))] - [ModelReaderWriterBuildable(typeof(QuotaListResult))] - [ModelReaderWriterBuildable(typeof(ResponseError))] - [ModelReaderWriterBuildable(typeof(SystemData))] - public partial class AzureResourceManagerPlaywrightTestingContext : ModelReaderWriterContext - { - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.Serialization.cs deleted file mode 100644 index 552844647808..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.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.Json; -using Azure.Core; - -namespace Azure.ResourceManager.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingAccountFreeTrialProperties : 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(PlaywrightTestingAccountFreeTrialProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W") - { - writer.WritePropertyName("createdAt"u8); - writer.WriteStringValue(CreatedOn, "O"); - } - if (options.Format != "W") - { - writer.WritePropertyName("expiryAt"u8); - writer.WriteStringValue(ExpiryOn, "O"); - } - if (options.Format != "W") - { - writer.WritePropertyName("allocatedValue"u8); - writer.WriteNumberValue(AllocatedValue); - } - if (options.Format != "W") - { - writer.WritePropertyName("usedValue"u8); - writer.WriteNumberValue(UsedValue); - } - if (options.Format != "W") - { - writer.WritePropertyName("percentageUsed"u8); - writer.WriteNumberValue(PercentageUsed); - } - 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 - } - } - } - - PlaywrightTestingAccountFreeTrialProperties 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(PlaywrightTestingAccountFreeTrialProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingAccountFreeTrialProperties(document.RootElement, options); - } - - internal static PlaywrightTestingAccountFreeTrialProperties DeserializePlaywrightTestingAccountFreeTrialProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DateTimeOffset createdAt = default; - DateTimeOffset expiryAt = default; - int allocatedValue = default; - int usedValue = default; - float percentageUsed = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("createdAt"u8)) - { - createdAt = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("expiryAt"u8)) - { - expiryAt = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("allocatedValue"u8)) - { - allocatedValue = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("usedValue"u8)) - { - usedValue = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("percentageUsed"u8)) - { - percentageUsed = property.Value.GetSingle(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountFreeTrialProperties( - createdAt, - expiryAt, - allocatedValue, - usedValue, - percentageUsed, - 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountFreeTrialProperties)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingAccountFreeTrialProperties 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 DeserializePlaywrightTestingAccountFreeTrialProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountFreeTrialProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.cs deleted file mode 100644 index 86f31d0312b2..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.cs +++ /dev/null @@ -1,96 +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.PlaywrightTesting.Models -{ - /// The Playwright service account quota resource free-trial properties. - public partial class PlaywrightTestingAccountFreeTrialProperties - { - /// - /// 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 free-trial createdAt utcDateTime. - /// The free-trial expiryAt utcDateTime. - /// The free-trial allocated limit value eg. allocated free minutes. - /// The free-trial used value eg. used free minutes. - /// The free-trial percentage used. - internal PlaywrightTestingAccountFreeTrialProperties(DateTimeOffset createdOn, DateTimeOffset expiryOn, int allocatedValue, int usedValue, float percentageUsed) - { - CreatedOn = createdOn; - ExpiryOn = expiryOn; - AllocatedValue = allocatedValue; - UsedValue = usedValue; - PercentageUsed = percentageUsed; - } - - /// Initializes a new instance of . - /// The free-trial createdAt utcDateTime. - /// The free-trial expiryAt utcDateTime. - /// The free-trial allocated limit value eg. allocated free minutes. - /// The free-trial used value eg. used free minutes. - /// The free-trial percentage used. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingAccountFreeTrialProperties(DateTimeOffset createdOn, DateTimeOffset expiryOn, int allocatedValue, int usedValue, float percentageUsed, IDictionary serializedAdditionalRawData) - { - CreatedOn = createdOn; - ExpiryOn = expiryOn; - AllocatedValue = allocatedValue; - UsedValue = usedValue; - PercentageUsed = percentageUsed; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PlaywrightTestingAccountFreeTrialProperties() - { - } - - /// The free-trial createdAt utcDateTime. - public DateTimeOffset CreatedOn { get; } - /// The free-trial expiryAt utcDateTime. - public DateTimeOffset ExpiryOn { get; } - /// The free-trial allocated limit value eg. allocated free minutes. - public int AllocatedValue { get; } - /// The free-trial used value eg. used free minutes. - public int UsedValue { get; } - /// The free-trial percentage used. - public float PercentageUsed { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.Serialization.cs deleted file mode 100644 index ec1dbb40d18f..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingAccountPatch : 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(PlaywrightTestingAccountPatch)} does not support writing '{format}' format."); - } - - 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 (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, 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 - } - } - } - - PlaywrightTestingAccountPatch 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(PlaywrightTestingAccountPatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingAccountPatch(document.RootElement, options); - } - - internal static PlaywrightTestingAccountPatch DeserializePlaywrightTestingAccountPatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary tags = default; - AccountUpdateProperties properties = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = AccountUpdateProperties.DeserializeAccountUpdateProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountPatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountPatch)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingAccountPatch 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 DeserializePlaywrightTestingAccountPatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountPatch)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.cs deleted file mode 100644 index 50d60ecf3d4b..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.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.PlaywrightTesting.Models -{ - /// The type used for update operations of the Account. - public partial class PlaywrightTestingAccountPatch - { - /// - /// 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 PlaywrightTestingAccountPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// Resource tags. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingAccountPatch(IDictionary tags, AccountUpdateProperties properties, IDictionary serializedAdditionalRawData) - { - Tags = tags; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Resource tags. - public IDictionary Tags { get; } - /// The resource-specific properties for this resource. - public AccountUpdateProperties Properties { get; set; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs deleted file mode 100644 index 2fa960c2d7c3..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs +++ /dev/null @@ -1,215 +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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingAccountProperties : 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(PlaywrightTestingAccountProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(DashboardUri)) - { - writer.WritePropertyName("dashboardUri"u8); - writer.WriteStringValue(DashboardUri.AbsoluteUri); - } - if (Optional.IsDefined(RegionalAffinity)) - { - writer.WritePropertyName("regionalAffinity"u8); - writer.WriteStringValue(RegionalAffinity.Value.ToString()); - } - if (Optional.IsDefined(ScalableExecution)) - { - writer.WritePropertyName("scalableExecution"u8); - writer.WriteStringValue(ScalableExecution.Value.ToString()); - } - if (Optional.IsDefined(Reporting)) - { - writer.WritePropertyName("reporting"u8); - writer.WriteStringValue(Reporting.Value.ToString()); - } - if (Optional.IsDefined(LocalAuth)) - { - writer.WritePropertyName("localAuth"u8); - writer.WriteStringValue(LocalAuth.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.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 - } - } - } - - PlaywrightTestingAccountProperties 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(PlaywrightTestingAccountProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingAccountProperties(document.RootElement, options); - } - - internal static PlaywrightTestingAccountProperties DeserializePlaywrightTestingAccountProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri dashboardUri = default; - PlaywrightTestingEnablementStatus? regionalAffinity = default; - PlaywrightTestingEnablementStatus? scalableExecution = default; - PlaywrightTestingEnablementStatus? reporting = default; - PlaywrightTestingEnablementStatus? localAuth = default; - PlaywrightTestingProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dashboardUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dashboardUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("regionalAffinity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - regionalAffinity = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("scalableExecution"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scalableExecution = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("reporting"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reporting = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("localAuth"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - localAuth = new PlaywrightTestingEnablementStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new PlaywrightTestingProvisioningState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountProperties( - dashboardUri, - regionalAffinity, - scalableExecution, - reporting, - localAuth, - provisioningState, - 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountProperties)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingAccountProperties 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 DeserializePlaywrightTestingAccountProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.cs deleted file mode 100644 index fdb13a694dff..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.cs +++ /dev/null @@ -1,85 +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.PlaywrightTesting.Models -{ - /// Account resource properties. - public partial class PlaywrightTestingAccountProperties - { - /// - /// 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 PlaywrightTestingAccountProperties() - { - } - - /// Initializes a new instance of . - /// The Playwright testing dashboard URI for the account resource. - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. - /// The status of the last operation. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingAccountProperties(Uri dashboardUri, PlaywrightTestingEnablementStatus? regionalAffinity, PlaywrightTestingEnablementStatus? scalableExecution, PlaywrightTestingEnablementStatus? reporting, PlaywrightTestingEnablementStatus? localAuth, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) - { - DashboardUri = dashboardUri; - RegionalAffinity = regionalAffinity; - ScalableExecution = scalableExecution; - Reporting = reporting; - LocalAuth = localAuth; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The Playwright testing dashboard URI for the account resource. - public Uri DashboardUri { get; } - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - public PlaywrightTestingEnablementStatus? RegionalAffinity { get; set; } - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - public PlaywrightTestingEnablementStatus? ScalableExecution { get; set; } - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - public PlaywrightTestingEnablementStatus? Reporting { get; set; } - /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. - public PlaywrightTestingEnablementStatus? LocalAuth { get; set; } - /// The status of the last operation. - public PlaywrightTestingProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.Serialization.cs deleted file mode 100644 index 4da6151e2f91..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingAccountQuotaProperties : 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(PlaywrightTestingAccountQuotaProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FreeTrial)) - { - writer.WritePropertyName("freeTrial"u8); - writer.WriteObjectValue(FreeTrial, options); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.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 - } - } - } - - PlaywrightTestingAccountQuotaProperties 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(PlaywrightTestingAccountQuotaProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingAccountQuotaProperties(document.RootElement, options); - } - - internal static PlaywrightTestingAccountQuotaProperties DeserializePlaywrightTestingAccountQuotaProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PlaywrightTestingAccountFreeTrialProperties freeTrial = default; - PlaywrightTestingProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("freeTrial"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - freeTrial = PlaywrightTestingAccountFreeTrialProperties.DeserializePlaywrightTestingAccountFreeTrialProperties(property.Value, options); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new PlaywrightTestingProvisioningState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountQuotaProperties(freeTrial, provisioningState, 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountQuotaProperties)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingAccountQuotaProperties 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 DeserializePlaywrightTestingAccountQuotaProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountQuotaProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.cs deleted file mode 100644 index 2b878b0053c4..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.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.PlaywrightTesting.Models -{ - /// The Playwright service account quota resource properties. - public partial class PlaywrightTestingAccountQuotaProperties - { - /// - /// 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 . - internal PlaywrightTestingAccountQuotaProperties() - { - } - - /// Initializes a new instance of . - /// The Playwright service account quota resource free-trial properties. - /// The status of the last operation. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingAccountQuotaProperties(PlaywrightTestingAccountFreeTrialProperties freeTrial, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) - { - FreeTrial = freeTrial; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The Playwright service account quota resource free-trial properties. - public PlaywrightTestingAccountFreeTrialProperties FreeTrial { get; } - /// The status of the last operation. - public PlaywrightTestingProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.cs deleted file mode 100644 index e64fdbd20d67..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.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.PlaywrightTesting.Models -{ - /// The enablement status of a feature. - public readonly partial struct PlaywrightTestingEnablementStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PlaywrightTestingEnablementStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// The feature is Enabled. - public static PlaywrightTestingEnablementStatus Enabled { get; } = new PlaywrightTestingEnablementStatus(EnabledValue); - /// The feature is Disabled. - public static PlaywrightTestingEnablementStatus Disabled { get; } = new PlaywrightTestingEnablementStatus(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(PlaywrightTestingEnablementStatus left, PlaywrightTestingEnablementStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PlaywrightTestingEnablementStatus left, PlaywrightTestingEnablementStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PlaywrightTestingEnablementStatus(string value) => new PlaywrightTestingEnablementStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PlaywrightTestingEnablementStatus other && Equals(other); - /// - public bool Equals(PlaywrightTestingEnablementStatus 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.Serialization.cs deleted file mode 100644 index 5141aca8763f..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.Serialization.cs +++ /dev/null @@ -1,140 +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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingFreeTrialProperties : 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(PlaywrightTestingFreeTrialProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W") - { - writer.WritePropertyName("accountId"u8); - writer.WriteStringValue(AccountId); - } - if (options.Format != "W") - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.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 - } - } - } - - PlaywrightTestingFreeTrialProperties 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(PlaywrightTestingFreeTrialProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingFreeTrialProperties(document.RootElement, options); - } - - internal static PlaywrightTestingFreeTrialProperties DeserializePlaywrightTestingFreeTrialProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string accountId = default; - PlaywrightTestingFreeTrialState state = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accountId"u8)) - { - accountId = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = new PlaywrightTestingFreeTrialState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingFreeTrialProperties(accountId, state, 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingFreeTrialProperties)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingFreeTrialProperties 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 DeserializePlaywrightTestingFreeTrialProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingFreeTrialProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.cs deleted file mode 100644 index 1ab4dc9bc3a3..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.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.PlaywrightTesting.Models -{ - /// The subscription quota resource free-trial properties. - public partial class PlaywrightTestingFreeTrialProperties - { - /// - /// 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 Playwright service account id. - /// The free-trial state. - internal PlaywrightTestingFreeTrialProperties(string accountId, PlaywrightTestingFreeTrialState state) - { - AccountId = accountId; - State = state; - } - - /// Initializes a new instance of . - /// The Playwright service account id. - /// The free-trial state. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingFreeTrialProperties(string accountId, PlaywrightTestingFreeTrialState state, IDictionary serializedAdditionalRawData) - { - AccountId = accountId; - State = state; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PlaywrightTestingFreeTrialProperties() - { - } - - /// The Playwright service account id. - public string AccountId { get; } - /// The free-trial state. - public PlaywrightTestingFreeTrialState State { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.cs deleted file mode 100644 index 237ecd45f2bc..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.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.PlaywrightTesting.Models -{ - /// The free-trial state. - public readonly partial struct PlaywrightTestingFreeTrialState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PlaywrightTestingFreeTrialState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveValue = "Active"; - private const string ExpiredValue = "Expired"; - private const string NotEligibleValue = "NotEligible"; - private const string NotRegisteredValue = "NotRegistered"; - - /// The free-trial is Active. - public static PlaywrightTestingFreeTrialState Active { get; } = new PlaywrightTestingFreeTrialState(ActiveValue); - /// The free-trial is Expired. - public static PlaywrightTestingFreeTrialState Expired { get; } = new PlaywrightTestingFreeTrialState(ExpiredValue); - /// The free-trial is Not Eligible. - public static PlaywrightTestingFreeTrialState NotEligible { get; } = new PlaywrightTestingFreeTrialState(NotEligibleValue); - /// The free-trial is Not Registered. - public static PlaywrightTestingFreeTrialState NotRegistered { get; } = new PlaywrightTestingFreeTrialState(NotRegisteredValue); - /// Determines if two values are the same. - public static bool operator ==(PlaywrightTestingFreeTrialState left, PlaywrightTestingFreeTrialState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PlaywrightTestingFreeTrialState left, PlaywrightTestingFreeTrialState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PlaywrightTestingFreeTrialState(string value) => new PlaywrightTestingFreeTrialState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PlaywrightTestingFreeTrialState other && Equals(other); - /// - public bool Equals(PlaywrightTestingFreeTrialState 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.Serialization.cs deleted file mode 100644 index 65cc6dd1f50d..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.Serialization.cs +++ /dev/null @@ -1,140 +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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingNameAvailabilityContent : 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(PlaywrightTestingNameAvailabilityContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - 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 - } - } - } - - PlaywrightTestingNameAvailabilityContent 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(PlaywrightTestingNameAvailabilityContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingNameAvailabilityContent(document.RootElement, options); - } - - internal static PlaywrightTestingNameAvailabilityContent DeserializePlaywrightTestingNameAvailabilityContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string type = 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("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingNameAvailabilityContent(name, type, 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingNameAvailabilityContent)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingNameAvailabilityContent 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 DeserializePlaywrightTestingNameAvailabilityContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingNameAvailabilityContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.cs deleted file mode 100644 index ef3463181fe1..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.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.PlaywrightTesting.Models -{ - /// The check availability request body. - public partial class PlaywrightTestingNameAvailabilityContent - { - /// - /// 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 PlaywrightTestingNameAvailabilityContent() - { - } - - /// Initializes a new instance of . - /// The name of the resource for which availability needs to be checked. - /// The resource type. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingNameAvailabilityContent(string name, string type, IDictionary serializedAdditionalRawData) - { - Name = name; - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the resource for which availability needs to be checked. - public string Name { get; set; } - /// The resource type. - public string Type { get; set; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.Serialization.cs deleted file mode 100644 index b751cf5f08aa..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingNameAvailabilityResult : 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(PlaywrightTestingNameAvailabilityResult)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(IsNameAvailable)) - { - writer.WritePropertyName("nameAvailable"u8); - writer.WriteBooleanValue(IsNameAvailable.Value); - } - if (Optional.IsDefined(Reason)) - { - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.Value.ToString()); - } - if (Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - 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 - } - } - } - - PlaywrightTestingNameAvailabilityResult 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(PlaywrightTestingNameAvailabilityResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement, options); - } - - internal static PlaywrightTestingNameAvailabilityResult DeserializePlaywrightTestingNameAvailabilityResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? nameAvailable = default; - PlaywrightTestingNameUnavailableReason? reason = default; - string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nameAvailable"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nameAvailable = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("reason"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reason = new PlaywrightTestingNameUnavailableReason(property.Value.GetString()); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingNameAvailabilityResult(nameAvailable, reason, message, 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingNameAvailabilityResult)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingNameAvailabilityResult 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 DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingNameAvailabilityResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.cs deleted file mode 100644 index 8e825a386490..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.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.PlaywrightTesting.Models -{ - /// The check availability result. - public partial class PlaywrightTestingNameAvailabilityResult - { - /// - /// 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 . - internal PlaywrightTestingNameAvailabilityResult() - { - } - - /// Initializes a new instance of . - /// Indicates if the resource name is available. - /// The reason why the given name is not available. - /// Detailed reason why the given name is not available. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable, PlaywrightTestingNameUnavailableReason? reason, string message, IDictionary serializedAdditionalRawData) - { - IsNameAvailable = isNameAvailable; - Reason = reason; - Message = message; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Indicates if the resource name is available. - public bool? IsNameAvailable { get; } - /// The reason why the given name is not available. - public PlaywrightTestingNameUnavailableReason? Reason { get; } - /// Detailed reason why the given name is not available. - public string Message { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.cs deleted file mode 100644 index 26b72b8497cb..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.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.PlaywrightTesting.Models -{ - /// Possible reasons for a name not being available. - public readonly partial struct PlaywrightTestingNameUnavailableReason : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PlaywrightTestingNameUnavailableReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InvalidValue = "Invalid"; - private const string AlreadyExistsValue = "AlreadyExists"; - - /// Name is invalid. - public static PlaywrightTestingNameUnavailableReason Invalid { get; } = new PlaywrightTestingNameUnavailableReason(InvalidValue); - /// Name already exists. - public static PlaywrightTestingNameUnavailableReason AlreadyExists { get; } = new PlaywrightTestingNameUnavailableReason(AlreadyExistsValue); - /// Determines if two values are the same. - public static bool operator ==(PlaywrightTestingNameUnavailableReason left, PlaywrightTestingNameUnavailableReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PlaywrightTestingNameUnavailableReason left, PlaywrightTestingNameUnavailableReason right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PlaywrightTestingNameUnavailableReason(string value) => new PlaywrightTestingNameUnavailableReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PlaywrightTestingNameUnavailableReason other && Equals(other); - /// - public bool Equals(PlaywrightTestingNameUnavailableReason 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.cs deleted file mode 100644 index fa2c55e8dcec..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.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.PlaywrightTesting.Models -{ - /// Offering type state. - public readonly partial struct PlaywrightTestingOfferingType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PlaywrightTestingOfferingType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotApplicableValue = "NotApplicable"; - private const string PrivatePreviewValue = "PrivatePreview"; - private const string PublicPreviewValue = "PublicPreview"; - private const string GeneralAvailabilityValue = "GeneralAvailability"; - - /// The offeringType is NotApplicable. - public static PlaywrightTestingOfferingType NotApplicable { get; } = new PlaywrightTestingOfferingType(NotApplicableValue); - /// The offeringType is PrivatePreview. - public static PlaywrightTestingOfferingType PrivatePreview { get; } = new PlaywrightTestingOfferingType(PrivatePreviewValue); - /// The offeringType is PublicPreview. - public static PlaywrightTestingOfferingType PublicPreview { get; } = new PlaywrightTestingOfferingType(PublicPreviewValue); - /// The offeringType is GeneralAvailability. - public static PlaywrightTestingOfferingType GeneralAvailability { get; } = new PlaywrightTestingOfferingType(GeneralAvailabilityValue); - /// Determines if two values are the same. - public static bool operator ==(PlaywrightTestingOfferingType left, PlaywrightTestingOfferingType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PlaywrightTestingOfferingType left, PlaywrightTestingOfferingType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PlaywrightTestingOfferingType(string value) => new PlaywrightTestingOfferingType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PlaywrightTestingOfferingType other && Equals(other); - /// - public bool Equals(PlaywrightTestingOfferingType 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs deleted file mode 100644 index ef32459a5c55..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.PlaywrightTesting.Models -{ - /// The status of the current operation. - public readonly partial struct PlaywrightTestingProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PlaywrightTestingProvisioningState(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 CreatingValue = "Creating"; - private const string DeletingValue = "Deleting"; - private const string AcceptedValue = "Accepted"; - - /// Resource has been created. - public static PlaywrightTestingProvisioningState Succeeded { get; } = new PlaywrightTestingProvisioningState(SucceededValue); - /// Resource creation failed. - public static PlaywrightTestingProvisioningState Failed { get; } = new PlaywrightTestingProvisioningState(FailedValue); - /// Resource creation was canceled. - public static PlaywrightTestingProvisioningState Canceled { get; } = new PlaywrightTestingProvisioningState(CanceledValue); - /// Creation in progress.. - public static PlaywrightTestingProvisioningState Creating { get; } = new PlaywrightTestingProvisioningState(CreatingValue); - /// Deletion in progress.. - public static PlaywrightTestingProvisioningState Deleting { get; } = new PlaywrightTestingProvisioningState(DeletingValue); - /// Change accepted for processing.. - public static PlaywrightTestingProvisioningState Accepted { get; } = new PlaywrightTestingProvisioningState(AcceptedValue); - /// Determines if two values are the same. - public static bool operator ==(PlaywrightTestingProvisioningState left, PlaywrightTestingProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PlaywrightTestingProvisioningState left, PlaywrightTestingProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PlaywrightTestingProvisioningState(string value) => new PlaywrightTestingProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PlaywrightTestingProvisioningState other && Equals(other); - /// - public bool Equals(PlaywrightTestingProvisioningState 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.cs deleted file mode 100644 index 6c80598cdb8a..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.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.PlaywrightTesting.Models -{ - /// The enum for quota name. - public readonly partial struct PlaywrightTestingQuotaName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PlaywrightTestingQuotaName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ScalableExecutionValue = "ScalableExecution"; - private const string ReportingValue = "Reporting"; - - /// The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - public static PlaywrightTestingQuotaName ScalableExecution { get; } = new PlaywrightTestingQuotaName(ScalableExecutionValue); - /// The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - public static PlaywrightTestingQuotaName Reporting { get; } = new PlaywrightTestingQuotaName(ReportingValue); - /// Determines if two values are the same. - public static bool operator ==(PlaywrightTestingQuotaName left, PlaywrightTestingQuotaName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PlaywrightTestingQuotaName left, PlaywrightTestingQuotaName right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PlaywrightTestingQuotaName(string value) => new PlaywrightTestingQuotaName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PlaywrightTestingQuotaName other && Equals(other); - /// - public bool Equals(PlaywrightTestingQuotaName 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.Serialization.cs deleted file mode 100644 index 6b2619e9b5f5..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.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.PlaywrightTesting.Models -{ - public partial class PlaywrightTestingQuotaProperties : 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(PlaywrightTestingQuotaProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FreeTrial)) - { - writer.WritePropertyName("freeTrial"u8); - writer.WriteObjectValue(FreeTrial, options); - } - if (options.Format != "W" && Optional.IsDefined(OfferingType)) - { - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.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 - } - } - } - - PlaywrightTestingQuotaProperties 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(PlaywrightTestingQuotaProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingQuotaProperties(document.RootElement, options); - } - - internal static PlaywrightTestingQuotaProperties DeserializePlaywrightTestingQuotaProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PlaywrightTestingFreeTrialProperties freeTrial = default; - PlaywrightTestingOfferingType? offeringType = default; - PlaywrightTestingProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("freeTrial"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - freeTrial = PlaywrightTestingFreeTrialProperties.DeserializePlaywrightTestingFreeTrialProperties(property.Value, options); - continue; - } - if (property.NameEquals("offeringType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - offeringType = new PlaywrightTestingOfferingType(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new PlaywrightTestingProvisioningState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingQuotaProperties(freeTrial, offeringType, provisioningState, 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingQuotaProperties)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingQuotaProperties 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 DeserializePlaywrightTestingQuotaProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingQuotaProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.cs deleted file mode 100644 index 79c32aa77660..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.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.PlaywrightTesting.Models -{ - /// The subscription quota resource properties. - public partial class PlaywrightTestingQuotaProperties - { - /// - /// 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 . - internal PlaywrightTestingQuotaProperties() - { - } - - /// Initializes a new instance of . - /// The subscription quota resource free-trial properties. - /// Indicates the offering type for the subscription. - /// The status of the last operation. - /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingQuotaProperties(PlaywrightTestingFreeTrialProperties freeTrial, PlaywrightTestingOfferingType? offeringType, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) - { - FreeTrial = freeTrial; - OfferingType = offeringType; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The subscription quota resource free-trial properties. - public PlaywrightTestingFreeTrialProperties FreeTrial { get; } - /// Indicates the offering type for the subscription. - public PlaywrightTestingOfferingType? OfferingType { get; } - /// The status of the last operation. - public PlaywrightTestingProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/QuotaListResult.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/QuotaListResult.Serialization.cs deleted file mode 100644 index 3af7e1250998..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/QuotaListResult.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.PlaywrightTesting.Models -{ - internal partial class QuotaListResult : 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(QuotaListResult)} 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 - } - } - } - - QuotaListResult 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(QuotaListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeQuotaListResult(document.RootElement, options); - } - - internal static QuotaListResult DeserializeQuotaListResult(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(PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(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 QuotaListResult(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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(QuotaListResult)} does not support writing '{options.Format}' format."); - } - } - - QuotaListResult 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 DeserializeQuotaListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(QuotaListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/QuotaListResult.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/QuotaListResult.cs deleted file mode 100644 index 3474e21ef4f0..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/QuotaListResult.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.PlaywrightTesting.Models -{ - /// The response of a Quota list operation. - internal partial class QuotaListResult - { - /// - /// 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 Quota items on this page. - /// is null. - internal QuotaListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The Quota items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal QuotaListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal QuotaListResult() - { - } - - /// The Quota items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.cs deleted file mode 100644 index 0f30335e26c2..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.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.PlaywrightTesting -{ - /// - /// 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 GetPlaywrightTestingAccounts method from an instance of . - /// - public partial class PlaywrightTestingAccountCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _playwrightTestingAccountAccountsClientDiagnostics; - private readonly AccountsRestOperations _playwrightTestingAccountAccountsRestClient; - - /// Initializes a new instance of the class for mocking. - protected PlaywrightTestingAccountCollection() - { - } - - /// 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 PlaywrightTestingAccountCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _playwrightTestingAccountAccountsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", PlaywrightTestingAccountResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(PlaywrightTestingAccountResource.ResourceType, out string playwrightTestingAccountAccountsApiVersion); - _playwrightTestingAccountAccountsRestClient = new AccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingAccountAccountsApiVersion); -#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 a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-12-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. - /// Name of account. - /// 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 accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, data, cancellationToken).ConfigureAwait(false); - var operation = new PlaywrightTestingArmOperation(new PlaywrightTestingAccountOperationSource(Client), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, accountName, 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 a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-12-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. - /// Name of account. - /// 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 accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, accountName, data, cancellationToken); - var operation = new PlaywrightTestingArmOperation(new PlaywrightTestingAccountOperationSource(Client), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, accountName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Get"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Get"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List Account resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts - /// - /// - /// Operation Id - /// Account_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-12-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) => _playwrightTestingAccountAccountsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingAccountAccountsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountResource(Client, PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(e)), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, "PlaywrightTestingAccountCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List Account resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts - /// - /// - /// Operation Id - /// Account_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-12-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) => _playwrightTestingAccountAccountsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingAccountAccountsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountResource(Client, PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(e)), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, "PlaywrightTestingAccountCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Exists"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, 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.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Exists"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, 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.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountResource(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.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of account. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.GetIfExists"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountResource(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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.Serialization.cs deleted file mode 100644 index 91b55ab3115e..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.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.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - public partial class PlaywrightTestingAccountData : 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(PlaywrightTestingAccountData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - PlaywrightTestingAccountData 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(PlaywrightTestingAccountData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingAccountData(document.RootElement, options); - } - - internal static PlaywrightTestingAccountData DeserializePlaywrightTestingAccountData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PlaywrightTestingAccountProperties 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 = PlaywrightTestingAccountProperties.DeserializePlaywrightTestingAccountProperties(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, AzureResourceManagerPlaywrightTestingContext.Default); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountData( - 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountData)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingAccountData 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 DeserializePlaywrightTestingAccountData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.cs deleted file mode 100644 index 599008a12c6a..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.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.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// A class representing the PlaywrightTestingAccount data model. - /// A Playwright service account resource. - /// - public partial class PlaywrightTestingAccountData : 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 PlaywrightTestingAccountData(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 PlaywrightTestingAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PlaywrightTestingAccountProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PlaywrightTestingAccountData() - { - } - - /// The resource-specific properties for this resource. - public PlaywrightTestingAccountProperties Properties { get; set; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs deleted file mode 100644 index 2f561bc56cbd..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs +++ /dev/null @@ -1,372 +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.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// 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 GetPlaywrightTestingAccountQuotas method from an instance of . - /// - public partial class PlaywrightTestingAccountQuotaCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics; - private readonly AccountQuotasRestOperations _playwrightTestingAccountQuotaAccountQuotasRestClient; - - /// Initializes a new instance of the class for mocking. - protected PlaywrightTestingAccountQuotaCollection() - { - } - - /// 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 PlaywrightTestingAccountQuotaCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", PlaywrightTestingAccountQuotaResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(PlaywrightTestingAccountQuotaResource.ResourceType, out string playwrightTestingAccountQuotaAccountQuotasApiVersion); - _playwrightTestingAccountQuotaAccountQuotasRestClient = new AccountQuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingAccountQuotaAccountQuotasApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != PlaywrightTestingAccountResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PlaywrightTestingAccountResource.ResourceType), nameof(id)); - } - - /// - /// Get quota by name for an account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - public virtual async Task> GetAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Get"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get quota by name for an account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - public virtual Response Get(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Get"); - scope.Start(); - try - { - var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List quotas for a given account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas - /// - /// - /// Operation Id - /// AccountQuota_ListByAccount - /// - /// - /// Default Api Version - /// 2024-12-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) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountQuotaResource(Client, PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(e)), _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics, Pipeline, "PlaywrightTestingAccountQuotaCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List quotas for a given account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas - /// - /// - /// Operation Id - /// AccountQuota_ListByAccount - /// - /// - /// Default Api Version - /// 2024-12-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) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountQuotaResource(Client, PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(e)), _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics, Pipeline, "PlaywrightTestingAccountQuotaCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Exists"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, 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.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - public virtual Response Exists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Exists"); - scope.Start(); - try - { - var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, 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.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - public virtual async Task> GetIfExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountQuotaResource(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.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - public virtual NullableResponse GetIfExists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.GetIfExists"); - scope.Start(); - try - { - var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountQuotaResource(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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.Serialization.cs deleted file mode 100644 index 728f8d366813..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.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.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - public partial class PlaywrightTestingAccountQuotaData : 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(PlaywrightTestingAccountQuotaData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - PlaywrightTestingAccountQuotaData 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(PlaywrightTestingAccountQuotaData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingAccountQuotaData(document.RootElement, options); - } - - internal static PlaywrightTestingAccountQuotaData DeserializePlaywrightTestingAccountQuotaData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PlaywrightTestingAccountQuotaProperties 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 = PlaywrightTestingAccountQuotaProperties.DeserializePlaywrightTestingAccountQuotaProperties(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, AzureResourceManagerPlaywrightTestingContext.Default); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountQuotaData( - 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountQuotaData)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingAccountQuotaData 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 DeserializePlaywrightTestingAccountQuotaData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingAccountQuotaData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.cs deleted file mode 100644 index 2c978269e3d3..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.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.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// A class representing the PlaywrightTestingAccountQuota data model. - /// A quota resource for a Playwright service account. - /// - public partial class PlaywrightTestingAccountQuotaData : 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 . - internal PlaywrightTestingAccountQuotaData() - { - } - - /// 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 PlaywrightTestingAccountQuotaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PlaywrightTestingAccountQuotaProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public PlaywrightTestingAccountQuotaProperties Properties { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs deleted file mode 100644 index f3dd2e68d147..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.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.PlaywrightTesting -{ - public partial class PlaywrightTestingAccountQuotaResource : IJsonModel - { - private static PlaywrightTestingAccountQuotaData s_dataDeserializationInstance; - private static PlaywrightTestingAccountQuotaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - PlaywrightTestingAccountQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPlaywrightTestingContext.Default); - - PlaywrightTestingAccountQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPlaywrightTestingContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs deleted file mode 100644 index 122f15bb738b..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs +++ /dev/null @@ -1,172 +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; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// A Class representing a PlaywrightTestingAccountQuota 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 GetPlaywrightTestingAccountQuotaResource method. - /// Otherwise you can get one from its parent resource using the GetPlaywrightTestingAccountQuota method. - /// - public partial class PlaywrightTestingAccountQuotaResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The accountName. - /// The quotaName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingQuotaName quotaName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics; - private readonly AccountQuotasRestOperations _playwrightTestingAccountQuotaAccountQuotasRestClient; - private readonly PlaywrightTestingAccountQuotaData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.AzurePlaywrightService/accounts/quotas"; - - /// Initializes a new instance of the class for mocking. - protected PlaywrightTestingAccountQuotaResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal PlaywrightTestingAccountQuotaResource(ArmClient client, PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountQuotaResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string playwrightTestingAccountQuotaAccountQuotasApiVersion); - _playwrightTestingAccountQuotaAccountQuotasRestClient = new AccountQuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingAccountQuotaAccountQuotasApiVersion); -#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 PlaywrightTestingAccountQuotaData 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 quota by name for an account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaResource.Get"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.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 PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get quota by name for an account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaResource.Get"); - scope.Start(); - try - { - var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.Serialization.cs deleted file mode 100644 index 19b85ad88151..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.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.PlaywrightTesting -{ - public partial class PlaywrightTestingAccountResource : IJsonModel - { - private static PlaywrightTestingAccountData s_dataDeserializationInstance; - private static PlaywrightTestingAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - PlaywrightTestingAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPlaywrightTestingContext.Default); - - PlaywrightTestingAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPlaywrightTestingContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs deleted file mode 100644 index 0b9bdec6c3ad..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs +++ /dev/null @@ -1,764 +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.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// A Class representing a PlaywrightTestingAccount 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 GetPlaywrightTestingAccountResource method. - /// Otherwise you can get one from its parent resource using the GetPlaywrightTestingAccount method. - /// - public partial class PlaywrightTestingAccountResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The accountName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _playwrightTestingAccountAccountsClientDiagnostics; - private readonly AccountsRestOperations _playwrightTestingAccountAccountsRestClient; - private readonly PlaywrightTestingAccountData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.AzurePlaywrightService/accounts"; - - /// Initializes a new instance of the class for mocking. - protected PlaywrightTestingAccountResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal PlaywrightTestingAccountResource(ArmClient client, PlaywrightTestingAccountData 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 PlaywrightTestingAccountResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _playwrightTestingAccountAccountsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string playwrightTestingAccountAccountsApiVersion); - _playwrightTestingAccountAccountsRestClient = new AccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingAccountAccountsApiVersion); -#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 PlaywrightTestingAccountData 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 PlaywrightTestingAccountQuotaResources in the PlaywrightTestingAccount. - /// An object representing collection of PlaywrightTestingAccountQuotaResources and their operations over a PlaywrightTestingAccountQuotaResource. - public virtual PlaywrightTestingAccountQuotaCollection GetAllPlaywrightTestingAccountQuota() - { - return GetCachedClient(client => new PlaywrightTestingAccountQuotaCollection(client, Id)); - } - - /// - /// Get quota by name for an account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual async Task> GetPlaywrightTestingAccountQuotaAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - return await GetAllPlaywrightTestingAccountQuota().GetAsync(quotaName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get quota by name for an account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} - /// - /// - /// Operation Id - /// AccountQuota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Playwright service account quota name. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual Response GetPlaywrightTestingAccountQuota(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - return GetAllPlaywrightTestingAccountQuota().Get(quotaName, cancellationToken); - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.Get"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.Get"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Delete - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.Delete"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new PlaywrightTestingArmOperation(_playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.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 Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Delete - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.Delete"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new PlaywrightTestingArmOperation(_playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.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 Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Update - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.Update"); - scope.Start(); - try - { - var response = await _playwrightTestingAccountAccountsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a Account - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Update - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual Response Update(PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.Update"); - scope.Start(); - try - { - var response = _playwrightTestingAccountAccountsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.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 _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PlaywrightTestingAccountPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.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 = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PlaywrightTestingAccountPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - 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.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.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 _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PlaywrightTestingAccountPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - 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.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.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 = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PlaywrightTestingAccountPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.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 _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PlaywrightTestingAccountPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} - /// - /// - /// Operation Id - /// Account_Get - /// - /// - /// Default Api Version - /// 2024-12-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 = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountResource.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 = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new PlaywrightTestingAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PlaywrightTestingAccountPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs deleted file mode 100644 index 85292fdfd9f4..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs +++ /dev/null @@ -1,378 +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.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// 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 GetPlaywrightTestingQuotas method from an instance of . - /// - public partial class PlaywrightTestingQuotaCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _playwrightTestingQuotaQuotasClientDiagnostics; - private readonly QuotasRestOperations _playwrightTestingQuotaQuotasRestClient; - private readonly string _location; - - /// Initializes a new instance of the class for mocking. - protected PlaywrightTestingQuotaCollection() - { - } - - /// 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. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal PlaywrightTestingQuotaCollection(ArmClient client, ResourceIdentifier id, string location) : base(client, id) - { - _location = location; - _playwrightTestingQuotaQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", PlaywrightTestingQuotaResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(PlaywrightTestingQuotaResource.ResourceType, out string playwrightTestingQuotaQuotasApiVersion); - _playwrightTestingQuotaQuotasRestClient = new QuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingQuotaQuotasApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != SubscriptionResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The quota name. - /// The cancellation token to use. - public virtual async Task> GetAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Get"); - scope.Start(); - try - { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, _location, quotaName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The quota name. - /// The cancellation token to use. - public virtual Response Get(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Get"); - scope.Start(); - try - { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, _location, quotaName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List quotas for a given subscription Id. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas - /// - /// - /// Operation Id - /// Quota_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-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) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, _location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, _location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingQuotaResource(Client, PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(e)), _playwrightTestingQuotaQuotasClientDiagnostics, Pipeline, "PlaywrightTestingQuotaCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List quotas for a given subscription Id. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas - /// - /// - /// Operation Id - /// Quota_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-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) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, _location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, _location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingQuotaResource(Client, PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(e)), _playwrightTestingQuotaQuotasClientDiagnostics, Pipeline, "PlaywrightTestingQuotaCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The quota name. - /// The cancellation token to use. - public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Exists"); - scope.Start(); - try - { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, _location, quotaName, 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}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The quota name. - /// The cancellation token to use. - public virtual Response Exists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Exists"); - scope.Start(); - try - { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, _location, quotaName, 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}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The quota name. - /// The cancellation token to use. - public virtual async Task> GetIfExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, _location, quotaName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingQuotaResource(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}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The quota name. - /// The cancellation token to use. - public virtual NullableResponse GetIfExists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.GetIfExists"); - scope.Start(); - try - { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, _location, quotaName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingQuotaResource(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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.Serialization.cs deleted file mode 100644 index 347cb22f6f85..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.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.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - public partial class PlaywrightTestingQuotaData : 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(PlaywrightTestingQuotaData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - PlaywrightTestingQuotaData 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(PlaywrightTestingQuotaData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePlaywrightTestingQuotaData(document.RootElement, options); - } - - internal static PlaywrightTestingQuotaData DeserializePlaywrightTestingQuotaData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PlaywrightTestingQuotaProperties 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 = PlaywrightTestingQuotaProperties.DeserializePlaywrightTestingQuotaProperties(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, AzureResourceManagerPlaywrightTestingContext.Default); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingQuotaData( - 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, AzureResourceManagerPlaywrightTestingContext.Default); - default: - throw new FormatException($"The model {nameof(PlaywrightTestingQuotaData)} does not support writing '{options.Format}' format."); - } - } - - PlaywrightTestingQuotaData 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 DeserializePlaywrightTestingQuotaData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PlaywrightTestingQuotaData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.cs deleted file mode 100644 index 055e48773351..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.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.Models; -using Azure.ResourceManager.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// A class representing the PlaywrightTestingQuota data model. - /// A subscription quota resource. - /// - public partial class PlaywrightTestingQuotaData : 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 . - internal PlaywrightTestingQuotaData() - { - } - - /// 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 PlaywrightTestingQuotaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PlaywrightTestingQuotaProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public PlaywrightTestingQuotaProperties Properties { get; } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.Serialization.cs deleted file mode 100644 index a8981087ed27..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.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.PlaywrightTesting -{ - public partial class PlaywrightTestingQuotaResource : IJsonModel - { - private static PlaywrightTestingQuotaData s_dataDeserializationInstance; - private static PlaywrightTestingQuotaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - PlaywrightTestingQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPlaywrightTestingContext.Default); - - PlaywrightTestingQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPlaywrightTestingContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs deleted file mode 100644 index 520475a00b75..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs +++ /dev/null @@ -1,172 +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; -using Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - /// - /// A Class representing a PlaywrightTestingQuota 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 GetPlaywrightTestingQuotaResource method. - /// Otherwise you can get one from its parent resource using the GetPlaywrightTestingQuota method. - /// - public partial class PlaywrightTestingQuotaResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The location. - /// The quotaName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName quotaName) - { - var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _playwrightTestingQuotaQuotasClientDiagnostics; - private readonly QuotasRestOperations _playwrightTestingQuotaQuotasRestClient; - private readonly PlaywrightTestingQuotaData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.AzurePlaywrightService/locations/quotas"; - - /// Initializes a new instance of the class for mocking. - protected PlaywrightTestingQuotaResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal PlaywrightTestingQuotaResource(ArmClient client, PlaywrightTestingQuotaData 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 PlaywrightTestingQuotaResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _playwrightTestingQuotaQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string playwrightTestingQuotaQuotasApiVersion); - _playwrightTestingQuotaQuotasRestClient = new QuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingQuotaQuotasApiVersion); -#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 PlaywrightTestingQuotaData 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 subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaResource.Get"); - scope.Start(); - try - { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get subscription quota by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} - /// - /// - /// Operation Id - /// Quota_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaResource.Get"); - scope.Start(); - try - { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ProviderConstants.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ProviderConstants.cs deleted file mode 100644 index 549f7371c851..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ProviderConstants.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal static class ProviderConstants - { - public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs deleted file mode 100644 index e17335ffa05b..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs +++ /dev/null @@ -1,319 +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.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal partial class AccountQuotasRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of AccountQuotasRestOperations. - /// 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 AccountQuotasRestOperations(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"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingQuotaName quotaName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/quotas/", false); - uri.AppendPath(quotaName.ToString(), true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingQuotaName quotaName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/quotas/", false); - uri.AppendPath(quotaName.ToString(), true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get quota by name for an account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// The Playwright service account quota 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 accountName, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, quotaName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingAccountQuotaData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PlaywrightTestingAccountQuotaData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get quota by name for an account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// The Playwright service account quota 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 accountName, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, quotaName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingAccountQuotaData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PlaywrightTestingAccountQuotaData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/quotas", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByAccountRequest(string subscriptionId, string resourceGroupName, string accountName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/quotas", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List quotas for a given account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByAccountRequest(subscriptionId, resourceGroupName, accountName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AccountQuotaListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List quotas for a given account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByAccountRequest(subscriptionId, resourceGroupName, accountName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AccountQuotaListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) - { - 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 quotas for a given account. - /// 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. - /// Name of account. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AccountQuotaListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List quotas for a given account. - /// 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. - /// Name of account. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateListByAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AccountQuotaListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs deleted file mode 100644 index c13545967fdf..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs +++ /dev/null @@ -1,816 +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.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal partial class AccountsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of AccountsRestOperations. - /// 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 AccountsRestOperations(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"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingAccountData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PlaywrightTestingAccountData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingAccountData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PlaywrightTestingAccountData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountData 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, 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; - } - - /// Create a Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, 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 Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, 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 accountName, PlaywrightTestingAccountPatch 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountPatch 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, 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; - } - - /// Update a Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingAccountData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingAccountData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName) - { - 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName) - { - 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("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - _userAgent.Apply(message); - return message; - } - - /// Delete a Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName); - 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 Account. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of account. - /// 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 accountName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName); - _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.AzurePlaywrightService/accounts", 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.AzurePlaywrightService/accounts", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Account 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) - { - 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: - { - AccountListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AccountListResult.DeserializeAccountListResult(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.AzurePlaywrightService/accounts", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySubscriptionRequest(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.AzurePlaywrightService/accounts", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCheckPlaywrightTestingNameAvailabilityRequestUri(string subscriptionId, PlaywrightTestingNameAvailabilityContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCheckPlaywrightTestingNameAvailabilityRequest(string subscriptionId, PlaywrightTestingNameAvailabilityContent 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("/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", 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; - } - - /// Adds check global name availability operation, normally used if a resource name must be globally unique. - /// The ID of the target subscription. The value must be an UUID. - /// The CheckAvailability request. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> CheckPlaywrightTestingNameAvailabilityAsync(string subscriptionId, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCheckPlaywrightTestingNameAvailabilityRequest(subscriptionId, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingNameAvailabilityResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingNameAvailabilityResult.DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Adds check global name availability operation, normally used if a resource name must be globally unique. - /// The ID of the target subscription. The value must be an UUID. - /// The CheckAvailability request. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response CheckPlaywrightTestingNameAvailability(string subscriptionId, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCheckPlaywrightTestingNameAvailabilityRequest(subscriptionId, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingNameAvailabilityResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PlaywrightTestingNameAvailabilityResult.DeserializePlaywrightTestingNameAvailabilityResult(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); - return message; - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AccountListResult.DeserializeAccountListResult(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); - return message; - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Account 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: - { - AccountListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs deleted file mode 100644 index acad5f3e7505..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs +++ /dev/null @@ -1,299 +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.PlaywrightTesting.Models; - -namespace Azure.ResourceManager.PlaywrightTesting -{ - internal partial class QuotasRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of QuotasRestOperations. - /// 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 QuotasRestOperations(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"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string location, PlaywrightTestingQuotaName quotaName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/quotas/", false); - uri.AppendPath(quotaName.ToString(), true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string location, PlaywrightTestingQuotaName quotaName) - { - 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.AzurePlaywrightService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/quotas/", false); - uri.AppendPath(quotaName.ToString(), true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get subscription quota by name. - /// The ID of the target subscription. The value must be an UUID. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota 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 location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(location, nameof(location)); - - using var message = CreateGetRequest(subscriptionId, location, quotaName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingQuotaData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PlaywrightTestingQuotaData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get subscription quota by name. - /// The ID of the target subscription. The value must be an UUID. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota 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 location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(location, nameof(location)); - - using var message = CreateGetRequest(subscriptionId, location, quotaName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PlaywrightTestingQuotaData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PlaywrightTestingQuotaData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string location) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/quotas", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string location) - { - 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.AzurePlaywrightService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/quotas", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List quotas for a given subscription Id. - /// The ID of the target subscription. The value must be an UUID. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(location, nameof(location)); - - using var message = CreateListBySubscriptionRequest(subscriptionId, location); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QuotaListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List quotas for a given subscription Id. - /// The ID of the target subscription. The value must be an UUID. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, string location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(location, nameof(location)); - - using var message = CreateListBySubscriptionRequest(subscriptionId, location); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QuotaListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string location) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string location) - { - 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 quotas for a given subscription Id. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(location, nameof(location)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, location); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QuotaListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List quotas for a given subscription Id. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(location, nameof(location)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, location); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QuotaListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Properties/AssemblyInfo.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 9744d1a5edd5..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Runtime.CompilerServices; - -[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.AzurePlaywrightService")] - -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[assembly: InternalsVisibleTo("Azure.ResourceManager.PlaywrightTesting.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md.bak b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md.bak deleted file mode 100644 index 3766fca34e24..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md.bak +++ /dev/null @@ -1,64 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -azure-arm: true -csharp: true -library-name: PlaywrightTesting -namespace: Azure.ResourceManager.PlaywrightTesting -require: https://github.com/Azure/azure-rest-api-specs/blob/fdcf40595e792db3a048098504a568edc113b881/specification/playwrighttesting/resource-manager/readme.md -#tag: package-2024-12-01 -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -rename-mapping: - Quota: PlaywrightTestingQuotas - CheckNameAvailabilityResponse: PlaywrightTestingNameAvailabilityResult - -prepend-rp-prefix: - - QuotaNames - - Account - - ProvisioningState - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -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 - -``` diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Azure.ResourceManager.PlaywrightTesting.Tests.csproj b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Azure.ResourceManager.PlaywrightTesting.Tests.csproj deleted file mode 100644 index 0e78f46992f9..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Azure.ResourceManager.PlaywrightTesting.Tests.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs deleted file mode 100644 index aebbdedd932e..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs +++ /dev/null @@ -1,65 +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.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_PlaywrightTestingAccountCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_AccountsCreateOrUpdate() - { - // Generated from example definition: 2024-12-01/Accounts_CreateOrUpdate.json - // this example is just showing the usage of "Account_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 = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this PlaywrightTestingAccountResource - PlaywrightTestingAccountCollection collection = resourceGroupResource.GetPlaywrightTestingAccounts(); - - // invoke the operation - string accountName = "myPlaywrightAccount"; - PlaywrightTestingAccountData data = new PlaywrightTestingAccountData(new AzureLocation("westus")) - { - Properties = new PlaywrightTestingAccountProperties - { - RegionalAffinity = PlaywrightTestingEnablementStatus.Enabled, - }, - Tags = -{ -["Team"] = "Dev Exp" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, data); - PlaywrightTestingAccountResource 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 - PlaywrightTestingAccountData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs deleted file mode 100644 index 48997baf2881..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs +++ /dev/null @@ -1,161 +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.PlaywrightTesting.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_PlaywrightTestingAccountQuotaCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_AccountQuotasGet() - { - // Generated from example definition: 2024-12-01/AccountQuotas_Get.json - // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // get the collection of this PlaywrightTestingAccountQuotaResource - PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); - - // invoke the operation - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - PlaywrightTestingAccountQuotaResource result = await collection.GetAsync(quotaName); - - // 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 - PlaywrightTestingAccountQuotaData 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_AccountQuotasListByAccount() - { - // Generated from example definition: 2024-12-01/AccountQuotas_ListByAccount.json - // this example is just showing the usage of "AccountQuota_ListByAccount" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // get the collection of this PlaywrightTestingAccountQuotaResource - PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); - - // invoke the operation and iterate over the result - await foreach (PlaywrightTestingAccountQuotaResource 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 - PlaywrightTestingAccountQuotaData 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_AccountQuotasGet() - { - // Generated from example definition: 2024-12-01/AccountQuotas_Get.json - // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // get the collection of this PlaywrightTestingAccountQuotaResource - PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); - - // invoke the operation - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - bool result = await collection.ExistsAsync(quotaName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_AccountQuotasGet() - { - // Generated from example definition: 2024-12-01/AccountQuotas_Get.json - // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // get the collection of this PlaywrightTestingAccountQuotaResource - PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); - - // invoke the operation - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - NullableResponse response = await collection.GetIfExistsAsync(quotaName); - PlaywrightTestingAccountQuotaResource 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 - PlaywrightTestingAccountQuotaData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs deleted file mode 100644 index 3588cf362776..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.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.PlaywrightTesting.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_PlaywrightTestingAccountQuotaResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_AccountQuotasGet() - { - // Generated from example definition: 2024-12-01/AccountQuotas_Get.json - // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountQuotaResource created on azure - // for more information of creating PlaywrightTestingAccountQuotaResource, please refer to the document of PlaywrightTestingAccountQuotaResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - ResourceIdentifier playwrightTestingAccountQuotaResourceId = PlaywrightTestingAccountQuotaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, quotaName); - PlaywrightTestingAccountQuotaResource playwrightTestingAccountQuota = client.GetPlaywrightTestingAccountQuotaResource(playwrightTestingAccountQuotaResourceId); - - // invoke the operation - PlaywrightTestingAccountQuotaResource result = await playwrightTestingAccountQuota.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 - PlaywrightTestingAccountQuotaData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs deleted file mode 100644 index e5b6390a3ead..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs +++ /dev/null @@ -1,87 +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.PlaywrightTesting.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_PlaywrightTestingAccountResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_AccountsDelete() - { - // Generated from example definition: 2024-12-01/Accounts_Delete.json - // this example is just showing the usage of "Account_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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // invoke the operation - await playwrightTestingAccount.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_AccountsUpdate() - { - // Generated from example definition: 2024-12-01/Accounts_Update.json - // this example is just showing the usage of "Account_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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string accountName = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // invoke the operation - PlaywrightTestingAccountPatch patch = new PlaywrightTestingAccountPatch - { - Tags = -{ -["Team"] = "Dev Exp", -["Division"] = "LT" -}, - Properties = new AccountUpdateProperties - { - RegionalAffinity = PlaywrightTestingEnablementStatus.Enabled, - }, - }; - PlaywrightTestingAccountResource result = await playwrightTestingAccount.UpdateAsync(patch); - - // 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 - PlaywrightTestingAccountData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs deleted file mode 100644 index 185013c36333..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.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.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_PlaywrightTestingQuotaCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_QuotasGet() - { - // Generated from example definition: 2024-12-01/Quotas_Get.json - // this example is just showing the usage of "Quota_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 SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this PlaywrightTestingQuotaResource - string location = "eastus"; - PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); - - // invoke the operation - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - PlaywrightTestingQuotaResource result = await collection.GetAsync(quotaName); - - // 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 - PlaywrightTestingQuotaData 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_QuotasListBySubscription() - { - // Generated from example definition: 2024-12-01/Quotas_ListBySubscription.json - // this example is just showing the usage of "Quota_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 = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this PlaywrightTestingQuotaResource - string location = "eastus"; - PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); - - // invoke the operation and iterate over the result - await foreach (PlaywrightTestingQuotaResource 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 - PlaywrightTestingQuotaData 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_QuotasGet() - { - // Generated from example definition: 2024-12-01/Quotas_Get.json - // this example is just showing the usage of "Quota_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 SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this PlaywrightTestingQuotaResource - string location = "eastus"; - PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); - - // invoke the operation - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - bool result = await collection.ExistsAsync(quotaName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_QuotasGet() - { - // Generated from example definition: 2024-12-01/Quotas_Get.json - // this example is just showing the usage of "Quota_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 SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this PlaywrightTestingQuotaResource - string location = "eastus"; - PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); - - // invoke the operation - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - NullableResponse response = await collection.GetIfExistsAsync(quotaName); - PlaywrightTestingQuotaResource 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 - PlaywrightTestingQuotaData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs deleted file mode 100644 index 22387c22061f..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_PlaywrightTestingQuotaResource.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 Azure.ResourceManager.PlaywrightTesting.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_PlaywrightTestingQuotaResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_QuotasGet() - { - // Generated from example definition: 2024-12-01/Quotas_Get.json - // this example is just showing the usage of "Quota_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 PlaywrightTestingQuotaResource created on azure - // for more information of creating PlaywrightTestingQuotaResource, please refer to the document of PlaywrightTestingQuotaResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string location = "eastus"; - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - ResourceIdentifier playwrightTestingQuotaResourceId = PlaywrightTestingQuotaResource.CreateResourceIdentifier(subscriptionId, location, quotaName); - PlaywrightTestingQuotaResource playwrightTestingQuota = client.GetPlaywrightTestingQuotaResource(playwrightTestingQuotaResourceId); - - // invoke the operation - PlaywrightTestingQuotaResource result = await playwrightTestingQuota.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 - PlaywrightTestingQuotaData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index 766aee6e99a3..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.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 Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CheckPlaywrightTestingNameAvailability_AccountsCheckNameAvailability() - { - // Generated from example definition: 2024-12-01/Accounts_CheckNameAvailability.json - // this example is just showing the usage of "Accounts_CheckPlaywrightTestingNameAvailability" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation - PlaywrightTestingNameAvailabilityContent content = new PlaywrightTestingNameAvailabilityContent - { - Name = "dummyName", - Type = "Microsoft.AzurePlaywrightService/Accounts", - }; - PlaywrightTestingNameAvailabilityResult result = await subscriptionResource.CheckPlaywrightTestingNameAvailabilityAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Helper/ResourceHelper.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Helper/ResourceHelper.cs deleted file mode 100644 index 61a4f54da1b1..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Helper/ResourceHelper.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Azure.ResourceManager.PlaywrightTesting.Tests.Helper -{ - public class ResourceHelper - { - public const string RESOURCE_LOCATION = "eastus"; - public const string RESOURCE_GROUP_NAME = "sdkRG"; - public const string RESOURCE_GROUP_NAME_TEST = "sdkRG1386"; - public const string WORKSPACE_NAME = "testingWS"; - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/PlaywrightTestingManagementTestBase.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/PlaywrightTestingManagementTestBase.cs deleted file mode 100644 index 000b8bcfbaf9..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/PlaywrightTestingManagementTestBase.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using Azure.Core.TestFramework; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.TestFramework; -using NUnit.Framework; -using System.Threading.Tasks; - -namespace Azure.ResourceManager.PlaywrightTesting.Tests -{ - public class PlaywrightTestingManagementTestBase : ManagementRecordedTestBase - { - protected ArmClient Client { get; private set; } - protected SubscriptionResource DefaultSubscription { get; private set; } - - protected PlaywrightTestingManagementTestBase(bool isAsync, RecordedTestMode mode) - : base(isAsync, mode) - { - } - - protected PlaywrightTestingManagementTestBase(bool isAsync) - : base(isAsync) - { - } - - [SetUp] - public async Task CreateCommonClient() - { - Client = GetArmClient(); - DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); - } - - protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) - { - string rgName = Recording.GenerateAssetName(rgNamePrefix); - ResourceGroupData input = new ResourceGroupData(location); - var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); - return lro.Value; - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/PlaywrightTestingManagementTestEnvironment.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/PlaywrightTestingManagementTestEnvironment.cs deleted file mode 100644 index a9895e2d9385..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/PlaywrightTestingManagementTestEnvironment.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core.TestFramework; - -namespace Azure.ResourceManager.PlaywrightTesting.Tests -{ - public class PlaywrightTestingManagementTestEnvironment : TestEnvironment - { - } -} \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingAccountOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingAccountOperations.cs deleted file mode 100644 index 36e04ac1bdde..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingAccountOperations.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.PlaywrightTesting.Tests.Helper; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Tests.Scenario -{ - public class PlaywrightTestingAccountOperations : PlaywrightTestingManagementTestBase - { - private PlaywrightTestingAccountCollection _accountCollection { get; set; } - private PlaywrightTestingAccountResource _accountResource { get; set; } - private PlaywrightTestingAccountData _accountData { get; set; } - - public PlaywrightTestingAccountOperations(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) - { - } - - [SetUp] - public async Task ClearAndInitialize() - { - if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) - { - await CreateCommonClient(); - } - - SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); - _accountCollection = (await CreateResourceGroup(subscription, ResourceHelper.RESOURCE_GROUP_NAME, ResourceHelper.RESOURCE_LOCATION)).GetPlaywrightTestingAccounts(); - - _accountData = new PlaywrightTestingAccountData(ResourceHelper.RESOURCE_LOCATION); - } - - [OneTimeTearDown] - public void Cleanup() - { - CleanupResourceGroups(); - } - - [TestCase] - [RecordedTest] - public async Task AccountOperationTests() - { - //Create API - ArmOperation createResponse = await _accountCollection.CreateOrUpdateAsync(WaitUntil.Completed, ResourceHelper.WORKSPACE_NAME, _accountData); - - Assert.NotNull(createResponse); - Assert.IsTrue(createResponse.HasCompleted); - Assert.IsTrue(createResponse.HasValue); - Assert.IsTrue(createResponse.Value.HasData); - Assert.AreEqual(ResourceHelper.WORKSPACE_NAME, createResponse.Value.Data.Name); - Assert.AreEqual(ResourceHelper.RESOURCE_LOCATION, createResponse.Value.Data.Location.Name); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, createResponse.Value.Data.Properties.ProvisioningState); - Assert.IsNotNull(createResponse.Value.Data.Properties.ScalableExecution); - Assert.IsTrue(createResponse.Value.Data.Properties.ScalableExecution == PlaywrightTestingEnablementStatus.Enabled); - - //GET API - Response getResponse = await _accountCollection.GetAsync(ResourceHelper.WORKSPACE_NAME); - PlaywrightTestingAccountResource accountResource = getResponse.Value; - - Assert.IsNotNull(accountResource); - Assert.IsTrue(accountResource.HasData); - Assert.AreEqual(ResourceHelper.WORKSPACE_NAME, accountResource.Data.Name); - Assert.AreEqual(ResourceHelper.RESOURCE_LOCATION, accountResource.Data.Location.Name); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, accountResource.Data.Properties.ProvisioningState); - Assert.IsNotNull(createResponse.Value.Data.Properties.ScalableExecution); - - //GETALL API - List getAllResponse = await _accountCollection.GetAllAsync().ToEnumerableAsync(); - Assert.IsNotEmpty(getAllResponse); - Assert.IsNotNull(getAllResponse); - foreach (PlaywrightTestingAccountResource resource in getAllResponse) - { - Assert.IsNotNull(resource); - Assert.IsTrue(resource.HasData); - Assert.IsNotNull(resource.Data.Id); - Assert.IsNotNull(resource.Data.Name); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); - Assert.IsNotNull(createResponse.Value.Data.Properties.ScalableExecution); - } - - //GET RESOURCE GROUP API - Response getRGResponse = await createResponse.Value.GetAsync(); - accountResource = getRGResponse.Value; - - Assert.IsNotNull(accountResource); - Assert.IsTrue(accountResource.HasData); - Assert.AreEqual(ResourceHelper.WORKSPACE_NAME, accountResource.Data.Name); - Assert.AreEqual(ResourceHelper.RESOURCE_LOCATION, accountResource.Data.Location.Name); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, accountResource.Data.Properties.ProvisioningState); - - //UPDATE API - PlaywrightTestingAccountPatch resourcePatchPayload = new PlaywrightTestingAccountPatch(); - Response updateResponse = await accountResource.UpdateAsync(resourcePatchPayload); - PlaywrightTestingAccountResource updateResponseValue = updateResponse.Value; - Assert.IsNotNull(updateResponseValue); - Assert.IsTrue(updateResponseValue.HasData); - Assert.AreEqual(ResourceHelper.WORKSPACE_NAME, updateResponseValue.Data.Name); - Assert.AreEqual(ResourceHelper.RESOURCE_LOCATION, updateResponseValue.Data.Location.Name); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, updateResponseValue.Data.Properties.ProvisioningState); - Assert.IsTrue(updateResponseValue.Data.Properties.RegionalAffinity == PlaywrightTestingEnablementStatus.Enabled); - - //DELETE API - ArmOperation deleteResponse = await updateResponseValue.DeleteAsync(WaitUntil.Completed); - await deleteResponse.WaitForCompletionResponseAsync(); - Assert.IsTrue(deleteResponse.HasCompleted); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingAccountQuotaOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingAccountQuotaOperations.cs deleted file mode 100644 index 3e11ce87961a..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingAccountQuotaOperations.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.TestFramework; -using Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.PlaywrightTesting.Tests.Helper; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Tests.Scenario -{ - public class PlaywrightTestingAccountQuotaOperations : PlaywrightTestingManagementTestBase - { - private PlaywrightTestingAccountQuotaCollection _quotaCollection { get; set; } - private PlaywrightTestingAccountQuotaResource _quotaResource { get; set; } - private PlaywrightTestingAccountQuotaData _quotaData { get; set; } - - public PlaywrightTestingAccountQuotaOperations(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) - { - } - - [SetUp] - public async Task ClearAndInitialize() - { - if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) - { - await CreateCommonClient(); - } - - SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); - - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscription.Id.SubscriptionId, ResourceHelper.RESOURCE_GROUP_NAME_TEST, ResourceHelper.WORKSPACE_NAME); - PlaywrightTestingAccountResource playwrightTestingAccount = new PlaywrightTestingAccountResource(Client, playwrightTestingAccountResourceId); - - _quotaCollection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); - } - - [OneTimeTearDown] - public void Cleanup() - { - CleanupResourceGroups(); - } - - [TestCase] - [RecordedTest] - public async Task AccountQuotaOperationTestsScalable() - { - //GET API - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; - - try - { - Response getResponse = await _quotaCollection.GetAsync(quotaName); - Assert.IsNotNull(getResponse, "The response should not be null."); - Assert.IsNotNull(getResponse.Value, "The response value should not be null."); - } - catch (RequestFailedException ex) - { - Assert.AreEqual(404, ex.Status, "Expected a 404 status code."); - Assert.AreEqual("NotFound", ex.ErrorCode, "Expected the error code to be 'NotFound'."); - StringAssert.Contains( - "The data for the account or free-trial was not found. Please check the request and try again.", - ex.Message, - "The error message did not match the expected text." - ); - - Assert.IsTrue(ex.Message.Contains("NotFound"), "The error message should contain 'NotFound'."); - return; - } - - Assert.Fail("Expected a RequestFailedException with a 404 status, but the API returned a valid response."); - - //List API - List listResponse = await _quotaCollection.GetAllAsync().ToEnumerableAsync(); - Assert.IsNotNull(listResponse); - } - - [TestCase] - [RecordedTest] - public async Task AccountQuotaOperationTestsReporting() - { - //GET API - PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.Reporting; - - try - { - Response getResponse = await _quotaCollection.GetAsync(quotaName); - Assert.IsNotNull(getResponse, "The response should not be null."); - Assert.IsNotNull(getResponse.Value, "The response value should not be null."); - } - catch (RequestFailedException ex) - { - Assert.AreEqual(404, ex.Status, "Expected a 404 status code."); - Assert.AreEqual("NotFound", ex.ErrorCode, "Expected the error code to be 'NotFound'."); - StringAssert.Contains( - "The data for the account or free-trial was not found. Please check the request and try again.", - ex.Message, - "The error message did not match the expected text." - ); - - Assert.IsTrue(ex.Message.Contains("NotFound"), "The error message should contain 'NotFound'."); - return; - } - - Assert.Fail("Expected a RequestFailedException with a 404 status, but the API returned a valid response."); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingQuotaOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingQuotaOperations.cs deleted file mode 100644 index 25afc08171d1..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tests/Scenario/PlaywrightTestingQuotaOperations.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Net; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using Azure.ResourceManager.PlaywrightTesting.Models; -using Azure.ResourceManager.PlaywrightTesting.Tests.Helper; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.PlaywrightTesting.Tests.Scenario -{ - public class PlaywrightTestingQuotaOperations : PlaywrightTestingManagementTestBase - { - private PlaywrightTestingQuotaCollection _quotaCollection { get; set; } - private PlaywrightTestingQuotaResource _quotaResource { get; set; } - private PlaywrightTestingQuotaData _quotaData { get; set; } - - public PlaywrightTestingQuotaOperations(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) - { - } - - [SetUp] - public async Task ClearAndInitialize() - { - if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) - { - await CreateCommonClient(); - } - - SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); - _quotaCollection = subscription.GetAllPlaywrightTestingQuota(ResourceHelper.RESOURCE_LOCATION); - } - - [OneTimeTearDown] - public void Cleanup() - { - CleanupResourceGroups(); - } - - [TestCase] - [RecordedTest] - public async Task QuotaOperationTestsScalable() - { - //GET API - Response getResponse = await _quotaCollection.GetAsync(PlaywrightTestingQuotaName.ScalableExecution); - Assert.NotNull(getResponse); - Assert.IsNotNull(getResponse.Value); - Assert.IsNotNull(getResponse.Value.Data); - Assert.IsNotNull(getResponse.Value.Data.Name); - Assert.IsNotNull(getResponse.Value.Data.Properties); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, getResponse.Value.Data.Properties.ProvisioningState); - Assert.IsNotNull(getResponse.Value.Data.Properties.FreeTrial); - Assert.IsNotNull(getResponse.Value.Data.Properties.FreeTrial.AccountId); - Assert.AreEqual(PlaywrightTestingQuotaName.ScalableExecution.ToString(), getResponse.Value.Data.Name); - - //List API - List listResponse = await _quotaCollection.GetAllAsync().ToEnumerableAsync(); - Assert.IsNotNull(listResponse); - foreach (PlaywrightTestingQuotaResource resource in listResponse) - { - Assert.IsTrue(resource.HasData); - Assert.IsNotNull(resource.Data); - Assert.IsNotNull(resource.Data.Name); - Assert.IsNotNull(resource.Data.Id); - Assert.IsNotNull(resource.Data.Properties.FreeTrial); - Assert.IsNotNull(resource.Data.Properties.FreeTrial.AccountId); - } - } - - [TestCase] - [RecordedTest] - public async Task QuotaOperationTestsReporting() - { - //GET API - Response getResponseReporting = await _quotaCollection.GetAsync(PlaywrightTestingQuotaName.Reporting); - Assert.NotNull(getResponseReporting); - Assert.IsNotNull(getResponseReporting.Value); - Assert.IsNotNull(getResponseReporting.Value.Data); - Assert.IsNotNull(getResponseReporting.Value.Data.Name); - Assert.AreEqual(PlaywrightTestingQuotaName.Reporting.ToString(), getResponseReporting.Value.Data.Name); - Assert.IsNotNull(getResponseReporting.Value.Data.Properties); - Assert.AreEqual(PlaywrightTestingProvisioningState.Succeeded, getResponseReporting.Value.Data.Properties.ProvisioningState); - Assert.IsNotNull(getResponseReporting.Value.Data.Properties.FreeTrial); - Assert.IsNotNull(getResponseReporting.Value.Data.Properties.FreeTrial.AccountId); - } - } -} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml deleted file mode 100644 index cabd4f517bdf..000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml +++ /dev/null @@ -1,3 +0,0 @@ -directory: specification/playwrighttesting/PlaywrightTesting.Management -commit: 0e2ffd157b5d1a3d1d1edf8e8a916560d2130180 -repo: Azure/azure-rest-api-specs diff --git a/sdk/playwrighttesting/ci.mgmt.yml b/sdk/playwrighttesting/ci.mgmt.yml deleted file mode 100644 index 79addf69162c..000000000000 --- a/sdk/playwrighttesting/ci.mgmt.yml +++ /dev/null @@ -1,23 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: none -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/playwrighttesting/ci.mgmt.yml - - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: playwrighttesting - LimitForPullRequest: true - Artifacts: - - name: Azure.ResourceManager.PlaywrightTesting - safeName: AzureResourceManagerPlaywrightTesting diff --git a/sdk/playwrighttesting/ci.yml b/sdk/playwrighttesting/ci.yml deleted file mode 100644 index d195957221d1..000000000000 --- a/sdk/playwrighttesting/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/playwrighttesting/ - exclude: - - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/playwrighttesting/ - exclude: - - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: playwrighttesting - BuildSnippets: false - ArtifactName: packages - Artifacts: - - name: Azure.Developer.MicrosoftPlaywrightTesting.NUnit - safeName: AzureDeveloperMicrosoftPlaywrightTestingNUnit - - name: Azure.Developer.MicrosoftPlaywrightTesting.TestLogger - safeName: AzureDeveloperMicrosoftPlaywrightTestingTestLogger - - - diff --git a/sdk/playwrighttesting/test-resources.json b/sdk/playwrighttesting/test-resources.json deleted file mode 100644 index a1d088553b8d..000000000000 --- a/sdk/playwrighttesting/test-resources.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "baseName": { - "type": "string", - "defaultValue": "[resourceGroup().name]", - "metadata": { - "description": "The base resource name." - } - }, - "tenantId": { - "type": "string", - "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "metadata": { - "description": "The tenant ID to which the application and resources belong." - } - }, - "testApplicationOid": { - "type": "string", - "metadata": { - "description": "The client OID to grant access to test resources." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "The location of the resource. By default, this is the same as the resource group." - } - } - }, - "resources": [ - { - "apiVersion": "2024-02-01-preview", - "name": "[parameters('baseName')]", - "location": "[parameters('location')]", - "type": "Microsoft.AzurePlaywrightService/accounts" - } - ], - "outputs": { - "DASHBOARD_ENDPOINT": { - "type": "string", - "value": "[reference(resourceId('Microsoft.AzurePlaywrightService/accounts', parameters('baseName'))).dashboardUri]" - } - } -} \ No newline at end of file diff --git a/sdk/playwrighttesting/tests.yml b/sdk/playwrighttesting/tests.yml deleted file mode 100644 index 2a730f27c3ea..000000000000 --- a/sdk/playwrighttesting/tests.yml +++ /dev/null @@ -1,8 +0,0 @@ -trigger: none - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml - parameters: - ServiceDirectory: playwrighttesting - SupportedClouds: 'Public' - Location: 'westus3' \ No newline at end of file diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Custom/AzureResourceManagerPortalServicesCopilotContext.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Custom/AzureResourceManagerPortalServicesCopilotContext.cs index 82d730112c41..741c2b4ae0f7 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Custom/AzureResourceManagerPortalServicesCopilotContext.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Custom/AzureResourceManagerPortalServicesCopilotContext.cs @@ -7,7 +7,6 @@ namespace Azure.ResourceManager.PortalServicesCopilot { [ModelReaderWriterBuildable(typeof(ResponseError))] - [ModelReaderWriterBuildable(typeof(SystemData))] public partial class AzureResourceManagerPortalServicesCopilotContext { } 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 b6bcc2ccc5f2..33e75d9db4de 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.ResourceManager.Models; using Azure.ResourceManager.PortalServicesCopilot.Models; namespace Azure.ResourceManager.PortalServicesCopilot @@ -19,6 +20,7 @@ namespace Azure.ResourceManager.PortalServicesCopilot [ModelReaderWriterBuildable(typeof(PortalServicesCopilotSettingPatch))] [ModelReaderWriterBuildable(typeof(PortalServicesCopilotSettingResource))] [ModelReaderWriterBuildable(typeof(PortalServicesCopilotSettingsProperties))] + [ModelReaderWriterBuildable(typeof(SystemData))] public partial class AzureResourceManagerPortalServicesCopilotContext : ModelReaderWriterContext { } diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/RestOperations/CopilotSettingsRestOperations.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/RestOperations/CopilotSettingsRestOperations.cs index 1a967701bbe1..005615edf9ac 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/RestOperations/CopilotSettingsRestOperations.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/RestOperations/CopilotSettingsRestOperations.cs @@ -43,28 +43,28 @@ internal CopilotSettings(ClientDiagnostics clientDiagnostics, HttpPipeline pipel internal HttpMessage CreateGetRequest(RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/providers/Microsoft.PortalServices/copilotSettings/default", false); uri.AppendQuery("api-version", _apiVersion, true); + 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(RequestContent content, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Put; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/providers/Microsoft.PortalServices/copilotSettings/default", false); 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; @@ -73,14 +73,14 @@ internal HttpMessage CreateCreateOrUpdateRequest(RequestContent content, Request internal HttpMessage CreateUpdateRequest(RequestContent content, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Patch; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/providers/Microsoft.PortalServices/copilotSettings/default", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; + request.Method = RequestMethod.Patch; request.Headers.SetValue("Content-Type", "application/json"); request.Headers.SetValue("Accept", "application/json"); request.Content = content; @@ -89,14 +89,14 @@ internal HttpMessage CreateUpdateRequest(RequestContent content, RequestContext internal HttpMessage CreateDeleteRequest(RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Delete; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/providers/Microsoft.PortalServices/copilotSettings/default", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; + request.Method = RequestMethod.Delete; return message; } } diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml index 6295849a543f..7cdb190f79b8 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/portalservices/CopilotSettings.Management -commit: a6b58db4a5390da2098e7c238758f2c4617c2542 +commit: c90b62daed903080ed53766cefd53b6df2621cc6 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.net8.0.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.net8.0.cs index 970f1af13ff0..e16d90f121d0 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.net8.0.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.net8.0.cs @@ -214,7 +214,8 @@ public static partial class ArmRecoveryServicesModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSecuritySettings RecoveryServicesSecuritySettings(Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState? immutabilityState, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings softDeleteSettings, Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization? multiUserAuthorization) { throw null; } public static Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSecuritySettings RecoveryServicesSecuritySettings(Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState? immutabilityState = default(Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState?), Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings softDeleteSettings = null, Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization? multiUserAuthorization = default(Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization?), Azure.ResourceManager.RecoveryServices.Models.SourceScanConfiguration sourceScanConfiguration = null) { throw null; } - public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData RecoveryServicesVaultData(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.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData RecoveryServicesVaultData(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 = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData RecoveryServicesVaultData(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.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultExtendedInfoData RecoveryServicesVaultExtendedInfoData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string integrityKey = null, string encryptionKey = null, string encryptionKeyThumbprint = null, string algorithm = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultPatch RecoveryServicesVaultPatch(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.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs index 970f1af13ff0..e16d90f121d0 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/api/Azure.ResourceManager.RecoveryServices.netstandard2.0.cs @@ -214,7 +214,8 @@ public static partial class ArmRecoveryServicesModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSecuritySettings RecoveryServicesSecuritySettings(Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState? immutabilityState, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings softDeleteSettings, Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization? multiUserAuthorization) { throw null; } public static Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSecuritySettings RecoveryServicesSecuritySettings(Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState? immutabilityState = default(Azure.ResourceManager.RecoveryServices.Models.ImmutabilityState?), Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSoftDeleteSettings softDeleteSettings = null, Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization? multiUserAuthorization = default(Azure.ResourceManager.RecoveryServices.Models.MultiUserAuthorization?), Azure.ResourceManager.RecoveryServices.Models.SourceScanConfiguration sourceScanConfiguration = null) { throw null; } - public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData RecoveryServicesVaultData(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.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData RecoveryServicesVaultData(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 = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultData RecoveryServicesVaultData(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.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.RecoveryServices.RecoveryServicesVaultExtendedInfoData RecoveryServicesVaultExtendedInfoData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string integrityKey = null, string encryptionKey = null, string encryptionKeyThumbprint = null, string algorithm = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesVaultPatch RecoveryServicesVaultPatch(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.RecoveryServices.Models.RecoveryServicesVaultProperties properties = null, Azure.ResourceManager.RecoveryServices.Models.RecoveryServicesSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Custom/ArmRecoveryServicesModelFactory.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Custom/ArmRecoveryServicesModelFactory.cs index 13705b9f7ff7..e225c93d8d01 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Custom/ArmRecoveryServicesModelFactory.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Custom/ArmRecoveryServicesModelFactory.cs @@ -25,5 +25,32 @@ public static VaultPropertiesRedundancySettings VaultPropertiesRedundancySetting { return new VaultPropertiesRedundancySettings(standardTierStorageRedundancy, crossRegionRestore, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Properties of the vault. + /// Identity for the resource. + /// Identifies the unique system identifier for each Azure resource. + /// etag for the resource. + /// A new instance for mocking. + public static RecoveryServicesVaultData RecoveryServicesVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity = null, RecoveryServicesVaultProperties properties = null, RecoveryServicesSku sku = null, ETag? etag = null) + { + return ArmRecoveryServicesModelFactory.RecoveryServicesVaultData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + sku, + etag); + } } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/ArmRecoveryServicesModelFactory.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/ArmRecoveryServicesModelFactory.cs index a23cbcb948a2..67a39a580e2c 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/ArmRecoveryServicesModelFactory.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/ArmRecoveryServicesModelFactory.cs @@ -49,12 +49,12 @@ public static RecoveryServicesPrivateLinkResourceData RecoveryServicesPrivateLin /// The systemData. /// The tags. /// The location. - /// Identity for the resource. /// Properties of the vault. + /// Identity for the resource. /// Identifies the unique system identifier for each Azure resource. /// etag for the resource. /// A new instance for mocking. - public static RecoveryServicesVaultData RecoveryServicesVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, RecoveryServicesVaultProperties properties = null, RecoveryServicesSku sku = null, ETag? etag = null) + public static RecoveryServicesVaultData RecoveryServicesVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RecoveryServicesVaultProperties properties = null, ManagedServiceIdentity identity = null, RecoveryServicesSku sku = null, ETag? etag = null) { tags ??= new Dictionary(); @@ -65,8 +65,8 @@ public static RecoveryServicesVaultData RecoveryServicesVaultData(ResourceIdenti systemData, tags, location, - identity, properties, + identity, sku, etag, serializedAdditionalRawData: null); diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs index 39b33c05807c..0bdec2ad3f61 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.Serialization.cs @@ -38,16 +38,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - ((IJsonModel)Identity).Write(writer, options); - } if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -80,8 +80,8 @@ internal static RecoveryServicesVaultData DeserializeRecoveryServicesVaultData(J { return null; } - ManagedServiceIdentity identity = default; RecoveryServicesVaultProperties properties = default; + ManagedServiceIdentity identity = default; RecoveryServicesSku sku = default; ETag? etag = default; IDictionary tags = default; @@ -94,22 +94,22 @@ internal static RecoveryServicesVaultData DeserializeRecoveryServicesVaultData(J Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerRecoveryServicesContext.Default); + properties = RecoveryServicesVaultProperties.DeserializeRecoveryServicesVaultProperties(property.Value, options); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = RecoveryServicesVaultProperties.DeserializeRecoveryServicesVaultProperties(property.Value, options); + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerRecoveryServicesContext.Default); continue; } if (property.NameEquals("sku"u8)) @@ -186,8 +186,8 @@ internal static RecoveryServicesVaultData DeserializeRecoveryServicesVaultData(J systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, properties, + identity, sku, etag, serializedAdditionalRawData); diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.cs index a47cc39882a1..dde1f5bfc665 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultData.cs @@ -64,15 +64,15 @@ public RecoveryServicesVaultData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Identity for the resource. /// Properties of the vault. + /// Identity for the resource. /// Identifies the unique system identifier for each Azure resource. /// etag for the resource. /// Keeps track of any properties unknown to the library. - internal RecoveryServicesVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, RecoveryServicesVaultProperties properties, RecoveryServicesSku sku, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal RecoveryServicesVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RecoveryServicesVaultProperties properties, ManagedServiceIdentity identity, RecoveryServicesSku sku, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; Properties = properties; + Identity = identity; Sku = sku; ETag = etag; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -83,10 +83,10 @@ internal RecoveryServicesVaultData() { } - /// Identity for the resource. - public ManagedServiceIdentity Identity { get; set; } /// Properties of the vault. public RecoveryServicesVaultProperties Properties { get; set; } + /// Identity for the resource. + public ManagedServiceIdentity Identity { get; set; } /// Identifies the unique system identifier for each Azure resource. public RecoveryServicesSku Sku { get; set; } /// etag for the resource. diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tests/Generated/Samples/Sample_RecoveryServicesVaultCollection.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tests/Generated/Samples/Sample_RecoveryServicesVaultCollection.cs index b1280eedb76d..08711ef7a9f5 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tests/Generated/Samples/Sample_RecoveryServicesVaultCollection.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tests/Generated/Samples/Sample_RecoveryServicesVaultCollection.cs @@ -44,11 +44,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRecoveryServicesVault() string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { - Identity = new ManagedServiceIdentity("SystemAssigned"), Properties = new RecoveryServicesVaultProperties { PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, }, + Identity = new ManagedServiceIdentity("SystemAssigned"), Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); @@ -87,13 +87,6 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultPerformingCriticalOperationW string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { - Identity = new ManagedServiceIdentity("UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")] = new UserAssignedIdentity() -}, - }, Properties = new RecoveryServicesVaultProperties { Encryption = new VaultPropertiesEncryption @@ -108,6 +101,13 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultPerformingCriticalOperationW PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, ResourceGuardOperationRequests = { "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourcegroups/ankurResourceGuard1/providers/Microsoft.DataProtection/resourceGuards/ResourceGuard38-1/modifyEncryptionSettings/default" }, }, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")] = new UserAssignedIdentity() +}, + }, Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); @@ -146,13 +146,6 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithCustomerManagedKeys() string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { - Identity = new ManagedServiceIdentity("UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")] = new UserAssignedIdentity() -}, - }, Properties = new RecoveryServicesVaultProperties { Encryption = new VaultPropertiesEncryption @@ -166,6 +159,13 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithCustomerManagedKeys() }, PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, }, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")] = new UserAssignedIdentity() +}, + }, Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); @@ -204,7 +204,6 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithMonitoringSetting() string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { - Identity = new ManagedServiceIdentity("SystemAssigned"), Properties = new RecoveryServicesVaultProperties { PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, @@ -223,6 +222,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithMonitoringSetting() }, }, }, + Identity = new ManagedServiceIdentity("SystemAssigned"), Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); @@ -261,7 +261,6 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithRedundancySetting() string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { - Identity = new ManagedServiceIdentity("SystemAssigned"), Properties = new RecoveryServicesVaultProperties { PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, @@ -271,6 +270,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithRedundancySetting() CrossRegionRestore = CrossRegionRestore.Enabled, }, }, + Identity = new ManagedServiceIdentity("SystemAssigned"), Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); @@ -309,7 +309,6 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithSourceScanConfiguration( string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { - Identity = new ManagedServiceIdentity("SystemAssigned"), Properties = new RecoveryServicesVaultProperties { PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, @@ -325,6 +324,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithSourceScanConfiguration( }, }, }, + Identity = new ManagedServiceIdentity("SystemAssigned"), Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); @@ -363,6 +363,10 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithUserAssignedIdentity() string vaultName = "swaggerExample"; RecoveryServicesVaultData data = new RecoveryServicesVaultData(new AzureLocation("West US")) { + Properties = new RecoveryServicesVaultProperties + { + PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, + }, Identity = new ManagedServiceIdentity("UserAssigned") { UserAssignedIdentities = @@ -370,10 +374,6 @@ public async Task CreateOrUpdate_CreateOrUpdateVaultWithUserAssignedIdentity() [new ResourceIdentifier("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")] = new UserAssignedIdentity() }, }, - Properties = new RecoveryServicesVaultProperties - { - PublicNetworkAccess = VaultPublicNetworkAccess.Enabled, - }, Sku = new RecoveryServicesSku(RecoveryServicesSkuName.Standard), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tsp-location.yaml b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tsp-location.yaml index 4f31cde7a4ac..8f339d48f95b 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tsp-location.yaml +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/recoveryservices/RecoveryServices.Management +directory: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/RecoveryServices repo: Azure/azure-rest-api-specs -commit: ca2020cf5a4953c007f54135db73652bb94dd408 +commit: 1004eed4202d64b48157c084fe2830760f8190f4 additionalDirectories: [] diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 3077ad713280..2d364253ab3d 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -11,218 +11,6 @@ trigger: - sdk/resourcemanager - common/ManagementTestShared - common/ManagementCoreShared - - sdk/advisor/Azure.ResourceManager.Advisor - - sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform - - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform - - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement - - sdk/analysisservices/Azure.ResourceManager.Analysis - - sdk/apicenter/Azure.ResourceManager.ApiCenter - - sdk/apimanagement/Azure.ResourceManager.ApiManagement - - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation - - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration - - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights - - sdk/appplatform/Azure.ResourceManager.AppPlatform - - sdk/arc-scvmm/Azure.ResourceManager.ScVmm - - sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval - - sdk/astronomer/Azure.ResourceManager.Astro - - sdk/attestation/Azure.ResourceManager.Attestation - - sdk/authorization/Azure.ResourceManager.Authorization - - sdk/automanage/Azure.ResourceManager.Automanage - - sdk/automation/Azure.ResourceManager.Automation - - sdk/avs/Azure.ResourceManager.Avs - - sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance - - sdk/azurestackhci/Azure.ResourceManager.Hci - - sdk/batch/Azure.ResourceManager.Batch - - sdk/billing/Azure.ResourceManager.Billing - - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits - - sdk/blueprint/Azure.ResourceManager.Blueprint - - sdk/botservice/Azure.ResourceManager.BotService - - sdk/carbon/Azure.ResourceManager.CarbonOptimization - - sdk/cdn/Azure.ResourceManager.Cdn - - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - - sdk/chaos/Azure.ResourceManager.Chaos - - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices - - sdk/communication/Azure.ResourceManager.Communication - - sdk/compute/Azure.ResourceManager.Compute - - sdk/computefleet/Azure.ResourceManager.ComputeFleet - - sdk/computeschedule/Azure.ResourceManager.ComputeSchedule - - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger - - sdk/confluent/Azure.ResourceManager.Confluent - - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere - - sdk/consumption/Azure.ResourceManager.Consumption - - sdk/containerapps/Azure.ResourceManager.AppContainers - - sdk/containerinstance/Azure.ResourceManager.ContainerInstance - - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - - sdk/containerservice/Azure.ResourceManager.ContainerService - - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - - sdk/costmanagement/Azure.ResourceManager.CostManagement - - sdk/customer-insights/Azure.ResourceManager.CustomerInsights - - sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher - - sdk/databox/Azure.ResourceManager.DataBox - - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - - sdk/datadog/Azure.ResourceManager.Datadog - - sdk/datafactory/Azure.ResourceManager.DataFactory - - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics - - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - - sdk/datamigration/Azure.ResourceManager.DataMigration - - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - - sdk/datashare/Azure.ResourceManager.DataShare - - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - - sdk/dellstorage/Azure.ResourceManager.Dell.Storage - - sdk/dependencymap/Azure.ResourceManager.DependencyMap - - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - - sdk/devcenter/Azure.ResourceManager.DevCenter - - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices - - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry - - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate - - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure - - sdk/devspaces/Azure.ResourceManager.DevSpaces - - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs - - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - - sdk/dns/Azure.ResourceManager.Dns - - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - - sdk/durabletask/Azure.ResourceManager.DurableTask - - sdk/dynatrace/Azure.ResourceManager.Dynatrace - - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/edgezones/Azure.ResourceManager.EdgeZones - - sdk/elastic/Azure.ResourceManager.Elastic - - sdk/elasticsan/Azure.ResourceManager.ElasticSan - - sdk/eventgrid/Azure.ResourceManager.EventGrid - - sdk/eventhub/Azure.ResourceManager.EventHubs - - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/fabric/Azure.ResourceManager.Fabric - - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet - - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - - sdk/frontdoor/Azure.ResourceManager.FrontDoor - - sdk/grafana/Azure.ResourceManager.Grafana - - sdk/graphservices/Azure.ResourceManager.GraphServices - - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration - - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules - - sdk/hdinsight/Azure.ResourceManager.HDInsight - - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers - - sdk/healthbot/Azure.ResourceManager.HealthBot - - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis - - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices - - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork - - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement - - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - - sdk/iotcentral/Azure.ResourceManager.IotCentral - - sdk/iothub/Azure.ResourceManager.IotHub - - sdk/iotoperations/Azure.ResourceManager.IotOperations - - sdk/keyvault/Azure.ResourceManager.KeyVault - - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - - sdk/kusto/Azure.ResourceManager.Kusto - - sdk/labservices/Azure.ResourceManager.LabServices - - sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute - - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - - sdk/logic/Azure.ResourceManager.Logic - - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute - - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - - sdk/maintenance/Azure.ResourceManager.Maintenance - - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork - - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric - - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities - - sdk/managedservices/Azure.ResourceManager.ManagedServices - - sdk/managementpartner/Azure.ResourceManager.ManagementPartner - - sdk/maps/Azure.ResourceManager.Maps - - sdk/marketplace/Azure.ResourceManager.Marketplace - - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - - sdk/mediaservices/Azure.ResourceManager.Media - - sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment - - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap - - sdk/mixedreality/Azure.ResourceManager.MixedReality - - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork - - sdk/mongocluster/Azure.ResourceManager.MongoCluster - - sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas - - sdk/monitor/Azure.ResourceManager.Monitor - - sdk/mysql/Azure.ResourceManager.MySql - - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres - - sdk/netapp/Azure.ResourceManager.NetApp - - sdk/network/Azure.ResourceManager.Network - - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics - - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - - sdk/networkfunction/Azure.ResourceManager.NetworkFunction - - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability - - sdk/nginx/Azure.ResourceManager.Nginx - - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs - - sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation - - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - - sdk/oracle/Azure.ResourceManager.OracleDatabase - - sdk/orbital/Azure.ResourceManager.Orbital - - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - - sdk/peering/Azure.ResourceManager.Peering - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB - - sdk/PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer - - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting - - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - - sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot - - sdk/postgresql/Azure.ResourceManager.PostgreSql - - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated - - sdk/privatedns/Azure.ResourceManager.PrivateDns - - sdk/providerhub/Azure.ResourceManager.ProviderHub - - sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock - - sdk/purview/Azure.ResourceManager.Purview - - sdk/quantum/Azure.ResourceManager.Quantum - - sdk/qumulo/Azure.ResourceManager.Qumulo - - sdk/quota/Azure.ResourceManager.Quota - - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - - sdk/redis/Azure.ResourceManager.Redis - - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - - sdk/relay/Azure.ResourceManager.Relay - - sdk/reservations/Azure.ResourceManager.Reservations - - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - - sdk/resourcemover/Azure.ResourceManager.ResourceMover - - sdk/resources/Azure.ResourceManager.Resources - - sdk/search/Azure.ResourceManager.Search - - sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension - - sdk/securitycenter/Azure.ResourceManager.SecurityCenter - - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps - - sdk/securityinsights/Azure.ResourceManager.SecurityInsights - - sdk/selfhelp/Azure.ResourceManager.SelfHelp - - sdk/servicebus/Azure.ResourceManager.ServiceBus - - sdk/servicefabric/Azure.ResourceManager.ServiceFabric - - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters - - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - - sdk/signalr/Azure.ResourceManager.SignalR - - sdk/sitemanager/Azure.ResourceManager.SiteManager - - sdk/sphere/Azure.ResourceManager.Sphere - - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery - - sdk/sqlmanagement/Azure.ResourceManager.Sql - - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine - - sdk/standbypool/Azure.ResourceManager.StandbyPool - - sdk/storage/Azure.ResourceManager.Storage - - sdk/storageactions/Azure.ResourceManager.StorageActions - - sdk/storagecache/Azure.ResourceManager.StorageCache - - sdk/storagemover/Azure.ResourceManager.StorageMover - - sdk/storagepool/Azure.ResourceManager.StoragePool - - sdk/storagesync/Azure.ResourceManager.StorageSync - - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics - - sdk/subscription/Azure.ResourceManager.Subscription - - sdk/support/Azure.ResourceManager.Support - - sdk/synapse/Azure.ResourceManager.Synapse - - sdk/terraform/Azure.ResourceManager.Terraform - - sdk/trafficmanager/Azure.ResourceManager.TrafficManager - - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning - - sdk/voiceservices/Azure.ResourceManager.VoiceServices - - sdk/webpubsub/Azure.ResourceManager.WebPubSub - - sdk/websites/Azure.ResourceManager.AppService - - sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases - - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - - sdk/workloads/Azure.ResourceManager.Workloads - - sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance pr: branches: @@ -236,218 +24,6 @@ pr: - sdk/resourcemanager - common/ManagementTestShared - common/ManagementCoreShared - - sdk/advisor/Azure.ResourceManager.Advisor - - sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform - - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform - - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement - - sdk/analysisservices/Azure.ResourceManager.Analysis - - sdk/apicenter/Azure.ResourceManager.ApiCenter - - sdk/apimanagement/Azure.ResourceManager.ApiManagement - - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation - - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration - - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights - - sdk/appplatform/Azure.ResourceManager.AppPlatform - - sdk/arc-scvmm/Azure.ResourceManager.ScVmm - - sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval - - sdk/astronomer/Azure.ResourceManager.Astro - - sdk/attestation/Azure.ResourceManager.Attestation - - sdk/authorization/Azure.ResourceManager.Authorization - - sdk/automanage/Azure.ResourceManager.Automanage - - sdk/automation/Azure.ResourceManager.Automation - - sdk/avs/Azure.ResourceManager.Avs - - sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance - - sdk/azurestackhci/Azure.ResourceManager.Hci - - sdk/batch/Azure.ResourceManager.Batch - - sdk/billing/Azure.ResourceManager.Billing - - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits - - sdk/blueprint/Azure.ResourceManager.Blueprint - - sdk/botservice/Azure.ResourceManager.BotService - - sdk/carbon/Azure.ResourceManager.CarbonOptimization - - sdk/cdn/Azure.ResourceManager.Cdn - - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - - sdk/chaos/Azure.ResourceManager.Chaos - - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices - - sdk/communication/Azure.ResourceManager.Communication - - sdk/compute/Azure.ResourceManager.Compute - - sdk/computefleet/Azure.ResourceManager.ComputeFleet - - sdk/computeschedule/Azure.ResourceManager.ComputeSchedule - - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger - - sdk/confluent/Azure.ResourceManager.Confluent - - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere - - sdk/consumption/Azure.ResourceManager.Consumption - - sdk/containerapps/Azure.ResourceManager.AppContainers - - sdk/containerinstance/Azure.ResourceManager.ContainerInstance - - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - - sdk/containerservice/Azure.ResourceManager.ContainerService - - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - - sdk/costmanagement/Azure.ResourceManager.CostManagement - - sdk/customer-insights/Azure.ResourceManager.CustomerInsights - - sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher - - sdk/databox/Azure.ResourceManager.DataBox - - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - - sdk/datadog/Azure.ResourceManager.Datadog - - sdk/datafactory/Azure.ResourceManager.DataFactory - - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics - - sdk/datalake-store/Azure.ResourceManager.DataLakeStore - - sdk/datamigration/Azure.ResourceManager.DataMigration - - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup - - sdk/datashare/Azure.ResourceManager.DataShare - - sdk/defendereasm/Azure.ResourceManager.DefenderEasm - - sdk/dellstorage/Azure.ResourceManager.Dell.Storage - - sdk/dependencymap/Azure.ResourceManager.DependencyMap - - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization - - sdk/devcenter/Azure.ResourceManager.DevCenter - - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices - - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry - - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate - - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure - - sdk/devspaces/Azure.ResourceManager.DevSpaces - - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs - - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - - sdk/dns/Azure.ResourceManager.Dns - - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - - sdk/durabletask/Azure.ResourceManager.DurableTask - - sdk/dynatrace/Azure.ResourceManager.Dynatrace - - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/edgezones/Azure.ResourceManager.EdgeZones - - sdk/elastic/Azure.ResourceManager.Elastic - - sdk/elasticsan/Azure.ResourceManager.ElasticSan - - sdk/eventgrid/Azure.ResourceManager.EventGrid - - sdk/eventhub/Azure.ResourceManager.EventHubs - - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations - - sdk/fabric/Azure.ResourceManager.Fabric - - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet - - sdk/fluidrelay/Azure.ResourceManager.FluidRelay - - sdk/frontdoor/Azure.ResourceManager.FrontDoor - - sdk/grafana/Azure.ResourceManager.Grafana - - sdk/graphservices/Azure.ResourceManager.GraphServices - - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration - - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules - - sdk/hdinsight/Azure.ResourceManager.HDInsight - - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers - - sdk/healthbot/Azure.ResourceManager.HealthBot - - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis - - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices - - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork - - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement - - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - - sdk/iotcentral/Azure.ResourceManager.IotCentral - - sdk/iothub/Azure.ResourceManager.IotHub - - sdk/iotoperations/Azure.ResourceManager.IotOperations - - sdk/keyvault/Azure.ResourceManager.KeyVault - - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - - sdk/kusto/Azure.ResourceManager.Kusto - - sdk/labservices/Azure.ResourceManager.LabServices - - sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute - - sdk/loadtestservice/Azure.ResourceManager.LoadTesting - - sdk/logic/Azure.ResourceManager.Logic - - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute - - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning - - sdk/maintenance/Azure.ResourceManager.Maintenance - - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork - - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric - - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities - - sdk/managedservices/Azure.ResourceManager.ManagedServices - - sdk/managementpartner/Azure.ResourceManager.ManagementPartner - - sdk/maps/Azure.ResourceManager.Maps - - sdk/marketplace/Azure.ResourceManager.Marketplace - - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - - sdk/mediaservices/Azure.ResourceManager.Media - - sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment - - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap - - sdk/mixedreality/Azure.ResourceManager.MixedReality - - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork - - sdk/mongocluster/Azure.ResourceManager.MongoCluster - - sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas - - sdk/monitor/Azure.ResourceManager.Monitor - - sdk/mysql/Azure.ResourceManager.MySql - - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres - - sdk/netapp/Azure.ResourceManager.NetApp - - sdk/network/Azure.ResourceManager.Network - - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics - - sdk/networkcloud/Azure.ResourceManager.NetworkCloud - - sdk/networkfunction/Azure.ResourceManager.NetworkFunction - - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability - - sdk/nginx/Azure.ResourceManager.Nginx - - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs - - sdk/onlineexperimentation/Azure.ResourceManager.OnlineExperimentation - - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - - sdk/oracle/Azure.ResourceManager.OracleDatabase - - sdk/orbital/Azure.ResourceManager.Orbital - - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - - sdk/peering/Azure.ResourceManager.Peering - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB - - sdk/PlanetaryComputer/Azure.ResourceManager.PlanetaryComputer - - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting - - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - - sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot - - sdk/postgresql/Azure.ResourceManager.PostgreSql - - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated - - sdk/privatedns/Azure.ResourceManager.PrivateDns - - sdk/providerhub/Azure.ResourceManager.ProviderHub - - sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock - - sdk/purview/Azure.ResourceManager.Purview - - sdk/quantum/Azure.ResourceManager.Quantum - - sdk/qumulo/Azure.ResourceManager.Qumulo - - sdk/quota/Azure.ResourceManager.Quota - - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - - sdk/redis/Azure.ResourceManager.Redis - - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - - sdk/relay/Azure.ResourceManager.Relay - - sdk/reservations/Azure.ResourceManager.Reservations - - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - - sdk/resourcemover/Azure.ResourceManager.ResourceMover - - sdk/resources/Azure.ResourceManager.Resources - - sdk/search/Azure.ResourceManager.Search - - sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension - - sdk/securitycenter/Azure.ResourceManager.SecurityCenter - - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps - - sdk/securityinsights/Azure.ResourceManager.SecurityInsights - - sdk/selfhelp/Azure.ResourceManager.SelfHelp - - sdk/servicebus/Azure.ResourceManager.ServiceBus - - sdk/servicefabric/Azure.ResourceManager.ServiceFabric - - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters - - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - - sdk/signalr/Azure.ResourceManager.SignalR - - sdk/sitemanager/Azure.ResourceManager.SiteManager - - sdk/sphere/Azure.ResourceManager.Sphere - - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery - - sdk/sqlmanagement/Azure.ResourceManager.Sql - - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine - - sdk/standbypool/Azure.ResourceManager.StandbyPool - - sdk/storage/Azure.ResourceManager.Storage - - sdk/storageactions/Azure.ResourceManager.StorageActions - - sdk/storagecache/Azure.ResourceManager.StorageCache - - sdk/storagemover/Azure.ResourceManager.StorageMover - - sdk/storagepool/Azure.ResourceManager.StoragePool - - sdk/storagesync/Azure.ResourceManager.StorageSync - - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics - - sdk/subscription/Azure.ResourceManager.Subscription - - sdk/support/Azure.ResourceManager.Support - - sdk/synapse/Azure.ResourceManager.Synapse - - sdk/terraform/Azure.ResourceManager.Terraform - - sdk/trafficmanager/Azure.ResourceManager.TrafficManager - - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning - - sdk/voiceservices/Azure.ResourceManager.VoiceServices - - sdk/webpubsub/Azure.ResourceManager.WebPubSub - - sdk/websites/Azure.ResourceManager.AppService - - sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases - - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - - sdk/workloads/Azure.ResourceManager.Workloads - - sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/Azure.ResourceManager.Resources.Bicep.sln b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Azure.ResourceManager.Resources.Bicep.sln new file mode 100644 index 000000000000..55f99f44e20c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Azure.ResourceManager.Resources.Bicep.sln @@ -0,0 +1,51 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{C4398841-2364-4283-9193-6436A82922AA}") = "Azure.ResourceManager.Resources.Bicep", "src\Azure.ResourceManager.Resources.Bicep.csproj", "{67A00D95-333C-481C-8F00-C5E096E6AEB2}" +EndProject +Project("{C4398841-2364-4283-9193-6436A82922AA}") = "Azure.ResourceManager.Resources.Bicep.Tests", "tests\Azure.ResourceManager.Resources.Bicep.Tests.csproj", "{FFDAD11E-3374-405A-878A-853F23D8C501}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3E85CC71-2C11-4582-95B4-1363982FBC1E} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x64.ActiveCfg = Debug|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x64.Build.0 = Debug|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x86.ActiveCfg = Debug|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Debug|x86.Build.0 = Debug|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|Any CPU.Build.0 = Release|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x64.ActiveCfg = Release|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x64.Build.0 = Release|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x86.ActiveCfg = Release|Any CPU + {67A00D95-333C-481C-8F00-C5E096E6AEB2}.Release|x86.Build.0 = Release|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x64.ActiveCfg = Debug|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x64.Build.0 = Debug|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x86.ActiveCfg = Debug|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Debug|x86.Build.0 = Debug|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|Any CPU.Build.0 = Release|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x64.ActiveCfg = Release|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x64.Build.0 = Release|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x86.ActiveCfg = Release|Any CPU + {FFDAD11E-3374-405A-878A-853F23D8C501}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/CHANGELOG.md b/sdk/resources/Azure.ResourceManager.Resources.Bicep/CHANGELOG.md new file mode 100644 index 000000000000..1a85987a15b9 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/CHANGELOG.md @@ -0,0 +1,19 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + + + +### Features Added + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). + +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Directory.Build.props b/sdk/resources/Azure.ResourceManager.Resources.Bicep/Directory.Build.props similarity index 100% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/Directory.Build.props rename to sdk/resources/Azure.ResourceManager.Resources.Bicep/Directory.Build.props diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/README.md b/sdk/resources/Azure.ResourceManager.Resources.Bicep/README.md new file mode 100644 index 000000000000..018b94a8403a --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Bicep management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure Bicep management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Resources.Bicep --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.net8.0.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.net8.0.cs new file mode 100644 index 000000000000..49651f4049b0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.net8.0.cs @@ -0,0 +1,66 @@ +namespace Azure.ResourceManager.Resources.Bicep +{ + public partial class AzureResourceManagerResourcesBicepContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerResourcesBicepContext() { } + public static Azure.ResourceManager.Resources.Bicep.AzureResourceManagerResourcesBicepContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public static partial class ResourcesBicepExtensions + { + public static Azure.Response BicepDecompileOperationGroup(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Resources.Bicep.Mocking +{ + public partial class MockableResourcesBicepSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableResourcesBicepSubscriptionResource() { } + public virtual Azure.Response BicepDecompileOperationGroup(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Resources.Bicep.Models +{ + public static partial class ArmResourcesBicepModelFactory + { + public static Azure.ResourceManager.Resources.Bicep.Models.DecompiledFileDefinition DecompiledFileDefinition(string path = null, string contents = null) { throw null; } + public static Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResult DecompileOperationSuccessResult(System.Collections.Generic.IEnumerable files = null, string entryPoint = null) { throw null; } + } + public partial class DecompiledFileDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DecompiledFileDefinition() { } + public string Contents { get { throw null; } } + public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Bicep.Models.DecompiledFileDefinition 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.Resources.Bicep.Models.DecompiledFileDefinition 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 DecompileOperationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DecompileOperationContent(string template) { } + public string Template { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent 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.Resources.Bicep.Models.DecompileOperationContent 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 DecompileOperationSuccessResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DecompileOperationSuccessResult() { } + public string EntryPoint { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Files { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResult 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.Resources.Bicep.Models.DecompileOperationSuccessResult 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/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.netstandard2.0.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.netstandard2.0.cs new file mode 100644 index 000000000000..49651f4049b0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/api/Azure.ResourceManager.Resources.Bicep.netstandard2.0.cs @@ -0,0 +1,66 @@ +namespace Azure.ResourceManager.Resources.Bicep +{ + public partial class AzureResourceManagerResourcesBicepContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerResourcesBicepContext() { } + public static Azure.ResourceManager.Resources.Bicep.AzureResourceManagerResourcesBicepContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public static partial class ResourcesBicepExtensions + { + public static Azure.Response BicepDecompileOperationGroup(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Resources.Bicep.Mocking +{ + public partial class MockableResourcesBicepSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableResourcesBicepSubscriptionResource() { } + public virtual Azure.Response BicepDecompileOperationGroup(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BicepDecompileOperationGroupAsync(Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Resources.Bicep.Models +{ + public static partial class ArmResourcesBicepModelFactory + { + public static Azure.ResourceManager.Resources.Bicep.Models.DecompiledFileDefinition DecompiledFileDefinition(string path = null, string contents = null) { throw null; } + public static Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResult DecompileOperationSuccessResult(System.Collections.Generic.IEnumerable files = null, string entryPoint = null) { throw null; } + } + public partial class DecompiledFileDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DecompiledFileDefinition() { } + public string Contents { get { throw null; } } + public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Bicep.Models.DecompiledFileDefinition 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.Resources.Bicep.Models.DecompiledFileDefinition 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 DecompileOperationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DecompileOperationContent(string template) { } + public string Template { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationContent 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.Resources.Bicep.Models.DecompileOperationContent 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 DecompileOperationSuccessResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DecompileOperationSuccessResult() { } + public string EntryPoint { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Files { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Bicep.Models.DecompileOperationSuccessResult 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.Resources.Bicep.Models.DecompileOperationSuccessResult 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/resources/Azure.ResourceManager.Resources.Bicep/assets.json b/sdk/resources/Azure.ResourceManager.Resources.Bicep/assets.json new file mode 100644 index 000000000000..609258334939 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/bicep/Azure.ResourceManager.Resources.Bicep", + "Tag": "net/bicep/Azure.ResourceManager.Resources.Bicep_f735123855" +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Azure.ResourceManager.Resources.Bicep.csproj b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Azure.ResourceManager.Resources.Bicep.csproj new file mode 100644 index 000000000000..0199c5a66677 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Azure.ResourceManager.Resources.Bicep.csproj @@ -0,0 +1,9 @@ + + + 1.0.0-beta.1 + Azure.ResourceManager.Resources.Bicep + Azure Resource Manager client SDK for Azure resource provider Bicep. + azure;management;arm;resource manager;bicep + true + + diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ArmResourcesBicepModelFactory.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ArmResourcesBicepModelFactory.cs new file mode 100644 index 000000000000..74a2b9578bf4 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ArmResourcesBicepModelFactory.cs @@ -0,0 +1,37 @@ +// 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.Resources.Bicep.Models +{ + /// Model factory for models. + public static partial class ArmResourcesBicepModelFactory + { + /// Initializes a new instance of . + /// An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template. + /// The file path to the main Bicep file generated from the decompiled ARM json template. + /// A new instance for mocking. + public static DecompileOperationSuccessResult DecompileOperationSuccessResult(IEnumerable files = null, string entryPoint = null) + { + files ??= new List(); + + return new DecompileOperationSuccessResult(files?.ToList(), entryPoint, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The file path of the Bicep file. + /// The contents of the Bicep file. + /// A new instance for mocking. + public static DecompiledFileDefinition DecompiledFileDefinition(string path = null, string contents = null) + { + return new DecompiledFileDefinition(path, contents, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/MockableResourcesBicepSubscriptionResource.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/MockableResourcesBicepSubscriptionResource.cs new file mode 100644 index 000000000000..546b3083a536 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/MockableResourcesBicepSubscriptionResource.cs @@ -0,0 +1,120 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources.Bicep.Models; + +namespace Azure.ResourceManager.Resources.Bicep.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableResourcesBicepSubscriptionResource : ArmResource + { + private ClientDiagnostics _decompileOperationGroupClientDiagnostics; + private DecompileOperationGroupRestOperations _decompileOperationGroupRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableResourcesBicepSubscriptionResource() + { + } + + /// 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 MockableResourcesBicepSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics DecompileOperationGroupClientDiagnostics => _decompileOperationGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources.Bicep", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private DecompileOperationGroupRestOperations DecompileOperationGroupRestClient => _decompileOperationGroupRestClient ??= new DecompileOperationGroupRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Decompiles an ARM json template into a Bicep template + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep + /// + /// + /// Operation Id + /// DecompileOperationGroup_Bicep + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> BicepDecompileOperationGroupAsync(DecompileOperationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = DecompileOperationGroupClientDiagnostics.CreateScope("MockableResourcesBicepSubscriptionResource.BicepDecompileOperationGroup"); + scope.Start(); + try + { + var response = await DecompileOperationGroupRestClient.BicepAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Decompiles an ARM json template into a Bicep template + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep + /// + /// + /// Operation Id + /// DecompileOperationGroup_Bicep + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response BicepDecompileOperationGroup(DecompileOperationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = DecompileOperationGroupClientDiagnostics.CreateScope("MockableResourcesBicepSubscriptionResource.BicepDecompileOperationGroup"); + scope.Start(); + try + { + var response = DecompileOperationGroupRestClient.Bicep(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/ResourcesBicepExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/ResourcesBicepExtensions.cs new file mode 100644 index 000000000000..8de915ce6dbc --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Extensions/ResourcesBicepExtensions.cs @@ -0,0 +1,88 @@ +// 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.ResourceManager.Resources.Bicep.Mocking; +using Azure.ResourceManager.Resources.Bicep.Models; + +namespace Azure.ResourceManager.Resources.Bicep +{ + /// A class to add extension methods to Azure.ResourceManager.Resources.Bicep. + public static partial class ResourcesBicepExtensions + { + private static MockableResourcesBicepSubscriptionResource GetMockableResourcesBicepSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableResourcesBicepSubscriptionResource(client, resource.Id)); + } + + /// + /// Decompiles an ARM json template into a Bicep template + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep + /// + /// + /// Operation Id + /// DecompileOperationGroup_Bicep + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// + /// Mocking + /// 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> BicepDecompileOperationGroupAsync(this SubscriptionResource subscriptionResource, DecompileOperationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableResourcesBicepSubscriptionResource(subscriptionResource).BicepDecompileOperationGroupAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Decompiles an ARM json template into a Bicep template + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep + /// + /// + /// Operation Id + /// DecompileOperationGroup_Bicep + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// + /// Mocking + /// 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 BicepDecompileOperationGroup(this SubscriptionResource subscriptionResource, DecompileOperationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableResourcesBicepSubscriptionResource(subscriptionResource).BicepDecompileOperationGroup(content, cancellationToken); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Argument.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..3c71aa52958b --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + 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/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..87acdd6380e1 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingList.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..cfab02b1951d --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..fb351a6b8e29 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,409 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal static 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()); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var 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(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + 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"); + } + + public static string GetRequiredString(this JsonElement element) + { + var 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}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + 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/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Optional.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..4e82453f1cde --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..8a048370d4bf --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + 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; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/AzureResourceManagerResourcesBicepContext.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/AzureResourceManagerResourcesBicepContext.cs new file mode 100644 index 000000000000..7f8cfd10013a --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/AzureResourceManagerResourcesBicepContext.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using Azure.ResourceManager.Resources.Bicep.Models; + +namespace Azure.ResourceManager.Resources.Bicep +{ + /// + /// 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' + /// + [ModelReaderWriterBuildable(typeof(DecompiledFileDefinition))] + [ModelReaderWriterBuildable(typeof(DecompileOperationContent))] + [ModelReaderWriterBuildable(typeof(DecompileOperationSuccessResult))] + [ModelReaderWriterBuildable(typeof(ResponseError))] + public partial class AzureResourceManagerResourcesBicepContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationContent.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationContent.Serialization.cs new file mode 100644 index 000000000000..e9c450dac6ca --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationContent.Serialization.cs @@ -0,0 +1,126 @@ +// 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.Resources.Bicep.Models +{ + public partial class DecompileOperationContent : 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(DecompileOperationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("template"u8); + writer.WriteStringValue(Template); + 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 + } + } + } + + DecompileOperationContent 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(DecompileOperationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDecompileOperationContent(document.RootElement, options); + } + + internal static DecompileOperationContent DeserializeDecompileOperationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string template = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("template"u8)) + { + template = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DecompileOperationContent(template, 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, AzureResourceManagerResourcesBicepContext.Default); + default: + throw new FormatException($"The model {nameof(DecompileOperationContent)} does not support writing '{options.Format}' format."); + } + } + + DecompileOperationContent 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 DeserializeDecompileOperationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DecompileOperationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationContent.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationContent.cs new file mode 100644 index 000000000000..ecd6e8c9b6bd --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Bicep.Models +{ + /// The body of the request for the decompileBicep operation. + public partial class DecompileOperationContent + { + /// + /// 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 ARM json template to be decompiled into a Bicep file. + /// is null. + public DecompileOperationContent(string template) + { + Argument.AssertNotNull(template, nameof(template)); + + Template = template; + } + + /// Initializes a new instance of . + /// The ARM json template to be decompiled into a Bicep file. + /// Keeps track of any properties unknown to the library. + internal DecompileOperationContent(string template, IDictionary serializedAdditionalRawData) + { + Template = template; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DecompileOperationContent() + { + } + + /// The ARM json template to be decompiled into a Bicep file. + public string Template { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationSuccessResult.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationSuccessResult.Serialization.cs new file mode 100644 index 000000000000..1cc004a2cfbc --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationSuccessResult.Serialization.cs @@ -0,0 +1,144 @@ +// 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.Resources.Bicep.Models +{ + public partial class DecompileOperationSuccessResult : 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(DecompileOperationSuccessResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("files"u8); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("entryPoint"u8); + writer.WriteStringValue(EntryPoint); + 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 + } + } + } + + DecompileOperationSuccessResult 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(DecompileOperationSuccessResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDecompileOperationSuccessResult(document.RootElement, options); + } + + internal static DecompileOperationSuccessResult DeserializeDecompileOperationSuccessResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList files = default; + string entryPoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("files"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DecompiledFileDefinition.DeserializeDecompiledFileDefinition(item, options)); + } + files = array; + continue; + } + if (property.NameEquals("entryPoint"u8)) + { + entryPoint = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DecompileOperationSuccessResult(files, entryPoint, 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, AzureResourceManagerResourcesBicepContext.Default); + default: + throw new FormatException($"The model {nameof(DecompileOperationSuccessResult)} does not support writing '{options.Format}' format."); + } + } + + DecompileOperationSuccessResult 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 DeserializeDecompileOperationSuccessResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DecompileOperationSuccessResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationSuccessResult.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationSuccessResult.cs new file mode 100644 index 000000000000..9f88df60ffa5 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompileOperationSuccessResult.cs @@ -0,0 +1,83 @@ +// 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.Resources.Bicep.Models +{ + /// The response of the decompileBicep operation. + public partial class DecompileOperationSuccessResult + { + /// + /// 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 . + /// An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template. + /// The file path to the main Bicep file generated from the decompiled ARM json template. + /// or is null. + internal DecompileOperationSuccessResult(IEnumerable files, string entryPoint) + { + Argument.AssertNotNull(files, nameof(files)); + Argument.AssertNotNull(entryPoint, nameof(entryPoint)); + + Files = files.ToList(); + EntryPoint = entryPoint; + } + + /// Initializes a new instance of . + /// An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template. + /// The file path to the main Bicep file generated from the decompiled ARM json template. + /// Keeps track of any properties unknown to the library. + internal DecompileOperationSuccessResult(IReadOnlyList files, string entryPoint, IDictionary serializedAdditionalRawData) + { + Files = files; + EntryPoint = entryPoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DecompileOperationSuccessResult() + { + } + + /// An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template. + public IReadOnlyList Files { get; } + /// The file path to the main Bicep file generated from the decompiled ARM json template. + public string EntryPoint { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompiledFileDefinition.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompiledFileDefinition.Serialization.cs new file mode 100644 index 000000000000..c002b1ccfb3c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompiledFileDefinition.Serialization.cs @@ -0,0 +1,140 @@ +// 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.Resources.Bicep.Models +{ + public partial class DecompiledFileDefinition : 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(DecompiledFileDefinition)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Contents)) + { + writer.WritePropertyName("contents"u8); + writer.WriteStringValue(Contents); + } + 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 + } + } + } + + DecompiledFileDefinition 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(DecompiledFileDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDecompiledFileDefinition(document.RootElement, options); + } + + internal static DecompiledFileDefinition DeserializeDecompiledFileDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + string contents = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("contents"u8)) + { + contents = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DecompiledFileDefinition(path, contents, 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, AzureResourceManagerResourcesBicepContext.Default); + default: + throw new FormatException($"The model {nameof(DecompiledFileDefinition)} does not support writing '{options.Format}' format."); + } + } + + DecompiledFileDefinition 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 DeserializeDecompiledFileDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DecompiledFileDefinition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompiledFileDefinition.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompiledFileDefinition.cs new file mode 100644 index 000000000000..d02f5bfdeff5 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/Models/DecompiledFileDefinition.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Bicep.Models +{ + /// The definition of a file along with its contents. + public partial class DecompiledFileDefinition + { + /// + /// 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 . + internal DecompiledFileDefinition() + { + } + + /// Initializes a new instance of . + /// The file path of the Bicep file. + /// The contents of the Bicep file. + /// Keeps track of any properties unknown to the library. + internal DecompiledFileDefinition(string path, string contents, IDictionary serializedAdditionalRawData) + { + Path = path; + Contents = contents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The file path of the Bicep file. + public string Path { get; } + /// The contents of the Bicep file. + public string Contents { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ProviderConstants.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..cfd7cc573a23 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/RestOperations/DecompileOperationGroupRestOperations.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/RestOperations/DecompileOperationGroupRestOperations.cs new file mode 100644 index 000000000000..7cce896449ad --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Generated/RestOperations/DecompileOperationGroupRestOperations.cs @@ -0,0 +1,125 @@ +// 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.Resources.Bicep.Models; + +namespace Azure.ResourceManager.Resources.Bicep +{ + internal partial class DecompileOperationGroupRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DecompileOperationGroupRestOperations. + /// 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 DecompileOperationGroupRestOperations(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 ?? "2023-11-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateBicepRequestUri(string subscriptionId, DecompileOperationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Resources/decompileBicep", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateBicepRequest(string subscriptionId, DecompileOperationContent 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("/providers/Microsoft.Resources/decompileBicep", 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; + } + + /// Decompiles an ARM json template into a Bicep template. + /// The ID of the target subscription. The value must be an UUID. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> BicepAsync(string subscriptionId, DecompileOperationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBicepRequest(subscriptionId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DecompileOperationSuccessResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DecompileOperationSuccessResult.DeserializeDecompileOperationSuccessResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Decompiles an ARM json template into a Bicep template. + /// The ID of the target subscription. The value must be an UUID. + /// The request body. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Bicep(string subscriptionId, DecompileOperationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBicepRequest(subscriptionId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DecompileOperationSuccessResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DecompileOperationSuccessResult.DeserializeDecompileOperationSuccessResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Properties/AssemblyInfo.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5203e5177abd --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("Bicep")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.Resources.Bicep.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/Azure.ResourceManager.Resources.Bicep.Tests.csproj b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/Azure.ResourceManager.Resources.Bicep.Tests.csproj new file mode 100644 index 000000000000..eb2151493093 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/Azure.ResourceManager.Resources.Bicep.Tests.csproj @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/BicepManagementTestBase.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/BicepManagementTestBase.cs new file mode 100644 index 000000000000..b8ace7fafbe3 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/BicepManagementTestBase.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Resources.Bicep.Tests +{ + public class BicepManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected BicepManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected BicepManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/BicepManagementTestEnvironment.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/BicepManagementTestEnvironment.cs new file mode 100644 index 000000000000..505455d1acb9 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/BicepManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Resources.Bicep.Tests +{ + public class BicepManagementTestEnvironment : TestEnvironment + { + } +} \ No newline at end of file diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/DecompileOperationTests.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/DecompileOperationTests.cs new file mode 100644 index 000000000000..f6bcef34cb1c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/DecompileOperationTests.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; +using Azure.ResourceManager.Resources.Bicep.Models; +using Azure.Core; +using System.Linq; + +namespace Azure.ResourceManager.Resources.Bicep.Tests +{ + public sealed class DecompileOperationTests : BicepManagementTestBase + { + public DecompileOperationTests(bool isAsync) + : base(isAsync) + { + } + + [TestCase] + [RecordedTest] + public async Task Decompile_generates_valid_bicep_code() + { + var subscription = await Client.GetDefaultSubscriptionAsync(); + + var response = await subscription.BicepDecompileOperationGroupAsync(new DecompileOperationContent(""" + { + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.36.1.42791", + "templateHash": "18309635653390499776" + } + }, + "parameters": { + "foo": { + "type": "string" + } + }, + "resources": [], + "outputs": { + "foo": { + "type": "string", + "value": "[parameters('foo')]" + } + } + } + """.Replace("\r\n", "\n"))); + + var mainBicep = response.Value.Files.Single(x => x.Path == response.Value.EntryPoint); + Assert.AreEqual("param foo string\n\noutput foo string = foo\n", mainBicep.Contents); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..c5bc8ac3c318 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,44 @@ +// 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.Bicep.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Resources.Bicep.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task BicepDecompileOperationGroup_DecompileAnARMJsonTemplateIntoABicepFile() + { + // Generated from example definition: 2023-11-01/DecompileBicep.json + // this example is just showing the usage of "DecompileOperationGroup_Bicep" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + DecompileOperationContent content = new DecompileOperationContent("{\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"metadata\": {\r\n \"_generator\": {\r\n \"name\": \"bicep\",\r\n \"version\": \"0.15.31.15270\",\r\n \"templateHash\": \"9249505596133208719\"\r\n }\r\n },\r\n \"parameters\": {\r\n \"storageAccountName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": []\r\n}"); + DecompileOperationSuccessResult result = await subscriptionResource.BicepDecompileOperationGroupAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources.Bicep/tsp-location.yaml b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tsp-location.yaml new file mode 100644 index 000000000000..0c3a14bf5aa0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources.Bicep/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/resources/Bicep.Management +commit: bf2a34e1fd8ea0c96b4cda36f7a84418f91dccb2 +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/resources/ci.mgmt.yml b/sdk/resources/ci.mgmt.yml index d16be2925753..0ea1060e64ea 100644 --- a/sdk/resources/ci.mgmt.yml +++ b/sdk/resources/ci.mgmt.yml @@ -12,6 +12,7 @@ pr: include: - sdk/resources/ci.mgmt.yml - sdk/resources/Azure.ResourceManager.Resources/ + - sdk/resources/Azure.ResourceManager.Resources.Bicep/ - sdk/resources/Azure.ResourceManager.Resources.Deployments/ - sdk/resources/Azure.ResourceManager.Resources.DeploymentStacks/ @@ -23,6 +24,8 @@ extends: Artifacts: - name: Azure.ResourceManager.Resources safeName: AzureResourceManagerResources + - name: Azure.ResourceManager.Resources.Bicep + safeName: AzureResourceManagerResourcesBicep - name: Azure.ResourceManager.Resources.Deployments safeName: AzureResourceManagerResourcesDeployments - name: Azure.ResourceManager.Resources.DeploymentStacks diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Azure.Data.SchemaRegistry.csproj b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Azure.Data.SchemaRegistry.csproj index 0880d9f9d1c3..bf2a48341fc1 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Azure.Data.SchemaRegistry.csproj +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Azure.Data.SchemaRegistry.csproj @@ -8,6 +8,7 @@ Azure;Schema Registry;SchemaRegistry;.NET;Data;$(PackageCommonTags) $(RequiredTargetFrameworks) true + false diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs deleted file mode 100644 index d09c417ffda1..000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - [CodeGenClient("DataSchemaRegistryClientBuilderExtensions")] - internal static partial class DataSchemaRegistryClientBuilderExtensions - { - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml index 8b09733e5645..aa39a46741bc 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml @@ -1,4 +1,4 @@ repo: Azure/azure-rest-api-specs -directory: specification/schemaregistry/SchemaRegistry -commit: 73ce7b3e03f6291fde8bbc98081687c598cc9815 +directory: specification/schemaregistry/data-plane/SchemaRegistry +commit: c90b62daed903080ed53766cefd53b6df2621cc6 emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json diff --git a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs index cab68fa20ac6..3fa78d5d68ef 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs @@ -428,6 +428,7 @@ private static void Copy(SearchOptions source, SearchOptions destination) destination.Skip = source.Skip; destination.QueryLanguage = source.QueryLanguage; destination.QuerySpeller = source.QuerySpeller; + destination.Debug = source.Debug; destination.SemanticSearch = source.SemanticSearch; destination.VectorSearch = source.VectorSearch; destination.HybridSearch = source.HybridSearch; diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs index 70fbd97e148d..2947012643b4 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs @@ -1015,6 +1015,7 @@ public void SearchOptionsCanBeCopied() source.SessionId = "SessionId"; source.Size = 100; source.Skip = null; + source.Debug = QueryDebugMode.All; source.SemanticSearch = new SemanticSearchOptions() { SemanticConfigurationName = "my-config", @@ -1044,6 +1045,7 @@ public void SearchOptionsCanBeCopied() Assert.AreEqual(source.SessionId, clonedSearchOptions.SessionId); // A string value Assert.AreEqual(source.Size, clonedSearchOptions.Size); // An int? value Assert.IsNull(clonedSearchOptions.Skip); // An int? value set as `null` + Assert.AreEqual(source.Debug, clonedSearchOptions.Debug); Assert.AreEqual(source.SemanticSearch.SemanticConfigurationName, clonedSearchOptions.SemanticSearch.SemanticConfigurationName); Assert.AreEqual(source.SemanticSearch.QueryAnswer.AnswerType, clonedSearchOptions.SemanticSearch.QueryAnswer.AnswerType); Assert.AreEqual(source.SemanticSearch.QueryAnswer.Count, clonedSearchOptions.SemanticSearch.QueryAnswer.Count); diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tsp-location.yaml b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tsp-location.yaml index 8e0b36bd0295..09835fe3e7d6 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tsp-location.yaml +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/help/Help.Management repo: Azure/azure-rest-api-specs -commit: c62eaed6d87c68cd4ab3c09c898b4e896873e791 +commit: a391ac9724f3aaa4b0e237de247b28a099cbe4e3 additionalDirectories: [] diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml index 207788c135e3..5160d3d31ef2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management -commit: d205bf6b2a57fb9d8c6245eee887a6dfd807049d +commit: b6b995fbf027ad880fc0440494155e99bea5f6c3 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml index c2ba07f085af..304a21bd5019 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/servicenetworking/ServiceNetworking.Management -commit: 751b7630fce7a9ac11504c6ff6dfa3e4032b0289 +commit: 3a72ccf75a2f60ab84a36d169b74777f7d508cb2 repo: Azure/azure-rest-api-specs diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/CHANGELOG.md b/sdk/signalr/Azure.ResourceManager.SignalR/CHANGELOG.md index f674eb6512ca..714635d0dc4a 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/CHANGELOG.md +++ b/sdk/signalr/Azure.ResourceManager.SignalR/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.1.4 (2025-09-17) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Make `Azure.ResourceManager.SignalR` AOT-compatible. ## 1.1.3 (2024-10-23) diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/src/Azure.ResourceManager.SignalR.csproj b/sdk/signalr/Azure.ResourceManager.SignalR/src/Azure.ResourceManager.SignalR.csproj index 5177d06a3dc8..2d91dad9c43d 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/src/Azure.ResourceManager.SignalR.csproj +++ b/sdk/signalr/Azure.ResourceManager.SignalR/src/Azure.ResourceManager.SignalR.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.1.4 1.1.3 Azure.ResourceManager.SignalR diff --git a/sdk/signalr/ci.mgmt.yml b/sdk/signalr/ci.mgmt.yml index c934ed4314fa..8c603e15658c 100644 --- a/sdk/signalr/ci.mgmt.yml +++ b/sdk/signalr/ci.mgmt.yml @@ -22,3 +22,7 @@ extends: Artifacts: - name: Azure.ResourceManager.SignalR safeName: AzureResourceManagerSignalR + CheckAOTCompat: true + AOTTestInputs: + - ArtifactName: Azure.ResourceManager.SignalR + ExpectedWarningsFilepath: None diff --git a/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/PerfTestEnvironment.cs b/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/PerfTestEnvironment.cs index 5c7d9549c662..77badec8a6b9 100644 --- a/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/PerfTestEnvironment.cs +++ b/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/PerfTestEnvironment.cs @@ -33,6 +33,19 @@ internal sealed class PerfTestEnvironment : TestEnvironment /// The Blob storage account key, read from the "AZURE_STORAGE_ACCOUNT_KEY" environment variable. public string StorageAccountKey => GetOptionalVariable("AZURE_STORAGE_ACCOUNT_KEY"); + public bool StorageUseManagedIdentity + { + get + { + string useManagedIdentity = GetOptionalVariable("AZURE_STORAGE_USE_MANAGED_IDENTITY"); + if (bool.TryParse(useManagedIdentity, out bool result)) + { + return result; + } + return false; + } + } + /// /// The Blob storage endpoint. /// diff --git a/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/ServiceTest.cs b/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/ServiceTest.cs index 4a6677cda11c..4f2c5eedbe70 100644 --- a/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/ServiceTest.cs +++ b/sdk/storage/Azure.Storage.Blobs/perf/Azure.Storage.Blobs.Perf/Infrastructure/ServiceTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Azure.Core; +using Azure.Identity; using Azure.Test.Perf; namespace Azure.Storage.Blobs.Perf @@ -15,9 +17,13 @@ public ServiceTest(TOptions options) : base(options) BlobClientOptions clientOptions = options is Options.IBlobClientOptionsProvider clientOptionsOptions ? clientOptionsOptions.ClientOptions : new BlobClientOptions(); + // The default credential does not support managed identity + TokenCredential credential = PerfTestEnvironment.Instance.StorageUseManagedIdentity ? + new ManagedIdentityCredential(new ManagedIdentityCredentialOptions(ManagedIdentityId.SystemAssigned)) : + PerfTestEnvironment.Instance.Credential; BlobServiceClient = new BlobServiceClient( PerfTestEnvironment.Instance.StorageEndpoint, - PerfTestEnvironment.Instance.Credential, + credential, ConfigureClientOptions(clientOptions)); // Can't do shared key tests if shared key wasn't provided diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md index a03c20ff50b1..831faa1651d1 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md @@ -1,16 +1,25 @@ # Release History -## 12.3.0-beta.1 (Unreleased) +## 12.3.0-beta.2 (Unreleased) ### Features Added ### Breaking Changes ### Bugs Fixed -- Fixed an issue on upload transfers where file/directory names on the destination may be incorrect. The issue could occur if the path passed to `LocalFilesStorageResourceProvider.FromDirectory` contained a trailing slash. ### Other Changes +## 12.3.0-beta.1 (2025-09-16) + +### Features Added +- This release contains features and bug fixes to improve quality. + +## 12.2.2 (2025-09-10) + +### Bugs Fixed +- Fixed an issue on upload transfers where file/directory names on the destination may be incorrect. The issue could occur if the path passed to `LocalFilesStorageResourceProvider.FromDirectory` contained a trailing slash. + ## 12.2.1 (2025-08-06) ### Bugs Fixed diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json index fa5d9300e453..a561f569f910 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Blobs", - "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_c2f1f2fc3f" + "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_be4448c888" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj index ca11f0d15c5b..e8c52d3a7cad 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj @@ -5,9 +5,9 @@ Microsoft Azure.Storage.DataMovement.Blobs client library - 12.3.0-beta.1 + 12.3.0-beta.2 - 12.2.1 + 12.2.2 BlobDataMovementSDK;$(DefineConstants) Microsoft Azure Storage DataMovement Blobs AzureStorage BlobStorage azureofficial diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs index b9207f1f409e..3d85e2713956 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs @@ -251,9 +251,12 @@ private async Task VerifyPropertiesCopyAsyncInternal( { Assert.That(destinationProperties.AccessTier.ToString(), Is.Not.EqualTo(_defaultAccessTier.ToString())); } - - GetBlobTagResult destinationTags = await destinationClient.GetTagsAsync(); - Assert.IsEmpty(destinationTags.Tags); + else + { + // Premium accounts do not support tags + GetBlobTagResult destinationTags = await destinationClient.GetTagsAsync(); + Assert.IsEmpty(destinationTags.Tags); + } } else if (transferPropertiesTestType == TransferPropertiesTestType.NewProperties) { diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md index 0b8b07d5eae1..9049d2ed3c8f 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md @@ -1,16 +1,28 @@ # Release History -## 12.3.0-beta.1 (Unreleased) +## 12.3.0-beta.2 (Unreleased) ### Features Added ### Breaking Changes ### Bugs Fixed -- Fixed an issue on upload transfers where file/directory names on the destination may be incorrect. The issue could occur if the path passed to `LocalFilesStorageResourceProvider.FromDirectory` contained a trailing slash. ### Other Changes +## 12.3.0-beta.1 (2025-09-16) + +### Features Added +- Added support for NFS -> SMB and SMB -> NFS Share-to-Share copy transfers. + +### Bugs Fixed +- Fixed property/permission/metadata preservation when overwriting an existing directory for SMB and NFS transfers. + +## 12.2.2 (2025-09-10) + +### Bugs Fixed +- Fixed an issue on upload transfers where file/directory names on the destination may be incorrect. The issue could occur if the path passed to `LocalFilesStorageResourceProvider.FromDirectory` contained a trailing slash. + ## 12.2.1 (2025-08-06) ### Bugs Fixed diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj index af243b31999b..f9bba6dcaad7 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj @@ -6,9 +6,9 @@ Microsoft Azure.Storage.DataMovement.Files.Shares client library - 12.3.0-beta.1 + 12.3.0-beta.2 - 12.2.1 + 12.2.2 ShareDataMovementSDK;$(DefineConstants) Microsoft Azure Storage DataMovement Files AzureStorage AzureFiles azureofficial diff --git a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md index ebcbe13961ba..7f22fa8bc35b 100644 --- a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md @@ -1,16 +1,25 @@ # Release History -## 12.3.0-beta.1 (Unreleased) +## 12.3.0-beta.2 (Unreleased) ### Features Added ### Breaking Changes ### Bugs Fixed -- Fixed an issue on upload transfers where file/directory names on the destination may be incorrect. The issue could occur if the path passed to `LocalFilesStorageResourceProvider.FromDirectory` contained a trailing slash. ### Other Changes +## 12.3.0-beta.1 (2025-09-16) + +### Features Added +- This release contains features and bug fixes to improve quality. + +## 12.2.2 (2025-09-10) + +### Bugs Fixed +- Fixed an issue on upload transfers where file/directory names on the destination may be incorrect. The issue could occur if the path passed to `LocalFilesStorageResourceProvider.FromDirectory` contained a trailing slash. + ## 12.2.1 (2025-08-06) ### Bugs Fixed diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj b/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj index 0121ca9f88c8..885b8447416b 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj +++ b/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj @@ -5,9 +5,9 @@ Microsoft Azure.Storage.DataMovement client library - 12.3.0-beta.1 + 12.3.0-beta.2 - 12.2.1 + 12.2.2 DataMovementSDK;$(DefineConstants) Microsoft Azure Storage DataMovement AzureStorage azureofficial diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/PauseResumeTransferTestBase.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/PauseResumeTransferTestBase.cs index 3957b5afde85..33705504fa26 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/PauseResumeTransferTestBase.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/PauseResumeTransferTestBase.cs @@ -368,8 +368,23 @@ private async Task AssertDirectorySourceAndDestinationAsync( await VerifyTransferContent(childSourceResource, childDestinationResource, sourceContainer, destinationContainer, transferType); } } + + private bool HasFileTransferReachedInProgressState(List progressUpdates) + { + return progressUpdates.Any(p => p.InProgressCount > 0); + } #endregion + private class TestProgressHandler : IProgress + { + public List Updates { get; private set; } = new List(); + + public void Report(TransferProgress progress) + { + Updates.Add(progress); + } + } + #region Tests [Test] [LiveOnly] @@ -392,7 +407,15 @@ public async Task TryPauseTransferAsync_Id(TransferDirection transferType) ProvidersForResuming = new List() { provider }, }; TransferManager transferManager = new TransferManager(options); - TransferOptions transferOptions = new TransferOptions(); + TestProgressHandler progressHandler = new(); + TransferOptions transferOptions = new TransferOptions + { + ProgressHandlerOptions = new TransferProgressHandlerOptions + { + ProgressHandler = progressHandler, + TrackBytesTransferred = true + } + }; TestEventsRaised testEventsRaised = new TestEventsRaised(transferOptions); // Add long-running job to pause, if the job is not big enough @@ -407,19 +430,25 @@ public async Task TryPauseTransferAsync_Id(TransferDirection transferType) transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert await testEventsRaised.AssertPausedCheck(); Assert.AreEqual(TransferState.Paused, transfer.Status.State); - // Check if Job Plan File exists in checkpointer path. - JobPartPlanFileName fileName = new JobPartPlanFileName( - checkpointerPath: checkpointerDirectory.DirectoryPath, - id: transfer.Id, - jobPartNumber: 0); - Assert.IsTrue(File.Exists(fileName.FullPath)); + List progressUpdates = progressHandler.Updates; + // We need to check whether the transfer has any files that has reached 'InProgress' state + // before checking whether the Job Part Plan File exists. + if (HasFileTransferReachedInProgressState(progressUpdates)) + { + // Check if Job Plan File exists in checkpointer path. + JobPartPlanFileName fileName = new JobPartPlanFileName( + checkpointerPath: checkpointerDirectory.DirectoryPath, + id: transfer.Id, + jobPartNumber: 0); + Assert.IsTrue(File.Exists(fileName.FullPath)); + } } [Test] @@ -442,7 +471,16 @@ public async Task TryPauseTransferAsync_TransferOperation(TransferDirection tran ErrorMode = TransferErrorMode.ContinueOnFailure, ProvidersForResuming = new List() { provider }, }; - TransferOptions transferOptions = new TransferOptions(); + + TestProgressHandler progressHandler = new(); + TransferOptions transferOptions = new TransferOptions + { + ProgressHandlerOptions = new TransferProgressHandlerOptions + { + ProgressHandler = progressHandler, + TrackBytesTransferred = true + } + }; TestEventsRaised testEventsRaised = new TestEventsRaised(transferOptions); TransferManager transferManager = new TransferManager(options); @@ -458,19 +496,25 @@ public async Task TryPauseTransferAsync_TransferOperation(TransferDirection tran transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert await testEventsRaised.AssertPausedCheck(); Assert.AreEqual(TransferState.Paused, transfer.Status.State); - // Check if Job Plan File exists in checkpointer path. - JobPartPlanFileName fileName = new JobPartPlanFileName( - checkpointerPath: checkpointerDirectory.DirectoryPath, - id: transfer.Id, - jobPartNumber: 0); - Assert.IsTrue(File.Exists(fileName.FullPath)); + List progressUpdates = progressHandler.Updates; + // We need to check whether the transfer has any files that has reached 'InProgress' state + // before checking whether the Job Part Plan File exists. + if (HasFileTransferReachedInProgressState(progressUpdates)) + { + // Check if Job Plan File exists in checkpointer path. + JobPartPlanFileName fileName = new JobPartPlanFileName( + checkpointerPath: checkpointerDirectory.DirectoryPath, + id: transfer.Id, + jobPartNumber: 0); + Assert.IsTrue(File.Exists(fileName.FullPath)); + } } [RecordedTest] @@ -509,7 +553,16 @@ public async Task TryPauseTransferAsync_AlreadyPaused(TransferDirection transfer ErrorMode = TransferErrorMode.ContinueOnFailure, ProvidersForResuming = new List() { provider }, }; - TransferOptions transferOptions = new TransferOptions(); + + TestProgressHandler progressHandler = new(); + TransferOptions transferOptions = new TransferOptions + { + ProgressHandlerOptions = new TransferProgressHandlerOptions + { + ProgressHandler = progressHandler, + TrackBytesTransferred = true + } + }; TestEventsRaised testEventsRaised = new TestEventsRaised(transferOptions); TransferManager transferManager = new TransferManager(options); @@ -525,7 +578,7 @@ public async Task TryPauseTransferAsync_AlreadyPaused(TransferDirection transfer transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -537,12 +590,18 @@ public async Task TryPauseTransferAsync_AlreadyPaused(TransferDirection transfer Assert.AreEqual(TransferState.Paused, transfer.Status.State); - // Check if Job Plan File exists in checkpointer path. - JobPartPlanFileName fileName = new JobPartPlanFileName( - checkpointerPath: checkpointerDirectory.DirectoryPath, - id: transfer.Id, - jobPartNumber: 0); - Assert.IsTrue(File.Exists(fileName.FullPath)); + List progressUpdates = progressHandler.Updates; + // We need to check whether the transfer has any files that has reached 'InProgress' state + // before checking whether the Job Part Plan File exists. + if (HasFileTransferReachedInProgressState(progressUpdates)) + { + // Check if Job Plan File exists in checkpointer path. + JobPartPlanFileName fileName = new JobPartPlanFileName( + checkpointerPath: checkpointerDirectory.DirectoryPath, + id: transfer.Id, + jobPartNumber: 0); + Assert.IsTrue(File.Exists(fileName.FullPath)); + } } [Test] @@ -586,7 +645,7 @@ public async Task PauseThenResumeTransferAsync(TransferDirection transferType) transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -604,7 +663,7 @@ public async Task PauseThenResumeTransferAsync(TransferDirection transferType) transferId: transfer.Id, transferOptions: resumeOptions); - CancellationTokenSource waitTransferCompletion = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource waitTransferCompletion = new CancellationTokenSource(TimeSpan.FromSeconds(60)); await resumeTransfer.WaitForCompletionAsync(waitTransferCompletion.Token); // Assert @@ -674,7 +733,7 @@ public async Task ResumeTransferAsync(TransferDirection transferType) transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -688,7 +747,7 @@ public async Task ResumeTransferAsync(TransferDirection transferType) transfer.Id, resumeOptions); - CancellationTokenSource waitTransferCompletion = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource waitTransferCompletion = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await resumeTransfer.WaitForCompletionAsync(waitTransferCompletion.Token); // Assert @@ -741,7 +800,7 @@ public async Task ResumeTransferAsync_Options(TransferDirection transferType) TransferOperation transfer = await transferManager.StartTransferAsync(source, destination); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -750,7 +809,7 @@ public async Task ResumeTransferAsync_Options(TransferDirection transferType) // Act - Resume Job TransferOperation resumeTransfer = await transferManager.ResumeTransferAsync(transfer.Id); - CancellationTokenSource waitTransferCompletion = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource waitTransferCompletion = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await resumeTransfer.WaitForCompletionAsync(waitTransferCompletion.Token); // Assert @@ -800,7 +859,7 @@ public async Task TryPauseTransferAsync_Id_Directory(TransferDirection transferT transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -848,7 +907,7 @@ public async Task TryPauseTransferAsync_TransferOperation_Directory(TransferDire transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -896,7 +955,7 @@ public async Task TryPauseTransferAsync_AlreadyPaused_Directory(TransferDirectio transferOptions: transferOptions); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await transferManager.PauseTransferAsync(transfer.Id, cancellationTokenSource.Token); // Assert @@ -1180,7 +1239,7 @@ public async Task PauseAllTriggersCorrectPauses() manager._transfers.TryAdd(Guid.NewGuid().ToString(), transfer.Object); } - CancellationTokenSource token = new CancellationTokenSource(TimeSpan.FromSeconds(20)); + CancellationTokenSource token = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await manager.PauseAllRunningTransfersAsync(token.Token); foreach (Mock transfer in pausable) diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryDownloadTestBase.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryDownloadTestBase.cs index ecab1a16ca2a..226230d4270a 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryDownloadTestBase.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryDownloadTestBase.cs @@ -476,6 +476,7 @@ private async Task CreateStartTransfer( TransferManagerOptions managerOptions = new TransferManagerOptions() { MaximumConcurrency = concurrency, + ErrorMode = TransferErrorMode.StopOnAnyFailure }; TransferManager transferManager = new TransferManager(managerOptions); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/TransferValidator.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/TransferValidator.cs index 927abb08a5de..5d048d54e481 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/TransferValidator.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/TransferValidator.cs @@ -41,7 +41,7 @@ public async Task TransferAndVerifyAsync( if (cancellationToken == default) { CancellationTokenSource cts = new(); - cts.CancelAfter(TimeSpan.FromSeconds(30)); + cts.CancelAfter(TimeSpan.FromSeconds(60)); cancellationToken = cts.Token; } diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/TransferManagerTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/TransferManagerTests.cs index c3ef8b1f374e..9e5ebe4d6023 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/TransferManagerTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/TransferManagerTests.cs @@ -63,7 +63,7 @@ private static async Task ProcessChunksAssert( if (chunksPerPart > 1) { // Multichunk transfer sends a completion chunk after all the other chunks stepped through. - await Task.Delay(50); + await Task.Delay(100); Assert.That(await chunksProcessor.StepAll() + chunksStepped, Is.EqualTo(numChunks + totalJobParts)); } else diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/TransferValidationTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/TransferValidationTests.cs index 9a46a58f3b0f..c3ac547f6b41 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/TransferValidationTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/TransferValidationTests.cs @@ -29,7 +29,7 @@ public async Task LargeSingleFile( TestEventsRaised events = new(options); TransferOperation transfer = await transferManager.StartTransferAsync(srcResource, dstResource, options); - CancellationTokenSource tokenSource = new(TimeSpan.FromSeconds(10)); + CancellationTokenSource tokenSource = new(TimeSpan.FromSeconds(30)); await transfer.WaitForCompletionAsync(tokenSource.Token); Assert.That(transfer.HasCompleted, Is.True); @@ -54,7 +54,7 @@ public async Task LargeSingleFile_Fail_Source( TestEventsRaised events = new(options); TransferOperation transfer = await transferManager.StartTransferAsync(srcResource, dstResource, options); - CancellationTokenSource tokenSource = new(TimeSpan.FromSeconds(10)); + CancellationTokenSource tokenSource = new(TimeSpan.FromSeconds(30)); await transfer.WaitForCompletionAsync(tokenSource.Token); Assert.That(transfer.HasCompleted, Is.True); diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs index e6f95e5765d2..39733005ddf5 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTaskAssignmentRestOperations.cs @@ -43,9 +43,6 @@ internal StorageTaskAssignment(ClientDiagnostics clientDiagnostics, HttpPipeline internal HttpMessage CreateGetStorageTaskAssignmentsRequest(Guid subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -60,19 +57,22 @@ internal HttpMessage CreateGetStorageTaskAssignmentsRequest(Guid subscriptionId, { uri.AppendQuery("$maxpagesize", TypeFormatters.ConvertToString(maxpagesize, null), true); } + 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 CreateNextGetStorageTaskAssignmentsRequest(Uri nextPage, Guid subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; 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; } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs index 1c27e029782d..e42b37207481 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksReportRestOperations.cs @@ -43,9 +43,6 @@ internal StorageTasksReport(ClientDiagnostics clientDiagnostics, HttpPipeline pi internal HttpMessage CreateGetStorageTasksReportsRequest(Guid subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -64,19 +61,22 @@ internal HttpMessage CreateGetStorageTasksReportsRequest(Guid subscriptionId, st { uri.AppendQuery("$filter", filter, true); } + 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 CreateNextGetStorageTasksReportsRequest(Uri nextPage, Guid subscriptionId, string resourceGroupName, string storageTaskName, int? maxpagesize, string filter, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; 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; } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs index 1fc598511763..5ceb6d3fd5c3 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/RestOperations/StorageTasksRestOperations.cs @@ -43,9 +43,6 @@ internal StorageTasks(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline internal HttpMessage CreateGetRequest(Guid subscriptionId, string resourceGroupName, string storageTaskName, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -55,16 +52,16 @@ internal HttpMessage CreateGetRequest(Guid subscriptionId, string resourceGroupN uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); uri.AppendPath(storageTaskName, true); uri.AppendQuery("api-version", _apiVersion, true); + 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 CreateCreateRequest(Guid subscriptionId, string resourceGroupName, string storageTaskName, RequestContent content, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Put; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -74,7 +71,10 @@ internal HttpMessage CreateCreateRequest(Guid subscriptionId, string resourceGro uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); uri.AppendPath(storageTaskName, 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; @@ -83,9 +83,6 @@ internal HttpMessage CreateCreateRequest(Guid subscriptionId, string resourceGro internal HttpMessage CreateUpdateRequest(Guid subscriptionId, string resourceGroupName, string storageTaskName, RequestContent content, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Patch; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -95,7 +92,10 @@ internal HttpMessage CreateUpdateRequest(Guid subscriptionId, string resourceGro uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); uri.AppendPath(storageTaskName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; + request.Method = RequestMethod.Patch; request.Headers.SetValue("Content-Type", "application/json"); request.Headers.SetValue("Accept", "application/json"); request.Content = content; @@ -104,9 +104,6 @@ internal HttpMessage CreateUpdateRequest(Guid subscriptionId, string resourceGro internal HttpMessage CreateDeleteRequest(Guid subscriptionId, string resourceGroupName, string storageTaskName, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Delete; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -116,15 +113,15 @@ internal HttpMessage CreateDeleteRequest(Guid subscriptionId, string resourceGro uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks/", false); uri.AppendPath(storageTaskName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; + request.Method = RequestMethod.Delete; return message; } internal HttpMessage CreateGetByResourceGroupRequest(Guid subscriptionId, string resourceGroupName, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -133,56 +130,56 @@ internal HttpMessage CreateGetByResourceGroupRequest(Guid subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks", false); uri.AppendQuery("api-version", _apiVersion, true); + 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 CreateNextGetByResourceGroupRequest(Uri nextPage, Guid subscriptionId, string resourceGroupName, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; 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 CreateGetBySubscriptionRequest(Guid subscriptionId, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/providers/Microsoft.StorageActions/storageTasks", false); uri.AppendQuery("api-version", _apiVersion, true); + 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 CreateNextGetBySubscriptionRequest(Uri nextPage, Guid subscriptionId, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Get; 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 CreatePreviewActionsRequest(Guid subscriptionId, AzureLocation location, RequestContent content, RequestContext context) { - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Method = RequestMethod.Post; RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -191,7 +188,10 @@ internal HttpMessage CreatePreviewActionsRequest(Guid subscriptionId, AzureLocat uri.AppendPath(location.ToString(), true); uri.AppendPath("/previewActions", false); uri.AppendQuery("api-version", _apiVersion, true); + 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; diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml b/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml index 4ec277e7fdaa..837598030fff 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storageactions/StorageAction.Management -commit: 34dbcd13a20458705a4d3529c66466b3bb16da08 +commit: c90b62daed903080ed53766cefd53b6df2621cc6 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/CHANGELOG.md b/sdk/storagemover/Azure.ResourceManager.StorageMover/CHANGELOG.md index 4cc29e826004..826783cc29c6 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/CHANGELOG.md +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/CHANGELOG.md @@ -1,10 +1,10 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0 (Unreleased) ### Other Changes -- Genearte SDK from typespec +- Upgraded to API version 2025-07-01. ## 1.2.1 (2025-03-11) @@ -21,7 +21,7 @@ ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Other Changes @@ -32,7 +32,7 @@ ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -42,20 +42,20 @@ ### Features Added -- Upgrade to API version 2023-10-01 +- Upgraded to API version 2023-10-01. ## 1.1.0-beta.2 (2023-08-08) ### Features Added -- Upgrade to API version 2023-07-01-preview +- Upgraded to API version 2023-07-01-preview - Added support for SMB endpoint and SMB file share endpoint. ## 1.1.0-beta.1 (2023-05-31) ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.net8.0.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.net8.0.cs index db453bcedd32..a533a44f6e02 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.net8.0.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.net8.0.cs @@ -30,6 +30,7 @@ public JobDefinitionData(Azure.ResourceManager.StorageMover.Models.StorageMoverC public Azure.Core.ResourceIdentifier AgentResourceId { get { throw null; } } public Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode CopyMode { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public Azure.ResourceManager.StorageMover.Models.JobType? JobType { get { throw null; } set { } } public string LatestJobRunName { get { throw null; } } public Azure.Core.ResourceIdentifier LatestJobRunResourceId { get { throw null; } } public Azure.ResourceManager.StorageMover.Models.JobRunStatus? LatestJobRunStatus { get { throw null; } } @@ -37,6 +38,7 @@ public JobDefinitionData(Azure.ResourceManager.StorageMover.Models.StorageMoverC public string SourceName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } } public string SourceSubpath { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList SourceTargetMapValue { get { throw null; } } public string TargetName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } public string TargetSubpath { get { throw null; } set { } } @@ -250,6 +252,7 @@ protected StorageMoverEndpointCollection() { } public partial class StorageMoverEndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageMoverEndpointData(Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageMover.StorageMoverEndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -407,22 +410,31 @@ namespace Azure.ResourceManager.StorageMover.Models { public static partial class ArmStorageMoverModelFactory { + public static Azure.ResourceManager.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties AzureMultiCloudConnectorEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), Azure.Core.ResourceIdentifier multiCloudConnectorId = null, Azure.Core.ResourceIdentifier awsS3BucketId = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.AzureStorageBlobContainerEndpointProperties AzureStorageBlobContainerEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), string storageAccountResourceId = null, string blobContainerName = null) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties AzureStorageNfsFileShareEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), Azure.Core.ResourceIdentifier storageAccountResourceId = null, string fileShareName = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.AzureStorageSmbFileShareEndpointProperties AzureStorageSmbFileShareEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), Azure.Core.ResourceIdentifier storageAccountResourceId = null, string fileShareName = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties EndpointBaseProperties(string endpointType = null, string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.StorageMover.JobDefinitionData JobDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode copyMode = default(Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode), string sourceName = null, Azure.Core.ResourceIdentifier sourceResourceId = null, string sourceSubpath = null, string targetName = null, Azure.Core.ResourceIdentifier targetResourceId = null, string targetSubpath = null, string latestJobRunName = null, Azure.Core.ResourceIdentifier latestJobRunResourceId = null, Azure.ResourceManager.StorageMover.Models.JobRunStatus? latestJobRunStatus = default(Azure.ResourceManager.StorageMover.Models.JobRunStatus?), string agentName = null, Azure.Core.ResourceIdentifier agentResourceId = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.StorageMover.JobDefinitionData JobDefinitionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode copyMode, string sourceName, Azure.Core.ResourceIdentifier sourceResourceId, string sourceSubpath, string targetName, Azure.Core.ResourceIdentifier targetResourceId, string targetSubpath, string latestJobRunName, Azure.Core.ResourceIdentifier latestJobRunResourceId, Azure.ResourceManager.StorageMover.Models.JobRunStatus? latestJobRunStatus, string agentName, Azure.Core.ResourceIdentifier agentResourceId, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.StorageMover.JobDefinitionData JobDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.StorageMover.Models.JobType? jobType = default(Azure.ResourceManager.StorageMover.Models.JobType?), Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode copyMode = default(Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode), string sourceName = null, Azure.Core.ResourceIdentifier sourceResourceId = null, string sourceSubpath = null, string targetName = null, Azure.Core.ResourceIdentifier targetResourceId = null, string targetSubpath = null, string latestJobRunName = null, Azure.Core.ResourceIdentifier latestJobRunResourceId = null, Azure.ResourceManager.StorageMover.Models.JobRunStatus? latestJobRunStatus = default(Azure.ResourceManager.StorageMover.Models.JobRunStatus?), string agentName = null, Azure.Core.ResourceIdentifier agentResourceId = null, System.Collections.Generic.IEnumerable sourceTargetMapValue = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } public static Azure.ResourceManager.StorageMover.JobRunData JobRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageMover.Models.JobRunStatus? status = default(Azure.ResourceManager.StorageMover.Models.JobRunStatus?), Azure.ResourceManager.StorageMover.Models.JobRunScanStatus? scanStatus = default(Azure.ResourceManager.StorageMover.Models.JobRunScanStatus?), string agentName = null, Azure.Core.ResourceIdentifier agentResourceId = null, System.DateTimeOffset? executionStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? executionEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastStatusUpdate = default(System.DateTimeOffset?), long? itemsScanned = default(long?), long? itemsExcluded = default(long?), long? itemsUnsupported = default(long?), long? itemsNoTransferNeeded = default(long?), long? itemsFailed = default(long?), long? itemsTransferred = default(long?), long? bytesScanned = default(long?), long? bytesExcluded = default(long?), long? bytesUnsupported = default(long?), long? bytesNoTransferNeeded = default(long?), long? bytesFailed = default(long?), long? bytesTransferred = default(long?), string sourceName = null, Azure.Core.ResourceIdentifier sourceResourceId = null, System.BinaryData sourceProperties = null, string targetName = null, Azure.Core.ResourceIdentifier targetResourceId = null, System.BinaryData targetProperties = null, System.BinaryData jobDefinitionProperties = null, Azure.ResourceManager.StorageMover.Models.JobRunError error = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } public static Azure.ResourceManager.StorageMover.Models.JobRunError JobRunError(string code = null, string message = null, string target = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.JobRunResourceId JobRunResourceId(Azure.Core.ResourceIdentifier jobRunResourceIdValue = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.NfsMountEndpointProperties NfsMountEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), string host = null, Azure.ResourceManager.StorageMover.Models.NfsVersion? nfsVersion = default(Azure.ResourceManager.StorageMover.Models.NfsVersion?), string export = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.SmbMountEndpointProperties SmbMountEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), string host = null, string shareName = null, Azure.ResourceManager.StorageMover.Models.AzureKeyVaultSmbCredentials credentials = null) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties SourceEndpointProperties(string name = null, Azure.Core.ResourceIdentifier sourceEndpointResourceId = null, Azure.Core.ResourceIdentifier awsS3BucketId = null) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.SourceTargetMap SourceTargetMap(Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties sourceEndpointProperties = null, Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties targetEndpointProperties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.StorageMover.StorageMoverAgentData StorageMoverAgentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, string agentVersion, string arcResourceId, string arcVmUuid, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentStatus? agentStatus, System.DateTimeOffset? lastStatusUpdate, string localIPAddress, long? memoryInMB, long? numberOfCores, long? uptimeInSeconds, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentPropertiesErrorDetails errorDetails, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.StorageMover.StorageMoverAgentData StorageMoverAgentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string agentVersion = null, string arcResourceId = null, string arcVmUuid = null, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentStatus? agentStatus = default(Azure.ResourceManager.StorageMover.Models.StorageMoverAgentStatus?), System.DateTimeOffset? lastStatusUpdate = default(System.DateTimeOffset?), string localIPAddress = null, long? memoryInMB = default(long?), long? numberOfCores = default(long?), long? uptimeInSeconds = default(long?), string timeZone = null, System.Collections.Generic.IEnumerable uploadLimitScheduleWeeklyRecurrences = null, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentPropertiesErrorDetails errorDetails = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } public static Azure.ResourceManager.StorageMover.Models.StorageMoverAgentPropertiesErrorDetails StorageMoverAgentPropertiesErrorDetails(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.StorageMover.StorageMoverData StorageMoverData(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 description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.StorageMover.StorageMoverEndpointData StorageMoverEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.StorageMover.StorageMoverEndpointData StorageMoverEndpointData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties) { throw null; } + public static Azure.ResourceManager.StorageMover.StorageMoverEndpointData StorageMoverEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.StorageMover.StorageMoverProjectData StorageMoverProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties TargetEndpointProperties(string name = null, Azure.Core.ResourceIdentifier targetEndpointResourceId = null, Azure.Core.ResourceIdentifier azureStorageAccountResourceId = null, string azureStorageBlobContainerName = null) { throw null; } } public partial class AzureKeyVaultSmbCredentials : Azure.ResourceManager.StorageMover.Models.StorageMoverCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -436,6 +448,28 @@ 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 AzureMultiCloudConnectorEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureMultiCloudConnectorEndpointProperties(Azure.Core.ResourceIdentifier multiCloudConnectorId, Azure.Core.ResourceIdentifier awsS3BucketId) { } + public Azure.Core.ResourceIdentifier AwsS3BucketId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier MultiCloudConnectorId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties 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.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties 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 AzureMultiCloudConnectorEndpointUpdateProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureMultiCloudConnectorEndpointUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureMultiCloudConnectorEndpointUpdateProperties 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.StorageMover.Models.AzureMultiCloudConnectorEndpointUpdateProperties 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 AzureStorageBlobContainerEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureStorageBlobContainerEndpointProperties(string storageAccountResourceId, string blobContainerName) { } @@ -458,6 +492,28 @@ 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 AzureStorageNfsFileShareEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureStorageNfsFileShareEndpointProperties(Azure.Core.ResourceIdentifier storageAccountResourceId, string fileShareName) { } + public string FileShareName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties 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.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties 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 AzureStorageNfsFileShareEndpointUpdateProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureStorageNfsFileShareEndpointUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureStorageNfsFileShareEndpointUpdateProperties 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.StorageMover.Models.AzureStorageNfsFileShareEndpointUpdateProperties 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 AzureStorageSmbFileShareEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureStorageSmbFileShareEndpointProperties(Azure.Core.ResourceIdentifier storageAccountResourceId, string fileShareName) { } @@ -584,6 +640,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.StorageMover.Models.JobRunStatus left, Azure.ResourceManager.StorageMover.Models.JobRunStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobType(string value) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.JobType CloudToCloud { get { throw null; } } + public static Azure.ResourceManager.StorageMover.Models.JobType OnPremToCloud { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageMover.Models.JobType 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.StorageMover.Models.JobType left, Azure.ResourceManager.StorageMover.Models.JobType right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageMover.Models.JobType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageMover.Models.JobType left, Azure.ResourceManager.StorageMover.Models.JobType right) { throw null; } + public override string ToString() { throw null; } + } public partial class NfsMountEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NfsMountEndpointProperties(string host, string export) { } @@ -712,6 +786,31 @@ 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 SourceEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SourceEndpointProperties() { } + public Azure.Core.ResourceIdentifier AwsS3BucketId { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Core.ResourceIdentifier SourceEndpointResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties 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.StorageMover.Models.SourceEndpointProperties 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 SourceTargetMap : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SourceTargetMap() { } + public Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties SourceEndpointProperties { get { throw null; } } + public Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties TargetEndpointProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.SourceTargetMap 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.StorageMover.Models.SourceTargetMap 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 StorageMoverAgentPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageMoverAgentPatch() { } @@ -792,6 +891,7 @@ public StorageMoverEndpointPatch() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public string EndpointBaseUpdateDescription { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.StorageMover.Models.EndpointBaseUpdateProperties Properties { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageMover.Models.StorageMoverEndpointPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -843,6 +943,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState left, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class TargetEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetEndpointProperties() { } + public Azure.Core.ResourceIdentifier AzureStorageAccountResourceId { get { throw null; } } + public string AzureStorageBlobContainerName { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetEndpointResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties 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.StorageMover.Models.TargetEndpointProperties 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 UploadLimitWeeklyRecurrence : Azure.ResourceManager.StorageMover.Models.ScheduleWeeklyRecurrence, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UploadLimitWeeklyRecurrence(Azure.ResourceManager.StorageMover.Models.ScheduleTime startTime, Azure.ResourceManager.StorageMover.Models.ScheduleTime endTime, System.Collections.Generic.IEnumerable days, int limitInMbps) : base (default(Azure.ResourceManager.StorageMover.Models.ScheduleTime), default(Azure.ResourceManager.StorageMover.Models.ScheduleTime), default(System.Collections.Generic.IEnumerable)) { } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.netstandard2.0.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.netstandard2.0.cs index db453bcedd32..a533a44f6e02 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.netstandard2.0.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/api/Azure.ResourceManager.StorageMover.netstandard2.0.cs @@ -30,6 +30,7 @@ public JobDefinitionData(Azure.ResourceManager.StorageMover.Models.StorageMoverC public Azure.Core.ResourceIdentifier AgentResourceId { get { throw null; } } public Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode CopyMode { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public Azure.ResourceManager.StorageMover.Models.JobType? JobType { get { throw null; } set { } } public string LatestJobRunName { get { throw null; } } public Azure.Core.ResourceIdentifier LatestJobRunResourceId { get { throw null; } } public Azure.ResourceManager.StorageMover.Models.JobRunStatus? LatestJobRunStatus { get { throw null; } } @@ -37,6 +38,7 @@ public JobDefinitionData(Azure.ResourceManager.StorageMover.Models.StorageMoverC public string SourceName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } } public string SourceSubpath { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList SourceTargetMapValue { get { throw null; } } public string TargetName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } public string TargetSubpath { get { throw null; } set { } } @@ -250,6 +252,7 @@ protected StorageMoverEndpointCollection() { } public partial class StorageMoverEndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageMoverEndpointData(Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageMover.StorageMoverEndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -407,22 +410,31 @@ namespace Azure.ResourceManager.StorageMover.Models { public static partial class ArmStorageMoverModelFactory { + public static Azure.ResourceManager.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties AzureMultiCloudConnectorEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), Azure.Core.ResourceIdentifier multiCloudConnectorId = null, Azure.Core.ResourceIdentifier awsS3BucketId = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.AzureStorageBlobContainerEndpointProperties AzureStorageBlobContainerEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), string storageAccountResourceId = null, string blobContainerName = null) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties AzureStorageNfsFileShareEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), Azure.Core.ResourceIdentifier storageAccountResourceId = null, string fileShareName = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.AzureStorageSmbFileShareEndpointProperties AzureStorageSmbFileShareEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), Azure.Core.ResourceIdentifier storageAccountResourceId = null, string fileShareName = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties EndpointBaseProperties(string endpointType = null, string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.StorageMover.JobDefinitionData JobDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode copyMode = default(Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode), string sourceName = null, Azure.Core.ResourceIdentifier sourceResourceId = null, string sourceSubpath = null, string targetName = null, Azure.Core.ResourceIdentifier targetResourceId = null, string targetSubpath = null, string latestJobRunName = null, Azure.Core.ResourceIdentifier latestJobRunResourceId = null, Azure.ResourceManager.StorageMover.Models.JobRunStatus? latestJobRunStatus = default(Azure.ResourceManager.StorageMover.Models.JobRunStatus?), string agentName = null, Azure.Core.ResourceIdentifier agentResourceId = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.StorageMover.JobDefinitionData JobDefinitionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode copyMode, string sourceName, Azure.Core.ResourceIdentifier sourceResourceId, string sourceSubpath, string targetName, Azure.Core.ResourceIdentifier targetResourceId, string targetSubpath, string latestJobRunName, Azure.Core.ResourceIdentifier latestJobRunResourceId, Azure.ResourceManager.StorageMover.Models.JobRunStatus? latestJobRunStatus, string agentName, Azure.Core.ResourceIdentifier agentResourceId, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.StorageMover.JobDefinitionData JobDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.StorageMover.Models.JobType? jobType = default(Azure.ResourceManager.StorageMover.Models.JobType?), Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode copyMode = default(Azure.ResourceManager.StorageMover.Models.StorageMoverCopyMode), string sourceName = null, Azure.Core.ResourceIdentifier sourceResourceId = null, string sourceSubpath = null, string targetName = null, Azure.Core.ResourceIdentifier targetResourceId = null, string targetSubpath = null, string latestJobRunName = null, Azure.Core.ResourceIdentifier latestJobRunResourceId = null, Azure.ResourceManager.StorageMover.Models.JobRunStatus? latestJobRunStatus = default(Azure.ResourceManager.StorageMover.Models.JobRunStatus?), string agentName = null, Azure.Core.ResourceIdentifier agentResourceId = null, System.Collections.Generic.IEnumerable sourceTargetMapValue = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } public static Azure.ResourceManager.StorageMover.JobRunData JobRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageMover.Models.JobRunStatus? status = default(Azure.ResourceManager.StorageMover.Models.JobRunStatus?), Azure.ResourceManager.StorageMover.Models.JobRunScanStatus? scanStatus = default(Azure.ResourceManager.StorageMover.Models.JobRunScanStatus?), string agentName = null, Azure.Core.ResourceIdentifier agentResourceId = null, System.DateTimeOffset? executionStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? executionEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastStatusUpdate = default(System.DateTimeOffset?), long? itemsScanned = default(long?), long? itemsExcluded = default(long?), long? itemsUnsupported = default(long?), long? itemsNoTransferNeeded = default(long?), long? itemsFailed = default(long?), long? itemsTransferred = default(long?), long? bytesScanned = default(long?), long? bytesExcluded = default(long?), long? bytesUnsupported = default(long?), long? bytesNoTransferNeeded = default(long?), long? bytesFailed = default(long?), long? bytesTransferred = default(long?), string sourceName = null, Azure.Core.ResourceIdentifier sourceResourceId = null, System.BinaryData sourceProperties = null, string targetName = null, Azure.Core.ResourceIdentifier targetResourceId = null, System.BinaryData targetProperties = null, System.BinaryData jobDefinitionProperties = null, Azure.ResourceManager.StorageMover.Models.JobRunError error = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } public static Azure.ResourceManager.StorageMover.Models.JobRunError JobRunError(string code = null, string message = null, string target = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.JobRunResourceId JobRunResourceId(Azure.Core.ResourceIdentifier jobRunResourceIdValue = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.NfsMountEndpointProperties NfsMountEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), string host = null, Azure.ResourceManager.StorageMover.Models.NfsVersion? nfsVersion = default(Azure.ResourceManager.StorageMover.Models.NfsVersion?), string export = null) { throw null; } public static Azure.ResourceManager.StorageMover.Models.SmbMountEndpointProperties SmbMountEndpointProperties(string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?), string host = null, string shareName = null, Azure.ResourceManager.StorageMover.Models.AzureKeyVaultSmbCredentials credentials = null) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties SourceEndpointProperties(string name = null, Azure.Core.ResourceIdentifier sourceEndpointResourceId = null, Azure.Core.ResourceIdentifier awsS3BucketId = null) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.SourceTargetMap SourceTargetMap(Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties sourceEndpointProperties = null, Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties targetEndpointProperties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.StorageMover.StorageMoverAgentData StorageMoverAgentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, string agentVersion, string arcResourceId, string arcVmUuid, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentStatus? agentStatus, System.DateTimeOffset? lastStatusUpdate, string localIPAddress, long? memoryInMB, long? numberOfCores, long? uptimeInSeconds, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentPropertiesErrorDetails errorDetails, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.StorageMover.StorageMoverAgentData StorageMoverAgentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string agentVersion = null, string arcResourceId = null, string arcVmUuid = null, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentStatus? agentStatus = default(Azure.ResourceManager.StorageMover.Models.StorageMoverAgentStatus?), System.DateTimeOffset? lastStatusUpdate = default(System.DateTimeOffset?), string localIPAddress = null, long? memoryInMB = default(long?), long? numberOfCores = default(long?), long? uptimeInSeconds = default(long?), string timeZone = null, System.Collections.Generic.IEnumerable uploadLimitScheduleWeeklyRecurrences = null, Azure.ResourceManager.StorageMover.Models.StorageMoverAgentPropertiesErrorDetails errorDetails = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } public static Azure.ResourceManager.StorageMover.Models.StorageMoverAgentPropertiesErrorDetails StorageMoverAgentPropertiesErrorDetails(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.StorageMover.StorageMoverData StorageMoverData(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 description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.StorageMover.StorageMoverEndpointData StorageMoverEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.StorageMover.StorageMoverEndpointData StorageMoverEndpointData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties) { throw null; } + public static Azure.ResourceManager.StorageMover.StorageMoverEndpointData StorageMoverEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.StorageMover.StorageMoverProjectData StorageMoverProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState? provisioningState = default(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties TargetEndpointProperties(string name = null, Azure.Core.ResourceIdentifier targetEndpointResourceId = null, Azure.Core.ResourceIdentifier azureStorageAccountResourceId = null, string azureStorageBlobContainerName = null) { throw null; } } public partial class AzureKeyVaultSmbCredentials : Azure.ResourceManager.StorageMover.Models.StorageMoverCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -436,6 +448,28 @@ 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 AzureMultiCloudConnectorEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureMultiCloudConnectorEndpointProperties(Azure.Core.ResourceIdentifier multiCloudConnectorId, Azure.Core.ResourceIdentifier awsS3BucketId) { } + public Azure.Core.ResourceIdentifier AwsS3BucketId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier MultiCloudConnectorId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties 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.StorageMover.Models.AzureMultiCloudConnectorEndpointProperties 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 AzureMultiCloudConnectorEndpointUpdateProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureMultiCloudConnectorEndpointUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureMultiCloudConnectorEndpointUpdateProperties 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.StorageMover.Models.AzureMultiCloudConnectorEndpointUpdateProperties 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 AzureStorageBlobContainerEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureStorageBlobContainerEndpointProperties(string storageAccountResourceId, string blobContainerName) { } @@ -458,6 +492,28 @@ 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 AzureStorageNfsFileShareEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureStorageNfsFileShareEndpointProperties(Azure.Core.ResourceIdentifier storageAccountResourceId, string fileShareName) { } + public string FileShareName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties 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.StorageMover.Models.AzureStorageNfsFileShareEndpointProperties 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 AzureStorageNfsFileShareEndpointUpdateProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseUpdateProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureStorageNfsFileShareEndpointUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.AzureStorageNfsFileShareEndpointUpdateProperties 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.StorageMover.Models.AzureStorageNfsFileShareEndpointUpdateProperties 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 AzureStorageSmbFileShareEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureStorageSmbFileShareEndpointProperties(Azure.Core.ResourceIdentifier storageAccountResourceId, string fileShareName) { } @@ -584,6 +640,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.StorageMover.Models.JobRunStatus left, Azure.ResourceManager.StorageMover.Models.JobRunStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobType(string value) { throw null; } + public static Azure.ResourceManager.StorageMover.Models.JobType CloudToCloud { get { throw null; } } + public static Azure.ResourceManager.StorageMover.Models.JobType OnPremToCloud { get { throw null; } } + public bool Equals(Azure.ResourceManager.StorageMover.Models.JobType 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.StorageMover.Models.JobType left, Azure.ResourceManager.StorageMover.Models.JobType right) { throw null; } + public static implicit operator Azure.ResourceManager.StorageMover.Models.JobType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StorageMover.Models.JobType left, Azure.ResourceManager.StorageMover.Models.JobType right) { throw null; } + public override string ToString() { throw null; } + } public partial class NfsMountEndpointProperties : Azure.ResourceManager.StorageMover.Models.EndpointBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NfsMountEndpointProperties(string host, string export) { } @@ -712,6 +786,31 @@ 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 SourceEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SourceEndpointProperties() { } + public Azure.Core.ResourceIdentifier AwsS3BucketId { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Core.ResourceIdentifier SourceEndpointResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties 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.StorageMover.Models.SourceEndpointProperties 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 SourceTargetMap : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SourceTargetMap() { } + public Azure.ResourceManager.StorageMover.Models.SourceEndpointProperties SourceEndpointProperties { get { throw null; } } + public Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties TargetEndpointProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.SourceTargetMap 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.StorageMover.Models.SourceTargetMap 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 StorageMoverAgentPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageMoverAgentPatch() { } @@ -792,6 +891,7 @@ public StorageMoverEndpointPatch() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public string EndpointBaseUpdateDescription { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.StorageMover.Models.EndpointBaseUpdateProperties Properties { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.StorageMover.Models.StorageMoverEndpointPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -843,6 +943,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState left, Azure.ResourceManager.StorageMover.Models.StorageMoverProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class TargetEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetEndpointProperties() { } + public Azure.Core.ResourceIdentifier AzureStorageAccountResourceId { get { throw null; } } + public string AzureStorageBlobContainerName { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetEndpointResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.StorageMover.Models.TargetEndpointProperties 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.StorageMover.Models.TargetEndpointProperties 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 UploadLimitWeeklyRecurrence : Azure.ResourceManager.StorageMover.Models.ScheduleWeeklyRecurrence, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UploadLimitWeeklyRecurrence(Azure.ResourceManager.StorageMover.Models.ScheduleTime startTime, Azure.ResourceManager.StorageMover.Models.ScheduleTime endTime, System.Collections.Generic.IEnumerable days, int limitInMbps) : base (default(Azure.ResourceManager.StorageMover.Models.ScheduleTime), default(Azure.ResourceManager.StorageMover.Models.ScheduleTime), default(System.Collections.Generic.IEnumerable)) { } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Azure.ResourceManager.StorageMover.csproj b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Azure.ResourceManager.StorageMover.csproj index d627f9fb8e94..3bd7ae9846e0 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Azure.ResourceManager.StorageMover.csproj +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Azure.ResourceManager.StorageMover.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0 1.2.1 Azure.ResourceManager.StorageMover diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/ArmStorageMoverModelFactory.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/ArmStorageMoverModelFactory.cs index 3dc8f7b61d78..2928765bc088 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/ArmStorageMoverModelFactory.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/ArmStorageMoverModelFactory.cs @@ -106,10 +106,11 @@ public static StorageMoverAgentPropertiesErrorDetails StorageMoverAgentPropertie /// /// The resource specific properties for the Storage Mover 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 , , and . + /// The available derived classes include , , , , and . /// + /// The managed service identity of the resource. This property is only available on the latest version. /// A new instance for mocking. - public static StorageMoverEndpointData StorageMoverEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EndpointBaseProperties properties = null) + public static StorageMoverEndpointData StorageMoverEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EndpointBaseProperties properties = null, ManagedServiceIdentity identity = null) { return new StorageMoverEndpointData( id, @@ -117,6 +118,7 @@ public static StorageMoverEndpointData StorageMoverEndpointData(ResourceIdentifi resourceType, systemData, properties, + identity, serializedAdditionalRawData: null); } @@ -202,6 +204,40 @@ public static SmbMountEndpointProperties SmbMountEndpointProperties(string descr credentials); } + /// Initializes a new instance of . + /// A description for the Endpoint. + /// The provisioning state of this resource. + /// The Azure Resource ID of the storage account. + /// The name of the Azure Storage NFS file share. + /// A new instance for mocking. + public static AzureStorageNfsFileShareEndpointProperties AzureStorageNfsFileShareEndpointProperties(string description = null, StorageMoverProvisioningState? provisioningState = null, ResourceIdentifier storageAccountResourceId = null, string fileShareName = null) + { + return new AzureStorageNfsFileShareEndpointProperties( + EndpointType.AzureStorageNfsFileShare, + description, + provisioningState, + serializedAdditionalRawData: null, + storageAccountResourceId, + fileShareName); + } + + /// Initializes a new instance of . + /// A description for the Endpoint. + /// The provisioning state of this resource. + /// The Azure Resource ID of the MultiCloud Connector resource. + /// The AWS S3 bucket ARM resource Id. + /// A new instance for mocking. + public static AzureMultiCloudConnectorEndpointProperties AzureMultiCloudConnectorEndpointProperties(string description = null, StorageMoverProvisioningState? provisioningState = null, ResourceIdentifier multiCloudConnectorId = null, ResourceIdentifier awsS3BucketId = null) + { + return new AzureMultiCloudConnectorEndpointProperties( + EndpointType.AzureMultiCloudConnector, + description, + provisioningState, + serializedAdditionalRawData: null, + multiCloudConnectorId, + awsS3BucketId); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -227,7 +263,8 @@ public static StorageMoverProjectData StorageMoverProjectData(ResourceIdentifier /// The name. /// The resourceType. /// The systemData. - /// A description for the Job Definition. + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. + /// The type of the Job. /// Strategy to use for copy. /// The name of the source Endpoint. /// Fully qualified resource ID of the source Endpoint. @@ -240,16 +277,20 @@ public static StorageMoverProjectData StorageMoverProjectData(ResourceIdentifier /// The current status of the Job Run in a non-terminal state, if exists. /// Name of the Agent to assign for new Job Runs of this Job Definition. /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// The list of cloud endpoints to migrate. /// The provisioning state of this resource. /// A new instance for mocking. - public static JobDefinitionData JobDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, StorageMoverCopyMode copyMode = default, string sourceName = null, ResourceIdentifier sourceResourceId = null, string sourceSubpath = null, string targetName = null, ResourceIdentifier targetResourceId = null, string targetSubpath = null, string latestJobRunName = null, ResourceIdentifier latestJobRunResourceId = null, JobRunStatus? latestJobRunStatus = null, string agentName = null, ResourceIdentifier agentResourceId = null, StorageMoverProvisioningState? provisioningState = null) + public static JobDefinitionData JobDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, JobType? jobType = null, StorageMoverCopyMode copyMode = default, string sourceName = null, ResourceIdentifier sourceResourceId = null, string sourceSubpath = null, string targetName = null, ResourceIdentifier targetResourceId = null, string targetSubpath = null, string latestJobRunName = null, ResourceIdentifier latestJobRunResourceId = null, JobRunStatus? latestJobRunStatus = null, string agentName = null, ResourceIdentifier agentResourceId = null, IEnumerable sourceTargetMapValue = null, StorageMoverProvisioningState? provisioningState = null) { + sourceTargetMapValue ??= new List(); + return new JobDefinitionData( id, name, resourceType, systemData, description, + jobType, copyMode, sourceName, sourceResourceId, @@ -262,10 +303,41 @@ public static JobDefinitionData JobDefinitionData(ResourceIdentifier id = null, latestJobRunStatus, agentName, agentResourceId, + sourceTargetMapValue != null ? new JobDefinitionPropertiesSourceTargetMap(sourceTargetMapValue?.ToList(), serializedAdditionalRawData: null) : null, provisioningState, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static SourceTargetMap SourceTargetMap(SourceEndpointProperties sourceEndpointProperties = null, TargetEndpointProperties targetEndpointProperties = null) + { + return new SourceTargetMap(sourceEndpointProperties != null ? new SourceEndpoint(sourceEndpointProperties, serializedAdditionalRawData: null) : null, targetEndpointProperties != null ? new TargetEndpoint(targetEndpointProperties, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the cloud source endpoint to migrate. + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + /// A new instance for mocking. + public static SourceEndpointProperties SourceEndpointProperties(string name = null, ResourceIdentifier sourceEndpointResourceId = null, ResourceIdentifier awsS3BucketId = null) + { + return new SourceEndpointProperties(name, sourceEndpointResourceId, awsS3BucketId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the cloud target endpoint to migrate. + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + /// The fully qualified ARM resource ID of the Azure Storage account. + /// The name of the Azure Storage blob container. + /// A new instance for mocking. + public static TargetEndpointProperties TargetEndpointProperties(string name = null, ResourceIdentifier targetEndpointResourceId = null, ResourceIdentifier azureStorageAccountResourceId = null, string azureStorageBlobContainerName = null) + { + return new TargetEndpointProperties(name, targetEndpointResourceId, azureStorageAccountResourceId, azureStorageBlobContainerName, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Fully qualified resource id of the Job Run. /// A new instance for mocking. @@ -356,6 +428,49 @@ public static JobRunError JobRunError(string code = null, string message = null, return new JobRunError(code, message, target, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The resource specific properties for the Storage Mover 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 , , and . + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static StorageMoverEndpointData StorageMoverEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointBaseProperties properties) + { + return StorageMoverEndpointData(id: id, name: name, resourceType: resourceType, systemData: systemData, properties: properties, identity: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A description for the Job Definition. + /// Strategy to use for copy. + /// The name of the source Endpoint. + /// Fully qualified resource ID of the source Endpoint. + /// The subpath to use when reading from the source Endpoint. + /// The name of the target Endpoint. + /// Fully qualified resource ID of the target Endpoint. + /// The subpath to use when writing to the target Endpoint. + /// The name of the Job Run in a non-terminal state, if exists. + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// The current status of the Job Run in a non-terminal state, if exists. + /// Name of the Agent to assign for new Job Runs of this Job Definition. + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// The provisioning state of this resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static JobDefinitionData JobDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, StorageMoverCopyMode copyMode, string sourceName, ResourceIdentifier sourceResourceId, string sourceSubpath, string targetName, ResourceIdentifier targetResourceId, string targetSubpath, string latestJobRunName, ResourceIdentifier latestJobRunResourceId, JobRunStatus? latestJobRunStatus, string agentName, ResourceIdentifier agentResourceId, StorageMoverProvisioningState? provisioningState) + { + return JobDefinitionData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, jobType: default, copyMode: copyMode, sourceName: sourceName, sourceResourceId: sourceResourceId, sourceSubpath: sourceSubpath, targetName: targetName, targetResourceId: targetResourceId, targetSubpath: targetSubpath, latestJobRunName: latestJobRunName, latestJobRunResourceId: latestJobRunResourceId, latestJobRunStatus: latestJobRunStatus, agentName: agentName, agentResourceId: agentResourceId, sourceTargetMapValue: default, provisioningState: provisioningState); + } + /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverResourceGroupResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverResourceGroupResource.cs index cbd645b12c77..cec73998e7f8 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverResourceGroupResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual StorageMoverCollection GetStorageMovers() /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetStorageMoverAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverSubscriptionResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverSubscriptionResource.cs index b93afa835235..725d425d4f2d 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverSubscriptionResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/MockableStorageMoverSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetStorageMoversAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/StorageMoverExtensions.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/StorageMoverExtensions.cs index 8b7c542623bb..bedc6d042420 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/StorageMoverExtensions.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Extensions/StorageMoverExtensions.cs @@ -176,7 +176,7 @@ public static StorageMoverCollection GetStorageMovers(this ResourceGroupResource /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -214,7 +214,7 @@ public static async Task> GetStorageMoverAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public static Response GetStorageMover(this ResourceGroupR /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -288,7 +288,7 @@ public static AsyncPageable GetStorageMoversAsync(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionCollection.cs index 8a37d01d3041..76de6c5d81ff 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string jobDe /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string jobDefinitionName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string jobDefinitionName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string jobDefinitionName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.Serialization.cs index 1a22be1768e2..fa6dc2adf833 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.Serialization.cs @@ -45,6 +45,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(JobType)) + { + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.Value.ToString()); + } writer.WritePropertyName("copyMode"u8); writer.WriteStringValue(CopyMode.ToString()); writer.WritePropertyName("sourceName"u8); @@ -96,6 +101,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("agentResourceId"u8); writer.WriteStringValue(AgentResourceId); } + if (Optional.IsDefined(SourceTargetMap)) + { + writer.WritePropertyName("sourceTargetMap"u8); + writer.WriteObjectValue(SourceTargetMap, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -129,6 +139,7 @@ internal static JobDefinitionData DeserializeJobDefinitionData(JsonElement eleme ResourceType type = default; SystemData systemData = default; string description = default; + JobType? jobType = default; StorageMoverCopyMode copyMode = default; string sourceName = default; ResourceIdentifier sourceResourceId = default; @@ -141,6 +152,7 @@ internal static JobDefinitionData DeserializeJobDefinitionData(JsonElement eleme JobRunStatus? latestJobRunStatus = default; string agentName = default; ResourceIdentifier agentResourceId = default; + JobDefinitionPropertiesSourceTargetMap sourceTargetMap = default; StorageMoverProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -184,6 +196,15 @@ internal static JobDefinitionData DeserializeJobDefinitionData(JsonElement eleme description = property0.Value.GetString(); continue; } + if (property0.NameEquals("jobType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobType = new JobType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("copyMode"u8)) { copyMode = new StorageMoverCopyMode(property0.Value.GetString()); @@ -264,6 +285,15 @@ internal static JobDefinitionData DeserializeJobDefinitionData(JsonElement eleme agentResourceId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("sourceTargetMap"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceTargetMap = JobDefinitionPropertiesSourceTargetMap.DeserializeJobDefinitionPropertiesSourceTargetMap(property0.Value, options); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -288,6 +318,7 @@ internal static JobDefinitionData DeserializeJobDefinitionData(JsonElement eleme type, systemData, description, + jobType, copyMode, sourceName, sourceResourceId, @@ -300,6 +331,7 @@ internal static JobDefinitionData DeserializeJobDefinitionData(JsonElement eleme latestJobRunStatus, agentName, agentResourceId, + sourceTargetMap, provisioningState, serializedAdditionalRawData); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.cs index 9b5569eb8b60..3471f6abcd8f 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionData.cs @@ -71,7 +71,8 @@ public JobDefinitionData(StorageMoverCopyMode copyMode, string sourceName, strin /// The name. /// The resourceType. /// The systemData. - /// A description for the Job Definition. + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. + /// The type of the Job. /// Strategy to use for copy. /// The name of the source Endpoint. /// Fully qualified resource ID of the source Endpoint. @@ -84,11 +85,13 @@ public JobDefinitionData(StorageMoverCopyMode copyMode, string sourceName, strin /// The current status of the Job Run in a non-terminal state, if exists. /// Name of the Agent to assign for new Job Runs of this Job Definition. /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// The list of cloud endpoints to migrate. /// The provisioning state of this resource. /// Keeps track of any properties unknown to the library. - internal JobDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, StorageMoverCopyMode copyMode, string sourceName, ResourceIdentifier sourceResourceId, string sourceSubpath, string targetName, ResourceIdentifier targetResourceId, string targetSubpath, string latestJobRunName, ResourceIdentifier latestJobRunResourceId, JobRunStatus? latestJobRunStatus, string agentName, ResourceIdentifier agentResourceId, StorageMoverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal JobDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, JobType? jobType, StorageMoverCopyMode copyMode, string sourceName, ResourceIdentifier sourceResourceId, string sourceSubpath, string targetName, ResourceIdentifier targetResourceId, string targetSubpath, string latestJobRunName, ResourceIdentifier latestJobRunResourceId, JobRunStatus? latestJobRunStatus, string agentName, ResourceIdentifier agentResourceId, JobDefinitionPropertiesSourceTargetMap sourceTargetMap, StorageMoverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; + JobType = jobType; CopyMode = copyMode; SourceName = sourceName; SourceResourceId = sourceResourceId; @@ -101,6 +104,7 @@ internal JobDefinitionData(ResourceIdentifier id, string name, ResourceType reso LatestJobRunStatus = latestJobRunStatus; AgentName = agentName; AgentResourceId = agentResourceId; + SourceTargetMap = sourceTargetMap; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -110,8 +114,10 @@ internal JobDefinitionData() { } - /// A description for the Job Definition. + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. public string Description { get; set; } + /// The type of the Job. + public JobType? JobType { get; set; } /// Strategy to use for copy. public StorageMoverCopyMode CopyMode { get; set; } /// The name of the source Endpoint. @@ -136,6 +142,19 @@ internal JobDefinitionData() public string AgentName { get; set; } /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. public ResourceIdentifier AgentResourceId { get; } + /// The list of cloud endpoints to migrate. + internal JobDefinitionPropertiesSourceTargetMap SourceTargetMap { get; set; } + /// Gets the source target map value. + public IReadOnlyList SourceTargetMapValue + { + get + { + if (SourceTargetMap is null) + SourceTargetMap = new JobDefinitionPropertiesSourceTargetMap(); + return SourceTargetMap.Value; + } + } + /// The provisioning state of this resource. public StorageMoverProvisioningState? ProvisioningState { get; } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.cs index 9c25f38d62ba..b88a95bee5b8 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.cs @@ -110,7 +110,7 @@ public virtual JobRunCollection GetJobRuns() /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetJobRunAsync(string jobRun /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetJobRun(string jobRunName, Cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> UpdateAsync(JobDefini /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(JobDefinitionPatch patch, /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> StartJobAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -496,7 +496,7 @@ public virtual Response StartJob(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> StopJobAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunCollection.cs index cbfd710f5cda..49c094085709 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string jobRunName, /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string jobRunName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string jobRunName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string jobRunName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsync(str /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.cs index 3f10d058c85e..d1441e08cbed 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointProperties.Serialization.cs new file mode 100644 index 000000000000..6977c80d5759 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointProperties.Serialization.cs @@ -0,0 +1,148 @@ +// 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.StorageMover.Models +{ + public partial class AzureMultiCloudConnectorEndpointProperties : 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(AzureMultiCloudConnectorEndpointProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("multiCloudConnectorId"u8); + writer.WriteStringValue(MultiCloudConnectorId); + writer.WritePropertyName("awsS3BucketId"u8); + writer.WriteStringValue(AwsS3BucketId); + } + + AzureMultiCloudConnectorEndpointProperties 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(AzureMultiCloudConnectorEndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureMultiCloudConnectorEndpointProperties(document.RootElement, options); + } + + internal static AzureMultiCloudConnectorEndpointProperties DeserializeAzureMultiCloudConnectorEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier multiCloudConnectorId = default; + ResourceIdentifier awsS3BucketId = default; + EndpointType endpointType = default; + string description = default; + StorageMoverProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("multiCloudConnectorId"u8)) + { + multiCloudConnectorId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("awsS3BucketId"u8)) + { + awsS3BucketId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new StorageMoverProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureMultiCloudConnectorEndpointProperties( + endpointType, + description, + provisioningState, + serializedAdditionalRawData, + multiCloudConnectorId, + awsS3BucketId); + } + + 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(AzureMultiCloudConnectorEndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + AzureMultiCloudConnectorEndpointProperties 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 DeserializeAzureMultiCloudConnectorEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureMultiCloudConnectorEndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointProperties.cs new file mode 100644 index 000000000000..1fbd7c6dbe97 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointProperties.cs @@ -0,0 +1,55 @@ +// 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.StorageMover.Models +{ + /// The properties of Azure MultiCloudConnector endpoint. + public partial class AzureMultiCloudConnectorEndpointProperties : EndpointBaseProperties + { + /// Initializes a new instance of . + /// The Azure Resource ID of the MultiCloud Connector resource. + /// The AWS S3 bucket ARM resource Id. + /// or is null. + public AzureMultiCloudConnectorEndpointProperties(ResourceIdentifier multiCloudConnectorId, ResourceIdentifier awsS3BucketId) + { + Argument.AssertNotNull(multiCloudConnectorId, nameof(multiCloudConnectorId)); + Argument.AssertNotNull(awsS3BucketId, nameof(awsS3BucketId)); + + MultiCloudConnectorId = multiCloudConnectorId; + AwsS3BucketId = awsS3BucketId; + EndpointType = EndpointType.AzureMultiCloudConnector; + } + + /// Initializes a new instance of . + /// The Endpoint resource type. + /// A description for the Endpoint. + /// The provisioning state of this resource. + /// Keeps track of any properties unknown to the library. + /// The Azure Resource ID of the MultiCloud Connector resource. + /// The AWS S3 bucket ARM resource Id. + internal AzureMultiCloudConnectorEndpointProperties(EndpointType endpointType, string description, StorageMoverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData, ResourceIdentifier multiCloudConnectorId, ResourceIdentifier awsS3BucketId) : base(endpointType, description, provisioningState, serializedAdditionalRawData) + { + MultiCloudConnectorId = multiCloudConnectorId; + AwsS3BucketId = awsS3BucketId; + EndpointType = endpointType; + } + + /// Initializes a new instance of for deserialization. + internal AzureMultiCloudConnectorEndpointProperties() + { + } + + /// The Azure Resource ID of the MultiCloud Connector resource. + public ResourceIdentifier MultiCloudConnectorId { get; set; } + /// The AWS S3 bucket ARM resource Id. + public ResourceIdentifier AwsS3BucketId { get; set; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointUpdateProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..a43462a6968f --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointUpdateProperties.Serialization.cs @@ -0,0 +1,116 @@ +// 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.StorageMover.Models +{ + public partial class AzureMultiCloudConnectorEndpointUpdateProperties : 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(AzureMultiCloudConnectorEndpointUpdateProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureMultiCloudConnectorEndpointUpdateProperties 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(AzureMultiCloudConnectorEndpointUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureMultiCloudConnectorEndpointUpdateProperties(document.RootElement, options); + } + + internal static AzureMultiCloudConnectorEndpointUpdateProperties DeserializeAzureMultiCloudConnectorEndpointUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EndpointType endpointType = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureMultiCloudConnectorEndpointUpdateProperties(endpointType, description, 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(AzureMultiCloudConnectorEndpointUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AzureMultiCloudConnectorEndpointUpdateProperties 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 DeserializeAzureMultiCloudConnectorEndpointUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureMultiCloudConnectorEndpointUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointUpdateProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointUpdateProperties.cs new file mode 100644 index 000000000000..e36f743fe21a --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureMultiCloudConnectorEndpointUpdateProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The properties of Azure Storage NFS file share endpoint to update. + public partial class AzureMultiCloudConnectorEndpointUpdateProperties : EndpointBaseUpdateProperties + { + /// Initializes a new instance of . + public AzureMultiCloudConnectorEndpointUpdateProperties() + { + EndpointType = EndpointType.AzureMultiCloudConnector; + } + + /// Initializes a new instance of . + /// The Endpoint resource type. + /// A description for the Endpoint. + /// Keeps track of any properties unknown to the library. + internal AzureMultiCloudConnectorEndpointUpdateProperties(EndpointType endpointType, string description, IDictionary serializedAdditionalRawData) : base(endpointType, description, serializedAdditionalRawData) + { + EndpointType = endpointType; + } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureResourceManagerStorageMoverContext.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureResourceManagerStorageMoverContext.cs index 3f82240e3830..6e10753459be 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureResourceManagerStorageMoverContext.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureResourceManagerStorageMoverContext.cs @@ -17,8 +17,12 @@ namespace Azure.ResourceManager.StorageMover /// [ModelReaderWriterBuildable(typeof(AgentList))] [ModelReaderWriterBuildable(typeof(AzureKeyVaultSmbCredentials))] + [ModelReaderWriterBuildable(typeof(AzureMultiCloudConnectorEndpointProperties))] + [ModelReaderWriterBuildable(typeof(AzureMultiCloudConnectorEndpointUpdateProperties))] [ModelReaderWriterBuildable(typeof(AzureStorageBlobContainerEndpointProperties))] [ModelReaderWriterBuildable(typeof(AzureStorageBlobContainerEndpointUpdateProperties))] + [ModelReaderWriterBuildable(typeof(AzureStorageNfsFileShareEndpointProperties))] + [ModelReaderWriterBuildable(typeof(AzureStorageNfsFileShareEndpointUpdateProperties))] [ModelReaderWriterBuildable(typeof(AzureStorageSmbFileShareEndpointProperties))] [ModelReaderWriterBuildable(typeof(AzureStorageSmbFileShareEndpointUpdateProperties))] [ModelReaderWriterBuildable(typeof(EndpointBaseProperties))] @@ -27,12 +31,14 @@ namespace Azure.ResourceManager.StorageMover [ModelReaderWriterBuildable(typeof(JobDefinitionData))] [ModelReaderWriterBuildable(typeof(JobDefinitionList))] [ModelReaderWriterBuildable(typeof(JobDefinitionPatch))] + [ModelReaderWriterBuildable(typeof(JobDefinitionPropertiesSourceTargetMap))] [ModelReaderWriterBuildable(typeof(JobDefinitionResource))] [ModelReaderWriterBuildable(typeof(JobRunData))] [ModelReaderWriterBuildable(typeof(JobRunError))] [ModelReaderWriterBuildable(typeof(JobRunList))] [ModelReaderWriterBuildable(typeof(JobRunResource))] [ModelReaderWriterBuildable(typeof(JobRunResourceId))] + [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(NfsMountEndpointProperties))] [ModelReaderWriterBuildable(typeof(NfsMountEndpointUpdateProperties))] [ModelReaderWriterBuildable(typeof(ProjectList))] @@ -42,6 +48,9 @@ namespace Azure.ResourceManager.StorageMover [ModelReaderWriterBuildable(typeof(ScheduleWeeklyRecurrence))] [ModelReaderWriterBuildable(typeof(SmbMountEndpointProperties))] [ModelReaderWriterBuildable(typeof(SmbMountEndpointUpdateProperties))] + [ModelReaderWriterBuildable(typeof(SourceEndpoint))] + [ModelReaderWriterBuildable(typeof(SourceEndpointProperties))] + [ModelReaderWriterBuildable(typeof(SourceTargetMap))] [ModelReaderWriterBuildable(typeof(StorageMoverAgentData))] [ModelReaderWriterBuildable(typeof(StorageMoverAgentPatch))] [ModelReaderWriterBuildable(typeof(StorageMoverAgentPropertiesErrorDetails))] @@ -58,11 +67,14 @@ namespace Azure.ResourceManager.StorageMover [ModelReaderWriterBuildable(typeof(StorageMoverProjectResource))] [ModelReaderWriterBuildable(typeof(StorageMoverResource))] [ModelReaderWriterBuildable(typeof(SystemData))] + [ModelReaderWriterBuildable(typeof(TargetEndpoint))] + [ModelReaderWriterBuildable(typeof(TargetEndpointProperties))] [ModelReaderWriterBuildable(typeof(UnknownCredentials))] [ModelReaderWriterBuildable(typeof(UnknownEndpointBaseProperties))] [ModelReaderWriterBuildable(typeof(UnknownEndpointBaseUpdateProperties))] [ModelReaderWriterBuildable(typeof(UploadLimitSchedule))] [ModelReaderWriterBuildable(typeof(UploadLimitWeeklyRecurrence))] + [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerStorageMoverContext : ModelReaderWriterContext { } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointProperties.Serialization.cs new file mode 100644 index 000000000000..a7e46841494b --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointProperties.Serialization.cs @@ -0,0 +1,148 @@ +// 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.StorageMover.Models +{ + public partial class AzureStorageNfsFileShareEndpointProperties : 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(AzureStorageNfsFileShareEndpointProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("storageAccountResourceId"u8); + writer.WriteStringValue(StorageAccountResourceId); + writer.WritePropertyName("fileShareName"u8); + writer.WriteStringValue(FileShareName); + } + + AzureStorageNfsFileShareEndpointProperties 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(AzureStorageNfsFileShareEndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureStorageNfsFileShareEndpointProperties(document.RootElement, options); + } + + internal static AzureStorageNfsFileShareEndpointProperties DeserializeAzureStorageNfsFileShareEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier storageAccountResourceId = default; + string fileShareName = default; + EndpointType endpointType = default; + string description = default; + StorageMoverProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageAccountResourceId"u8)) + { + storageAccountResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("fileShareName"u8)) + { + fileShareName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new StorageMoverProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureStorageNfsFileShareEndpointProperties( + endpointType, + description, + provisioningState, + serializedAdditionalRawData, + storageAccountResourceId, + fileShareName); + } + + 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(AzureStorageNfsFileShareEndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + AzureStorageNfsFileShareEndpointProperties 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 DeserializeAzureStorageNfsFileShareEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureStorageNfsFileShareEndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointProperties.cs new file mode 100644 index 000000000000..faf58b8c6c84 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointProperties.cs @@ -0,0 +1,55 @@ +// 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.StorageMover.Models +{ + /// The properties of Azure Storage NFS file share endpoint. + public partial class AzureStorageNfsFileShareEndpointProperties : EndpointBaseProperties + { + /// Initializes a new instance of . + /// The Azure Resource ID of the storage account. + /// The name of the Azure Storage NFS file share. + /// or is null. + public AzureStorageNfsFileShareEndpointProperties(ResourceIdentifier storageAccountResourceId, string fileShareName) + { + Argument.AssertNotNull(storageAccountResourceId, nameof(storageAccountResourceId)); + Argument.AssertNotNull(fileShareName, nameof(fileShareName)); + + StorageAccountResourceId = storageAccountResourceId; + FileShareName = fileShareName; + EndpointType = EndpointType.AzureStorageNfsFileShare; + } + + /// Initializes a new instance of . + /// The Endpoint resource type. + /// A description for the Endpoint. + /// The provisioning state of this resource. + /// Keeps track of any properties unknown to the library. + /// The Azure Resource ID of the storage account. + /// The name of the Azure Storage NFS file share. + internal AzureStorageNfsFileShareEndpointProperties(EndpointType endpointType, string description, StorageMoverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData, ResourceIdentifier storageAccountResourceId, string fileShareName) : base(endpointType, description, provisioningState, serializedAdditionalRawData) + { + StorageAccountResourceId = storageAccountResourceId; + FileShareName = fileShareName; + EndpointType = endpointType; + } + + /// Initializes a new instance of for deserialization. + internal AzureStorageNfsFileShareEndpointProperties() + { + } + + /// The Azure Resource ID of the storage account. + public ResourceIdentifier StorageAccountResourceId { get; set; } + /// The name of the Azure Storage NFS file share. + public string FileShareName { get; set; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointUpdateProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..2df0db7a466d --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointUpdateProperties.Serialization.cs @@ -0,0 +1,116 @@ +// 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.StorageMover.Models +{ + public partial class AzureStorageNfsFileShareEndpointUpdateProperties : 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(AzureStorageNfsFileShareEndpointUpdateProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureStorageNfsFileShareEndpointUpdateProperties 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(AzureStorageNfsFileShareEndpointUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureStorageNfsFileShareEndpointUpdateProperties(document.RootElement, options); + } + + internal static AzureStorageNfsFileShareEndpointUpdateProperties DeserializeAzureStorageNfsFileShareEndpointUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EndpointType endpointType = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureStorageNfsFileShareEndpointUpdateProperties(endpointType, description, 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(AzureStorageNfsFileShareEndpointUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AzureStorageNfsFileShareEndpointUpdateProperties 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 DeserializeAzureStorageNfsFileShareEndpointUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureStorageNfsFileShareEndpointUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointUpdateProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointUpdateProperties.cs new file mode 100644 index 000000000000..23af67553705 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/AzureStorageNfsFileShareEndpointUpdateProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The properties of Azure Storage NFS file share endpoint to update. + public partial class AzureStorageNfsFileShareEndpointUpdateProperties : EndpointBaseUpdateProperties + { + /// Initializes a new instance of . + public AzureStorageNfsFileShareEndpointUpdateProperties() + { + EndpointType = EndpointType.AzureStorageNfsFileShare; + } + + /// Initializes a new instance of . + /// The Endpoint resource type. + /// A description for the Endpoint. + /// Keeps track of any properties unknown to the library. + internal AzureStorageNfsFileShareEndpointUpdateProperties(EndpointType endpointType, string description, IDictionary serializedAdditionalRawData) : base(endpointType, description, serializedAdditionalRawData) + { + EndpointType = endpointType; + } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.Serialization.cs index 5d69124c2dff..0b759a8e4593 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.Serialization.cs @@ -87,7 +87,9 @@ internal static EndpointBaseProperties DeserializeEndpointBaseProperties(JsonEle { switch (discriminator.GetString()) { + case "AzureMultiCloudConnector": return AzureMultiCloudConnectorEndpointProperties.DeserializeAzureMultiCloudConnectorEndpointProperties(element, options); case "AzureStorageBlobContainer": return AzureStorageBlobContainerEndpointProperties.DeserializeAzureStorageBlobContainerEndpointProperties(element, options); + case "AzureStorageNfsFileShare": return AzureStorageNfsFileShareEndpointProperties.DeserializeAzureStorageNfsFileShareEndpointProperties(element, options); case "AzureStorageSmbFileShare": return AzureStorageSmbFileShareEndpointProperties.DeserializeAzureStorageSmbFileShareEndpointProperties(element, options); case "NfsMount": return NfsMountEndpointProperties.DeserializeNfsMountEndpointProperties(element, options); case "SmbMount": return SmbMountEndpointProperties.DeserializeSmbMountEndpointProperties(element, options); diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.cs index 07d227e516da..2f3d5595ef26 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseProperties.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.StorageMover.Models /// /// The resource specific properties for the Storage Mover 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 , , and . + /// The available derived classes include , , , , and . /// public abstract partial class EndpointBaseProperties { diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.Serialization.cs index 16c3216342e8..d8b149844279 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.Serialization.cs @@ -82,7 +82,9 @@ internal static EndpointBaseUpdateProperties DeserializeEndpointBaseUpdateProper { switch (discriminator.GetString()) { + case "AzureMultiCloudConnector": return AzureMultiCloudConnectorEndpointUpdateProperties.DeserializeAzureMultiCloudConnectorEndpointUpdateProperties(element, options); case "AzureStorageBlobContainer": return AzureStorageBlobContainerEndpointUpdateProperties.DeserializeAzureStorageBlobContainerEndpointUpdateProperties(element, options); + case "AzureStorageNfsFileShare": return AzureStorageNfsFileShareEndpointUpdateProperties.DeserializeAzureStorageNfsFileShareEndpointUpdateProperties(element, options); case "AzureStorageSmbFileShare": return AzureStorageSmbFileShareEndpointUpdateProperties.DeserializeAzureStorageSmbFileShareEndpointUpdateProperties(element, options); case "NfsMount": return NfsMountEndpointUpdateProperties.DeserializeNfsMountEndpointUpdateProperties(element, options); case "SmbMount": return SmbMountEndpointUpdateProperties.DeserializeSmbMountEndpointUpdateProperties(element, options); diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.cs index c9ab7955e46a..d8935778d2cf 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointBaseUpdateProperties.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.StorageMover.Models /// /// The Endpoint resource, which contains information about file sources and targets. /// 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 , , and . + /// The available derived classes include , , , , and . /// public abstract partial class EndpointBaseUpdateProperties { diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointType.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointType.cs index 10c7ec6f6172..791511705239 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointType.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/EndpointType.cs @@ -26,6 +26,8 @@ public EndpointType(string value) private const string NfsMountValue = "NfsMount"; private const string AzureStorageSmbFileShareValue = "AzureStorageSmbFileShare"; private const string SmbMountValue = "SmbMount"; + private const string AzureMultiCloudConnectorValue = "AzureMultiCloudConnector"; + private const string AzureStorageNfsFileShareValue = "AzureStorageNfsFileShare"; /// AzureStorageBlobContainer. public static EndpointType AzureStorageBlobContainer { get; } = new EndpointType(AzureStorageBlobContainerValue); @@ -35,6 +37,10 @@ public EndpointType(string value) public static EndpointType AzureStorageSmbFileShare { get; } = new EndpointType(AzureStorageSmbFileShareValue); /// SmbMount. public static EndpointType SmbMount { get; } = new EndpointType(SmbMountValue); + /// AzureMultiCloudConnector. + public static EndpointType AzureMultiCloudConnector { get; } = new EndpointType(AzureMultiCloudConnectorValue); + /// AzureStorageNfsFileShare. + public static EndpointType AzureStorageNfsFileShare { get; } = new EndpointType(AzureStorageNfsFileShareValue); /// Determines if two values are the same. public static bool operator ==(EndpointType left, EndpointType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobDefinitionPropertiesSourceTargetMap.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobDefinitionPropertiesSourceTargetMap.Serialization.cs new file mode 100644 index 000000000000..3524f54556b0 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobDefinitionPropertiesSourceTargetMap.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.Core; + +namespace Azure.ResourceManager.StorageMover.Models +{ + internal partial class JobDefinitionPropertiesSourceTargetMap : 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(JobDefinitionPropertiesSourceTargetMap)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && 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 + } + } + } + + JobDefinitionPropertiesSourceTargetMap 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(JobDefinitionPropertiesSourceTargetMap)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobDefinitionPropertiesSourceTargetMap(document.RootElement, options); + } + + internal static JobDefinitionPropertiesSourceTargetMap DeserializeJobDefinitionPropertiesSourceTargetMap(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(SourceTargetMap.DeserializeSourceTargetMap(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new JobDefinitionPropertiesSourceTargetMap(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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(JobDefinitionPropertiesSourceTargetMap)} does not support writing '{options.Format}' format."); + } + } + + JobDefinitionPropertiesSourceTargetMap 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 DeserializeJobDefinitionPropertiesSourceTargetMap(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobDefinitionPropertiesSourceTargetMap)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobDefinitionPropertiesSourceTargetMap.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobDefinitionPropertiesSourceTargetMap.cs new file mode 100644 index 000000000000..f51b9ab58c0b --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobDefinitionPropertiesSourceTargetMap.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The JobDefinitionPropertiesSourceTargetMap. + internal partial class JobDefinitionPropertiesSourceTargetMap + { + /// + /// 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 JobDefinitionPropertiesSourceTargetMap() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal JobDefinitionPropertiesSourceTargetMap(IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobType.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobType.cs new file mode 100644 index 000000000000..70ee3fdd0150 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/JobType.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.StorageMover.Models +{ + /// The type of the Job. + public readonly partial struct JobType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OnPremToCloudValue = "OnPremToCloud"; + private const string CloudToCloudValue = "CloudToCloud"; + + /// OnPremToCloud. + public static JobType OnPremToCloud { get; } = new JobType(OnPremToCloudValue); + /// CloudToCloud. + public static JobType CloudToCloud { get; } = new JobType(CloudToCloudValue); + /// Determines if two values are the same. + public static bool operator ==(JobType left, JobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobType left, JobType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobType(string value) => new JobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobType other && Equals(other); + /// + public bool Equals(JobType 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/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpoint.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpoint.Serialization.cs new file mode 100644 index 000000000000..4d0211e3d47c --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpoint.Serialization.cs @@ -0,0 +1,133 @@ +// 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.StorageMover.Models +{ + internal partial class SourceEndpoint : 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(SourceEndpoint)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + SourceEndpoint 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(SourceEndpoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSourceEndpoint(document.RootElement, options); + } + + internal static SourceEndpoint DeserializeSourceEndpoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SourceEndpointProperties properties = 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 = SourceEndpointProperties.DeserializeSourceEndpointProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SourceEndpoint(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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(SourceEndpoint)} does not support writing '{options.Format}' format."); + } + } + + SourceEndpoint 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 DeserializeSourceEndpoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SourceEndpoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpoint.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpoint.cs new file mode 100644 index 000000000000..2a7fe49c0e0e --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpoint.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The source endpoint resource for source and target mapping. + internal partial class SourceEndpoint + { + /// + /// 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 . + internal SourceEndpoint() + { + } + + /// Initializes a new instance of . + /// The properties of the cloud source endpoint to migrate. + /// Keeps track of any properties unknown to the library. + internal SourceEndpoint(SourceEndpointProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The properties of the cloud source endpoint to migrate. + public SourceEndpointProperties Properties { get; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpointProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpointProperties.Serialization.cs new file mode 100644 index 000000000000..13a5d5268b0e --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpointProperties.Serialization.cs @@ -0,0 +1,159 @@ +// 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.StorageMover.Models +{ + public partial class SourceEndpointProperties : 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(SourceEndpointProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(SourceEndpointResourceId)) + { + writer.WritePropertyName("sourceEndpointResourceId"u8); + writer.WriteStringValue(SourceEndpointResourceId); + } + if (Optional.IsDefined(AwsS3BucketId)) + { + writer.WritePropertyName("awsS3BucketId"u8); + writer.WriteStringValue(AwsS3BucketId); + } + 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 + } + } + } + + SourceEndpointProperties 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(SourceEndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSourceEndpointProperties(document.RootElement, options); + } + + internal static SourceEndpointProperties DeserializeSourceEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceIdentifier sourceEndpointResourceId = default; + ResourceIdentifier awsS3BucketId = 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("sourceEndpointResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceEndpointResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("awsS3BucketId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + awsS3BucketId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SourceEndpointProperties(name, sourceEndpointResourceId, awsS3BucketId, 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(SourceEndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + SourceEndpointProperties 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 DeserializeSourceEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SourceEndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpointProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpointProperties.cs new file mode 100644 index 000000000000..da9996cfdd7e --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceEndpointProperties.cs @@ -0,0 +1,74 @@ +// 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.StorageMover.Models +{ + /// The properties of the cloud source endpoint to migrate. + public partial class SourceEndpointProperties + { + /// + /// 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 . + internal SourceEndpointProperties() + { + } + + /// Initializes a new instance of . + /// The name of the cloud source endpoint to migrate. + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + /// Keeps track of any properties unknown to the library. + internal SourceEndpointProperties(string name, ResourceIdentifier sourceEndpointResourceId, ResourceIdentifier awsS3BucketId, IDictionary serializedAdditionalRawData) + { + Name = name; + SourceEndpointResourceId = sourceEndpointResourceId; + AwsS3BucketId = awsS3BucketId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the cloud source endpoint to migrate. + public string Name { get; } + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + public ResourceIdentifier SourceEndpointResourceId { get; } + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + public ResourceIdentifier AwsS3BucketId { get; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceTargetMap.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceTargetMap.Serialization.cs new file mode 100644 index 000000000000..0e8af9617ce7 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceTargetMap.Serialization.cs @@ -0,0 +1,134 @@ +// 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.StorageMover.Models +{ + public partial class SourceTargetMap : 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(SourceTargetMap)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("sourceEndpoint"u8); + writer.WriteObjectValue(SourceEndpoint, options); + writer.WritePropertyName("targetEndpoint"u8); + writer.WriteObjectValue(TargetEndpoint, 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 + } + } + } + + SourceTargetMap 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(SourceTargetMap)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSourceTargetMap(document.RootElement, options); + } + + internal static SourceTargetMap DeserializeSourceTargetMap(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SourceEndpoint sourceEndpoint = default; + TargetEndpoint targetEndpoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourceEndpoint"u8)) + { + sourceEndpoint = SourceEndpoint.DeserializeSourceEndpoint(property.Value, options); + continue; + } + if (property.NameEquals("targetEndpoint"u8)) + { + targetEndpoint = TargetEndpoint.DeserializeTargetEndpoint(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SourceTargetMap(sourceEndpoint, targetEndpoint, 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(SourceTargetMap)} does not support writing '{options.Format}' format."); + } + } + + SourceTargetMap 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 DeserializeSourceTargetMap(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SourceTargetMap)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceTargetMap.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceTargetMap.cs new file mode 100644 index 000000000000..207b9b2e758a --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/SourceTargetMap.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The properties of cloud endpoints to migrate. + public partial class SourceTargetMap + { + /// + /// 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 . + /// + /// + /// or is null. + internal SourceTargetMap(SourceEndpoint sourceEndpoint, TargetEndpoint targetEndpoint) + { + Argument.AssertNotNull(sourceEndpoint, nameof(sourceEndpoint)); + Argument.AssertNotNull(targetEndpoint, nameof(targetEndpoint)); + + SourceEndpoint = sourceEndpoint; + TargetEndpoint = targetEndpoint; + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal SourceTargetMap(SourceEndpoint sourceEndpoint, TargetEndpoint targetEndpoint, IDictionary serializedAdditionalRawData) + { + SourceEndpoint = sourceEndpoint; + TargetEndpoint = targetEndpoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SourceTargetMap() + { + } + + /// Gets the source endpoint. + internal SourceEndpoint SourceEndpoint { get; } + /// The properties of the cloud source endpoint to migrate. + public SourceEndpointProperties SourceEndpointProperties + { + get => SourceEndpoint?.Properties; + } + + /// Gets the target endpoint. + internal TargetEndpoint TargetEndpoint { get; } + /// The properties of the cloud target endpoint to migrate. + public TargetEndpointProperties TargetEndpointProperties + { + get => TargetEndpoint?.Properties; + } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.Serialization.cs index 5535583d257c..cdfa30f10ed6 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.Serialization.cs @@ -8,8 +8,10 @@ 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.StorageMover.Models { @@ -39,6 +41,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +84,7 @@ internal static StorageMoverEndpointPatch DeserializeStorageMoverEndpointPatch(J return null; } EndpointBaseUpdateProperties properties = default; + ManagedServiceIdentity identity = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,13 +98,22 @@ internal static StorageMoverEndpointPatch DeserializeStorageMoverEndpointPatch(J properties = EndpointBaseUpdateProperties.DeserializeEndpointBaseUpdateProperties(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerStorageMoverContext.Default); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new StorageMoverEndpointPatch(properties, serializedAdditionalRawData); + return new StorageMoverEndpointPatch(properties, identity, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.cs index 2d2c6872d91b..e4c5874571e0 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/StorageMoverEndpointPatch.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.StorageMover.Models { @@ -54,20 +55,24 @@ public StorageMoverEndpointPatch() /// /// The Endpoint resource, which contains information about file sources and targets. /// 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 , , and . + /// The available derived classes include , , , , and . /// + /// The managed system identity assigned to this resource. /// Keeps track of any properties unknown to the library. - internal StorageMoverEndpointPatch(EndpointBaseUpdateProperties properties, IDictionary serializedAdditionalRawData) + internal StorageMoverEndpointPatch(EndpointBaseUpdateProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) { Properties = properties; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } /// /// The Endpoint resource, which contains information about file sources and targets. /// 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 , , and . + /// The available derived classes include , , , , and . /// public EndpointBaseUpdateProperties Properties { get; set; } + /// The managed system identity assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpoint.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpoint.Serialization.cs new file mode 100644 index 000000000000..aea82dad092c --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpoint.Serialization.cs @@ -0,0 +1,133 @@ +// 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.StorageMover.Models +{ + internal partial class TargetEndpoint : 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(TargetEndpoint)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + TargetEndpoint 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(TargetEndpoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetEndpoint(document.RootElement, options); + } + + internal static TargetEndpoint DeserializeTargetEndpoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TargetEndpointProperties properties = 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 = TargetEndpointProperties.DeserializeTargetEndpointProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetEndpoint(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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(TargetEndpoint)} does not support writing '{options.Format}' format."); + } + } + + TargetEndpoint 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 DeserializeTargetEndpoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetEndpoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpoint.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpoint.cs new file mode 100644 index 000000000000..3c177b9cee50 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpoint.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The target endpoint resource for source and target mapping. + internal partial class TargetEndpoint + { + /// + /// 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 . + internal TargetEndpoint() + { + } + + /// Initializes a new instance of . + /// The properties of the cloud target endpoint to migrate. + /// Keeps track of any properties unknown to the library. + internal TargetEndpoint(TargetEndpointProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The properties of the cloud target endpoint to migrate. + public TargetEndpointProperties Properties { get; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpointProperties.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpointProperties.Serialization.cs new file mode 100644 index 000000000000..de448c534982 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpointProperties.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.Core; + +namespace Azure.ResourceManager.StorageMover.Models +{ + public partial class TargetEndpointProperties : 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(TargetEndpointProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(TargetEndpointResourceId)) + { + writer.WritePropertyName("targetEndpointResourceId"u8); + writer.WriteStringValue(TargetEndpointResourceId); + } + if (Optional.IsDefined(AzureStorageAccountResourceId)) + { + writer.WritePropertyName("azureStorageAccountResourceId"u8); + writer.WriteStringValue(AzureStorageAccountResourceId); + } + if (Optional.IsDefined(AzureStorageBlobContainerName)) + { + writer.WritePropertyName("azureStorageBlobContainerName"u8); + writer.WriteStringValue(AzureStorageBlobContainerName); + } + 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 + } + } + } + + TargetEndpointProperties 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(TargetEndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetEndpointProperties(document.RootElement, options); + } + + internal static TargetEndpointProperties DeserializeTargetEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceIdentifier targetEndpointResourceId = default; + ResourceIdentifier azureStorageAccountResourceId = default; + string azureStorageBlobContainerName = 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("targetEndpointResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetEndpointResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureStorageAccountResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureStorageAccountResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureStorageBlobContainerName"u8)) + { + azureStorageBlobContainerName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetEndpointProperties(name, targetEndpointResourceId, azureStorageAccountResourceId, azureStorageBlobContainerName, 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, AzureResourceManagerStorageMoverContext.Default); + default: + throw new FormatException($"The model {nameof(TargetEndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + TargetEndpointProperties 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 DeserializeTargetEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetEndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpointProperties.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpointProperties.cs new file mode 100644 index 000000000000..8a4be89d01d3 --- /dev/null +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/Models/TargetEndpointProperties.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.Core; + +namespace Azure.ResourceManager.StorageMover.Models +{ + /// The properties of the cloud target endpoint to migrate. + public partial class TargetEndpointProperties + { + /// + /// 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 . + internal TargetEndpointProperties() + { + } + + /// Initializes a new instance of . + /// The name of the cloud target endpoint to migrate. + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + /// The fully qualified ARM resource ID of the Azure Storage account. + /// The name of the Azure Storage blob container. + /// Keeps track of any properties unknown to the library. + internal TargetEndpointProperties(string name, ResourceIdentifier targetEndpointResourceId, ResourceIdentifier azureStorageAccountResourceId, string azureStorageBlobContainerName, IDictionary serializedAdditionalRawData) + { + Name = name; + TargetEndpointResourceId = targetEndpointResourceId; + AzureStorageAccountResourceId = azureStorageAccountResourceId; + AzureStorageBlobContainerName = azureStorageBlobContainerName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the cloud target endpoint to migrate. + public string Name { get; } + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + public ResourceIdentifier TargetEndpointResourceId { get; } + /// The fully qualified ARM resource ID of the Azure Storage account. + public ResourceIdentifier AzureStorageAccountResourceId { get; } + /// The name of the Azure Storage blob container. + public string AzureStorageBlobContainerName { get; } + } +} diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/AgentsRestOperations.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/AgentsRestOperations.cs index d9b6e117ae5e..8574b2a31f11 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/AgentsRestOperations.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/AgentsRestOperations.cs @@ -32,7 +32,7 @@ public AgentsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/EndpointsRestOperations.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/EndpointsRestOperations.cs index 9749ebb3d77c..f3f193c7b760 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/EndpointsRestOperations.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/EndpointsRestOperations.cs @@ -32,7 +32,7 @@ public EndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobDefinitionsRestOperations.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobDefinitionsRestOperations.cs index 2dabbd415a5b..f5c45d8980dd 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobDefinitionsRestOperations.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobDefinitionsRestOperations.cs @@ -32,7 +32,7 @@ public JobDefinitionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobRunsRestOperations.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobRunsRestOperations.cs index b1f351d33ebb..1ee94d979eb0 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobRunsRestOperations.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/JobRunsRestOperations.cs @@ -32,7 +32,7 @@ public JobRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/ProjectsRestOperations.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/ProjectsRestOperations.cs index b37340c8e65e..e014b3851d70 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/ProjectsRestOperations.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/ProjectsRestOperations.cs @@ -32,7 +32,7 @@ public ProjectsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/StorageMoversRestOperations.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/StorageMoversRestOperations.cs index 6d371e71c9d4..a55779ea32d7 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/StorageMoversRestOperations.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/RestOperations/StorageMoversRestOperations.cs @@ -32,7 +32,7 @@ public StorageMoversRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentCollection.cs index 7a112ff73d80..7853f214146c 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string a /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string agentName, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string agentName, Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string agentName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.cs index e03bb5fa1f98..f940e753e86f 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task> UpdateAsync(Stora /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverCollection.cs index 0acc96b09f85..03be891cddca 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string storag /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string storageMoverName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string storageMoverName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string storageMoverName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointCollection.cs index 1acc5b2ee50a..0c866c27b7b4 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string endpointName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string endpointName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string endpointName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.Serialization.cs index 027a91c085e2..6ae6123f07f0 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.Serialization.cs @@ -40,6 +40,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); + } } StorageMoverEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -63,6 +68,7 @@ internal static StorageMoverEndpointData DeserializeStorageMoverEndpointData(Jso return null; } EndpointBaseProperties properties = default; + ManagedServiceIdentity identity = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -76,6 +82,15 @@ internal static StorageMoverEndpointData DeserializeStorageMoverEndpointData(Jso properties = EndpointBaseProperties.DeserializeEndpointBaseProperties(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerStorageMoverContext.Default); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -112,6 +127,7 @@ internal static StorageMoverEndpointData DeserializeStorageMoverEndpointData(Jso type, systemData, properties, + identity, serializedAdditionalRawData); } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.cs index 0b6664c649ef..6b6ba7198f88 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointData.cs @@ -55,7 +55,7 @@ public partial class StorageMoverEndpointData : ResourceData /// /// The resource specific properties for the Storage Mover 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 , , and . + /// The available derived classes include , , , , and . /// /// is null. public StorageMoverEndpointData(EndpointBaseProperties properties) @@ -73,12 +73,14 @@ public StorageMoverEndpointData(EndpointBaseProperties properties) /// /// The resource specific properties for the Storage Mover 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 , , and . + /// The available derived classes include , , , , and . /// + /// The managed service identity of the resource. This property is only available on the latest version. /// Keeps track of any properties unknown to the library. - internal StorageMoverEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointBaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal StorageMoverEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointBaseProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,8 +92,10 @@ internal StorageMoverEndpointData() /// /// The resource specific properties for the Storage Mover 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 , , and . + /// The available derived classes include , , , , and . /// public EndpointBaseProperties Properties { get; set; } + /// The managed service identity of the resource. This property is only available on the latest version. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.cs index 0ba66fe9f1d0..2187a7b3ed97 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task> UpdateAsync(St /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectCollection.cs index 2a79282ebe70..f2f38ea00466 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string projectName, Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string projectName, Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string projectName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.cs index 3327747e0561..1103491779d7 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.cs @@ -109,7 +109,7 @@ public virtual JobDefinitionCollection GetJobDefinitions() /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetJobDefinitionAsync /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetJobDefinition(string jobDefini /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task> UpdateAsync(Sto /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.cs index cbc9b240bfa8..2091f82bc981 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.cs @@ -110,7 +110,7 @@ public virtual StorageMoverAgentCollection GetStorageMoverAgents() /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetStorageMoverAg /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual StorageMoverEndpointCollection GetStorageMoverEndpoints() /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetStorageMove /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual StorageMoverProjectCollection GetStorageMoverProjects() /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetStorageMover /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetStorageMoverProject(stri /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task> UpdateAsync(StorageMov /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -558,7 +558,7 @@ public virtual Response Update(StorageMoverPatch patch, Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -620,7 +620,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -682,7 +682,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -739,7 +739,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -796,7 +796,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource @@ -856,7 +856,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionCollection.cs index b17e13b8b0ff..5cb8479f4cfc 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionCollection.cs @@ -20,7 +20,44 @@ public partial class Sample_JobDefinitionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_JobDefinitionsCreateOrUpdate() { - // Generated from example definition: 2024-07-01/JobDefinitions_CreateOrUpdate.json + // Generated from example definition: 2025-07-01/JobDefinitions_CreateOrUpdate.json + // this example is just showing the usage of "JobDefinition_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 StorageMoverProjectResource created on azure + // for more information of creating StorageMoverProjectResource, please refer to the document of StorageMoverProjectResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + string projectName = "examples-projectName"; + ResourceIdentifier storageMoverProjectResourceId = StorageMoverProjectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, projectName); + StorageMoverProjectResource storageMoverProject = client.GetStorageMoverProjectResource(storageMoverProjectResourceId); + + // get the collection of this JobDefinitionResource + JobDefinitionCollection collection = storageMoverProject.GetJobDefinitions(); + + // invoke the operation + string jobDefinitionName = "examples-jobDefinitionName"; + JobDefinitionData data = new JobDefinitionData(default, null, null); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, jobDefinitionName, data); + JobDefinitionResource 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 + JobDefinitionData 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_JobDefinitionsCreateOrUpdateCloudToCloud() + { + // Generated from example definition: 2025-07-01/JobDefinitions_CreateOrUpdate_CloudToCloud.json // this example is just showing the usage of "JobDefinition_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 @@ -57,7 +94,7 @@ public async Task CreateOrUpdate_JobDefinitionsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_JobDefinitionsGet() { - // Generated from example definition: 2024-07-01/JobDefinitions_Get.json + // Generated from example definition: 2025-07-01/JobDefinitions_Get.json // this example is just showing the usage of "JobDefinition_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 @@ -92,7 +129,7 @@ public async Task Get_JobDefinitionsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_JobDefinitionsList() { - // Generated from example definition: 2024-07-01/JobDefinitions_List.json + // Generated from example definition: 2025-07-01/JobDefinitions_List.json // this example is just showing the usage of "JobDefinition_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 +166,7 @@ public async Task GetAll_JobDefinitionsList() [Ignore("Only validating compilation of examples")] public async Task Exists_JobDefinitionsGet() { - // Generated from example definition: 2024-07-01/JobDefinitions_Get.json + // Generated from example definition: 2025-07-01/JobDefinitions_Get.json // this example is just showing the usage of "JobDefinition_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 +197,7 @@ public async Task Exists_JobDefinitionsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobDefinitionsGet() { - // Generated from example definition: 2024-07-01/JobDefinitions_Get.json + // Generated from example definition: 2025-07-01/JobDefinitions_Get.json // this example is just showing the usage of "JobDefinition_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionResource.cs index de217e839669..1dfad1f55ad9 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobDefinitionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_JobDefinitionResource [Ignore("Only validating compilation of examples")] public async Task Get_JobDefinitionsGet() { - // Generated from example definition: 2024-07-01/JobDefinitions_Get.json + // Generated from example definition: 2025-07-01/JobDefinitions_Get.json // this example is just showing the usage of "JobDefinition_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_JobDefinitionsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ProjectsDelete() { - // Generated from example definition: 2024-07-01/JobDefinitions_Delete.json + // Generated from example definition: 2025-07-01/JobDefinitions_Delete.json // this example is just showing the usage of "JobDefinition_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 @@ -80,7 +80,7 @@ public async Task Delete_ProjectsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_JobDefinitionsUpdate() { - // Generated from example definition: 2024-07-01/JobDefinitions_Update.json + // Generated from example definition: 2025-07-01/JobDefinitions_Update.json // this example is just showing the usage of "JobDefinition_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 @@ -113,7 +113,7 @@ public async Task Update_JobDefinitionsUpdate() [Ignore("Only validating compilation of examples")] public async Task StartJob_JobDefinitionsStartJob() { - // Generated from example definition: 2024-07-01/JobDefinitions_StartJob.json + // Generated from example definition: 2025-07-01/JobDefinitions_StartJob.json // this example is just showing the usage of "JobDefinitions_StartJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task StartJob_JobDefinitionsStartJob() [Ignore("Only validating compilation of examples")] public async Task StopJob_JobDefinitionsStopJob() { - // Generated from example definition: 2024-07-01/JobDefinitions_StopJob.json + // Generated from example definition: 2025-07-01/JobDefinitions_StopJob.json // this example is just showing the usage of "JobDefinitions_StopJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunCollection.cs index 0fcba7835bd1..28f7ae28e290 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_JobRunCollection [Ignore("Only validating compilation of examples")] public async Task Get_JobRunsGet() { - // Generated from example definition: 2024-07-01/JobRuns_Get.json + // Generated from example definition: 2025-07-01/JobRuns_Get.json // this example is just showing the usage of "JobRun_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 @@ -55,7 +55,7 @@ public async Task Get_JobRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_JobRunsList() { - // Generated from example definition: 2024-07-01/JobRuns_List.json + // Generated from example definition: 2025-07-01/JobRuns_List.json // this example is just showing the usage of "JobRun_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 @@ -93,7 +93,7 @@ public async Task GetAll_JobRunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_JobRunsGet() { - // Generated from example definition: 2024-07-01/JobRuns_Get.json + // Generated from example definition: 2025-07-01/JobRuns_Get.json // this example is just showing the usage of "JobRun_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 @@ -125,7 +125,7 @@ public async Task Exists_JobRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobRunsGet() { - // Generated from example definition: 2024-07-01/JobRuns_Get.json + // Generated from example definition: 2025-07-01/JobRuns_Get.json // this example is just showing the usage of "JobRun_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunResource.cs index 39cc1d06b01e..c761c3db5870 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_JobRunResource.cs @@ -19,7 +19,7 @@ public partial class Sample_JobRunResource [Ignore("Only validating compilation of examples")] public async Task Get_JobRunsGet() { - // Generated from example definition: 2024-07-01/JobRuns_Get.json + // Generated from example definition: 2025-07-01/JobRuns_Get.json // this example is just showing the usage of "JobRun_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentCollection.cs index 5911f8a9fa6a..58b79a7f307b 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StorageMoverAgentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AgentsCreateOrUpdateMaximumSet() { - // Generated from example definition: 2024-07-01/Agents_CreateOrUpdate_MaximumSet.json + // Generated from example definition: 2025-07-01/Agents_CreateOrUpdate_MaximumSet.json // this example is just showing the usage of "Agent_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_AgentsCreateOrUpdateMaximumSet() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AgentsCreateOrUpdateMinimumSet() { - // Generated from example definition: 2024-07-01/Agents_CreateOrUpdate_MinimumSet.json + // Generated from example definition: 2025-07-01/Agents_CreateOrUpdate_MinimumSet.json // this example is just showing the usage of "Agent_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 @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_AgentsCreateOrUpdateMinimumSet() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AgentsCreateOrUpdateWithOvernightUploadLimitSchedule() { - // Generated from example definition: 2024-07-01/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json + // Generated from example definition: 2025-07-01/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json // this example is just showing the usage of "Agent_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 @@ -127,7 +127,7 @@ public async Task CreateOrUpdate_AgentsCreateOrUpdateWithOvernightUploadLimitSch [Ignore("Only validating compilation of examples")] public async Task Get_AgentsGetMaximumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MaximumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MaximumSet.json // this example is just showing the usage of "Agent_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 @@ -161,7 +161,7 @@ public async Task Get_AgentsGetMaximumSet() [Ignore("Only validating compilation of examples")] public async Task Get_AgentsGetMinimumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MinimumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MinimumSet.json // this example is just showing the usage of "Agent_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 @@ -195,7 +195,7 @@ public async Task Get_AgentsGetMinimumSet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AgentsListMaximumSet() { - // Generated from example definition: 2024-07-01/Agents_List_MaximumSet.json + // Generated from example definition: 2025-07-01/Agents_List_MaximumSet.json // this example is just showing the usage of "Agent_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 @@ -231,7 +231,7 @@ public async Task GetAll_AgentsListMaximumSet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AgentsListMinimumSet() { - // Generated from example definition: 2024-07-01/Agents_List_MinimumSet.json + // Generated from example definition: 2025-07-01/Agents_List_MinimumSet.json // this example is just showing the usage of "Agent_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 @@ -267,7 +267,7 @@ public async Task GetAll_AgentsListMinimumSet() [Ignore("Only validating compilation of examples")] public async Task Exists_AgentsGetMaximumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MaximumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MaximumSet.json // this example is just showing the usage of "Agent_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 @@ -297,7 +297,7 @@ public async Task Exists_AgentsGetMaximumSet() [Ignore("Only validating compilation of examples")] public async Task Exists_AgentsGetMinimumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MinimumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MinimumSet.json // this example is just showing the usage of "Agent_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 @@ -327,7 +327,7 @@ public async Task Exists_AgentsGetMinimumSet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AgentsGetMaximumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MaximumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MaximumSet.json // this example is just showing the usage of "Agent_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 @@ -369,7 +369,7 @@ public async Task GetIfExists_AgentsGetMaximumSet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AgentsGetMinimumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MinimumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MinimumSet.json // this example is just showing the usage of "Agent_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentResource.cs index 730fc70e7ba2..31ccb5ded169 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverAgentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StorageMoverAgentResource [Ignore("Only validating compilation of examples")] public async Task Get_AgentsGetMaximumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MaximumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MaximumSet.json // this example is just showing the usage of "Agent_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_AgentsGetMaximumSet() [Ignore("Only validating compilation of examples")] public async Task Get_AgentsGetMinimumSet() { - // Generated from example definition: 2024-07-01/Agents_Get_MinimumSet.json + // Generated from example definition: 2025-07-01/Agents_Get_MinimumSet.json // this example is just showing the usage of "Agent_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 @@ -82,7 +82,7 @@ public async Task Get_AgentsGetMinimumSet() [Ignore("Only validating compilation of examples")] public async Task Delete_AgentsDelete() { - // Generated from example definition: 2024-07-01/Agents_Delete.json + // Generated from example definition: 2025-07-01/Agents_Delete.json // this example is just showing the usage of "Agent_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 @@ -109,7 +109,7 @@ public async Task Delete_AgentsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AgentsUpdate() { - // Generated from example definition: 2024-07-01/Agents_Update.json + // Generated from example definition: 2025-07-01/Agents_Update.json // this example is just showing the usage of "Agent_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverCollection.cs index d297464bd129..1696b9c13d0d 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_StorageMoverCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_StorageMoversCreateOrUpdate() { - // Generated from example definition: 2024-07-01/StorageMovers_CreateOrUpdate.json + // Generated from example definition: 2025-07-01/StorageMovers_CreateOrUpdate.json // this example is just showing the usage of "StorageMover_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 @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_StorageMoversCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_StorageMoversGet() { - // Generated from example definition: 2024-07-01/StorageMovers_Get.json + // Generated from example definition: 2025-07-01/StorageMovers_Get.json // this example is just showing the usage of "StorageMover_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_StorageMoversGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_StorageMoversList() { - // Generated from example definition: 2024-07-01/StorageMovers_List.json + // Generated from example definition: 2025-07-01/StorageMovers_List.json // this example is just showing the usage of "StorageMover_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_StorageMoversList() [Ignore("Only validating compilation of examples")] public async Task Exists_StorageMoversGet() { - // Generated from example definition: 2024-07-01/StorageMovers_Get.json + // Generated from example definition: 2025-07-01/StorageMovers_Get.json // this example is just showing the usage of "StorageMover_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_StorageMoversGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_StorageMoversGet() { - // Generated from example definition: 2024-07-01/StorageMovers_Get.json + // Generated from example definition: 2025-07-01/StorageMovers_Get.json // this example is just showing the usage of "StorageMover_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointCollection.cs index 91e9043eefc8..3f289bb07277 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointCollection.cs @@ -16,11 +16,83 @@ namespace Azure.ResourceManager.StorageMover.Samples { public partial class Sample_StorageMoverEndpointCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_EndpointsCreateOrUpdateAzureMultiCloudConnector() + { + // Generated from example definition: 2025-07-01/Endpoints_CreateOrUpdate_AzureMultiCloudConnector.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + StorageMoverEndpointData data = new StorageMoverEndpointData(null); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, endpointName, data); + StorageMoverEndpointResource 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 + StorageMoverEndpointData 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_EndpointsCreateOrUpdateAzureStorageBlobContainer() { - // Generated from example definition: 2024-07-01/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json + // Generated from example definition: 2025-07-01/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + StorageMoverEndpointData data = new StorageMoverEndpointData(null); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, endpointName, data); + StorageMoverEndpointResource 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 + StorageMoverEndpointData 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_EndpointsCreateOrUpdateAzureStorageNfsFileShare() + { + // Generated from example definition: 2025-07-01/Endpoints_CreateOrUpdate_AzureStorageNfsFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -56,7 +128,7 @@ public async Task CreateOrUpdate_EndpointsCreateOrUpdateAzureStorageBlobContaine [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EndpointsCreateOrUpdateAzureStorageSmbFileShare() { - // Generated from example definition: 2024-07-01/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json + // Generated from example definition: 2025-07-01/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -92,7 +164,7 @@ public async Task CreateOrUpdate_EndpointsCreateOrUpdateAzureStorageSmbFileShare [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EndpointsCreateOrUpdateNfsMount() { - // Generated from example definition: 2024-07-01/Endpoints_CreateOrUpdate_NfsMount.json + // Generated from example definition: 2025-07-01/Endpoints_CreateOrUpdate_NfsMount.json // this example is just showing the usage of "Endpoint_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 @@ -128,7 +200,7 @@ public async Task CreateOrUpdate_EndpointsCreateOrUpdateNfsMount() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EndpointsCreateOrUpdateSmbMount() { - // Generated from example definition: 2024-07-01/Endpoints_CreateOrUpdate_SmbMount.json + // Generated from example definition: 2025-07-01/Endpoints_CreateOrUpdate_SmbMount.json // this example is just showing the usage of "Endpoint_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 @@ -160,11 +232,79 @@ public async Task CreateOrUpdate_EndpointsCreateOrUpdateSmbMount() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EndpointsGetAzureMultiCloudConnector() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureMultiCloudConnector.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + StorageMoverEndpointResource result = await collection.GetAsync(endpointName); + + // 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 + StorageMoverEndpointData 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_EndpointsGetAzureStorageBlobContainer() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + StorageMoverEndpointResource result = await collection.GetAsync(endpointName); + + // 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 + StorageMoverEndpointData 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_EndpointsGetAzureStorageNfsFileShare() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageNfsFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -198,7 +338,7 @@ public async Task Get_EndpointsGetAzureStorageBlobContainer() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGetAzureStorageSmbFileShare() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageSmbFileShare.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageSmbFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -232,7 +372,7 @@ public async Task Get_EndpointsGetAzureStorageSmbFileShare() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGetNfsMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_NfsMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_NfsMount.json // this example is just showing the usage of "Endpoint_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 @@ -266,7 +406,7 @@ public async Task Get_EndpointsGetNfsMount() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGetSmbMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_SmbMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_SmbMount.json // this example is just showing the usage of "Endpoint_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 @@ -300,7 +440,7 @@ public async Task Get_EndpointsGetSmbMount() [Ignore("Only validating compilation of examples")] public async Task GetAll_EndpointsList() { - // Generated from example definition: 2024-07-01/Endpoints_List.json + // Generated from example definition: 2025-07-01/Endpoints_List.json // this example is just showing the usage of "Endpoint_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 @@ -332,11 +472,71 @@ public async Task GetAll_EndpointsList() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EndpointsGetAzureMultiCloudConnector() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureMultiCloudConnector.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + bool result = await collection.ExistsAsync(endpointName); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Exists_EndpointsGetAzureStorageBlobContainer() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + bool result = await collection.ExistsAsync(endpointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EndpointsGetAzureStorageNfsFileShare() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageNfsFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -366,7 +566,7 @@ public async Task Exists_EndpointsGetAzureStorageBlobContainer() [Ignore("Only validating compilation of examples")] public async Task Exists_EndpointsGetAzureStorageSmbFileShare() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageSmbFileShare.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageSmbFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -396,7 +596,7 @@ public async Task Exists_EndpointsGetAzureStorageSmbFileShare() [Ignore("Only validating compilation of examples")] public async Task Exists_EndpointsGetNfsMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_NfsMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_NfsMount.json // this example is just showing the usage of "Endpoint_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 +626,7 @@ public async Task Exists_EndpointsGetNfsMount() [Ignore("Only validating compilation of examples")] public async Task Exists_EndpointsGetSmbMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_SmbMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_SmbMount.json // this example is just showing the usage of "Endpoint_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 @@ -452,11 +652,95 @@ public async Task Exists_EndpointsGetSmbMount() Console.WriteLine($"Succeeded: {result}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EndpointsGetAzureMultiCloudConnector() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureMultiCloudConnector.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + NullableResponse response = await collection.GetIfExistsAsync(endpointName); + StorageMoverEndpointResource 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 + StorageMoverEndpointData 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 GetIfExists_EndpointsGetAzureStorageBlobContainer() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // this example is just showing the usage of "Endpoint_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 StorageMoverResource created on azure + // for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName); + StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId); + + // get the collection of this StorageMoverEndpointResource + StorageMoverEndpointCollection collection = storageMover.GetStorageMoverEndpoints(); + + // invoke the operation + string endpointName = "examples-endpointName"; + NullableResponse response = await collection.GetIfExistsAsync(endpointName); + StorageMoverEndpointResource 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 + StorageMoverEndpointData 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 GetIfExists_EndpointsGetAzureStorageNfsFileShare() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageNfsFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -498,7 +782,7 @@ public async Task GetIfExists_EndpointsGetAzureStorageBlobContainer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EndpointsGetAzureStorageSmbFileShare() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageSmbFileShare.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageSmbFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -540,7 +824,7 @@ public async Task GetIfExists_EndpointsGetAzureStorageSmbFileShare() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EndpointsGetNfsMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_NfsMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_NfsMount.json // this example is just showing the usage of "Endpoint_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 @@ -582,7 +866,7 @@ public async Task GetIfExists_EndpointsGetNfsMount() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EndpointsGetSmbMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_SmbMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_SmbMount.json // this example is just showing the usage of "Endpoint_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointResource.cs index d9b356dfb007..570596018d66 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverEndpointResource.cs @@ -16,11 +16,73 @@ namespace Azure.ResourceManager.StorageMover.Samples { public partial class Sample_StorageMoverEndpointResource { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EndpointsGetAzureMultiCloudConnector() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureMultiCloudConnector.json + // this example is just showing the usage of "Endpoint_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 StorageMoverEndpointResource created on azure + // for more information of creating StorageMoverEndpointResource, please refer to the document of StorageMoverEndpointResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + string endpointName = "examples-endpointName"; + ResourceIdentifier storageMoverEndpointResourceId = StorageMoverEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, endpointName); + StorageMoverEndpointResource storageMoverEndpoint = client.GetStorageMoverEndpointResource(storageMoverEndpointResourceId); + + // invoke the operation + StorageMoverEndpointResource result = await storageMoverEndpoint.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 + StorageMoverEndpointData 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_EndpointsGetAzureStorageBlobContainer() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageBlobContainer.json + // this example is just showing the usage of "Endpoint_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 StorageMoverEndpointResource created on azure + // for more information of creating StorageMoverEndpointResource, please refer to the document of StorageMoverEndpointResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + string endpointName = "examples-endpointName"; + ResourceIdentifier storageMoverEndpointResourceId = StorageMoverEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, endpointName); + StorageMoverEndpointResource storageMoverEndpoint = client.GetStorageMoverEndpointResource(storageMoverEndpointResourceId); + + // invoke the operation + StorageMoverEndpointResource result = await storageMoverEndpoint.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 + StorageMoverEndpointData 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_EndpointsGetAzureStorageNfsFileShare() + { + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageNfsFileShare.json // this example is just showing the usage of "Endpoint_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 +113,7 @@ public async Task Get_EndpointsGetAzureStorageBlobContainer() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGetAzureStorageSmbFileShare() { - // Generated from example definition: 2024-07-01/Endpoints_Get_AzureStorageSmbFileShare.json + // Generated from example definition: 2025-07-01/Endpoints_Get_AzureStorageSmbFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -82,7 +144,7 @@ public async Task Get_EndpointsGetAzureStorageSmbFileShare() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGetNfsMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_NfsMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_NfsMount.json // this example is just showing the usage of "Endpoint_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 @@ -113,7 +175,7 @@ public async Task Get_EndpointsGetNfsMount() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGetSmbMount() { - // Generated from example definition: 2024-07-01/Endpoints_Get_SmbMount.json + // Generated from example definition: 2025-07-01/Endpoints_Get_SmbMount.json // this example is just showing the usage of "Endpoint_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 @@ -144,7 +206,7 @@ public async Task Get_EndpointsGetSmbMount() [Ignore("Only validating compilation of examples")] public async Task Delete_EndpointsDelete() { - // Generated from example definition: 2024-07-01/Endpoints_Delete.json + // Generated from example definition: 2025-07-01/Endpoints_Delete.json // this example is just showing the usage of "Endpoint_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 @@ -167,11 +229,75 @@ public async Task Delete_EndpointsDelete() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EndpointsUpdateAzureMultiCloudConnector() + { + // Generated from example definition: 2025-07-01/Endpoints_Update_AzureMultiCloudConnector.json + // this example is just showing the usage of "Endpoint_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 StorageMoverEndpointResource created on azure + // for more information of creating StorageMoverEndpointResource, please refer to the document of StorageMoverEndpointResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + string endpointName = "examples-endpointName"; + ResourceIdentifier storageMoverEndpointResourceId = StorageMoverEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, endpointName); + StorageMoverEndpointResource storageMoverEndpoint = client.GetStorageMoverEndpointResource(storageMoverEndpointResourceId); + + // invoke the operation + StorageMoverEndpointPatch patch = new StorageMoverEndpointPatch(); + StorageMoverEndpointResource result = await storageMoverEndpoint.UpdateAsync(patch); + + // 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 + StorageMoverEndpointData 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_EndpointsUpdateAzureStorageBlobContainer() { - // Generated from example definition: 2024-07-01/Endpoints_Update_AzureStorageBlobContainer.json + // Generated from example definition: 2025-07-01/Endpoints_Update_AzureStorageBlobContainer.json + // this example is just showing the usage of "Endpoint_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 StorageMoverEndpointResource created on azure + // for more information of creating StorageMoverEndpointResource, please refer to the document of StorageMoverEndpointResource + string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95"; + string resourceGroupName = "examples-rg"; + string storageMoverName = "examples-storageMoverName"; + string endpointName = "examples-endpointName"; + ResourceIdentifier storageMoverEndpointResourceId = StorageMoverEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, endpointName); + StorageMoverEndpointResource storageMoverEndpoint = client.GetStorageMoverEndpointResource(storageMoverEndpointResourceId); + + // invoke the operation + StorageMoverEndpointPatch patch = new StorageMoverEndpointPatch(); + StorageMoverEndpointResource result = await storageMoverEndpoint.UpdateAsync(patch); + + // 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 + StorageMoverEndpointData 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_EndpointsUpdateAzureStorageNfsFileShare() + { + // Generated from example definition: 2025-07-01/Endpoints_Update_AzureStorageNfsFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -203,7 +329,7 @@ public async Task Update_EndpointsUpdateAzureStorageBlobContainer() [Ignore("Only validating compilation of examples")] public async Task Update_EndpointsUpdateAzureStorageSmbFileShare() { - // Generated from example definition: 2024-07-01/Endpoints_Update_AzureStorageSmbFileShare.json + // Generated from example definition: 2025-07-01/Endpoints_Update_AzureStorageSmbFileShare.json // this example is just showing the usage of "Endpoint_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 @@ -235,7 +361,7 @@ public async Task Update_EndpointsUpdateAzureStorageSmbFileShare() [Ignore("Only validating compilation of examples")] public async Task Update_EndpointsUpdateNfsMount() { - // Generated from example definition: 2024-07-01/Endpoints_Update_NfsMount.json + // Generated from example definition: 2025-07-01/Endpoints_Update_NfsMount.json // this example is just showing the usage of "Endpoint_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 @@ -267,7 +393,7 @@ public async Task Update_EndpointsUpdateNfsMount() [Ignore("Only validating compilation of examples")] public async Task Update_EndpointsUpdateSmbMount() { - // Generated from example definition: 2024-07-01/Endpoints_Update_SmbMount.json + // Generated from example definition: 2025-07-01/Endpoints_Update_SmbMount.json // this example is just showing the usage of "Endpoint_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectCollection.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectCollection.cs index ad85c3454cd0..893f1e815f94 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectCollection.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StorageMoverProjectCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ProjectsCreateOrUpdate() { - // Generated from example definition: 2024-07-01/Projects_CreateOrUpdate.json + // Generated from example definition: 2025-07-01/Projects_CreateOrUpdate.json // this example is just showing the usage of "Project_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_ProjectsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ProjectsGet() { - // Generated from example definition: 2024-07-01/Projects_Get.json + // Generated from example definition: 2025-07-01/Projects_Get.json // this example is just showing the usage of "Project_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 @@ -89,7 +89,7 @@ public async Task Get_ProjectsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ProjectsList() { - // Generated from example definition: 2024-07-01/Projects_List.json + // Generated from example definition: 2025-07-01/Projects_List.json // this example is just showing the usage of "Project_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 @@ -125,7 +125,7 @@ public async Task GetAll_ProjectsList() [Ignore("Only validating compilation of examples")] public async Task Exists_ProjectsGet() { - // Generated from example definition: 2024-07-01/Projects_Get.json + // Generated from example definition: 2025-07-01/Projects_Get.json // this example is just showing the usage of "Project_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 @@ -155,7 +155,7 @@ public async Task Exists_ProjectsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ProjectsGet() { - // Generated from example definition: 2024-07-01/Projects_Get.json + // Generated from example definition: 2025-07-01/Projects_Get.json // this example is just showing the usage of "Project_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectResource.cs index ded1bb7ac0f6..cabdd37e3f90 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverProjectResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StorageMoverProjectResource [Ignore("Only validating compilation of examples")] public async Task Get_ProjectsGet() { - // Generated from example definition: 2024-07-01/Projects_Get.json + // Generated from example definition: 2025-07-01/Projects_Get.json // this example is just showing the usage of "Project_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_ProjectsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ProjectsDelete() { - // Generated from example definition: 2024-07-01/Projects_Delete.json + // Generated from example definition: 2025-07-01/Projects_Delete.json // this example is just showing the usage of "Project_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_ProjectsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ProjectsUpdate() { - // Generated from example definition: 2024-07-01/Projects_Update.json + // Generated from example definition: 2025-07-01/Projects_Update.json // this example is just showing the usage of "Project_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverResource.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverResource.cs index 49b00a06454b..116d26d3872d 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverResource.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_StorageMoverResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StorageMoverResource [Ignore("Only validating compilation of examples")] public async Task Get_StorageMoversGet() { - // Generated from example definition: 2024-07-01/StorageMovers_Get.json + // Generated from example definition: 2025-07-01/StorageMovers_Get.json // this example is just showing the usage of "StorageMover_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_StorageMoversGet() [Ignore("Only validating compilation of examples")] public async Task Delete_StorageMoversDelete() { - // Generated from example definition: 2024-07-01/StorageMovers_Delete.json + // Generated from example definition: 2025-07-01/StorageMovers_Delete.json // this example is just showing the usage of "StorageMover_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_StorageMoversDelete() [Ignore("Only validating compilation of examples")] public async Task Update_StorageMoversUpdate() { - // Generated from example definition: 2024-07-01/StorageMovers_Update.json + // Generated from example definition: 2025-07-01/StorageMovers_Update.json // this example is just showing the usage of "StorageMover_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/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 0894bdc19d8c..d8a8ad603ea9 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetStorageMovers_StorageMoversList() { - // Generated from example definition: 2024-07-01/StorageMovers_ListBySubscription.json + // Generated from example definition: 2025-07-01/StorageMovers_ListBySubscription.json // this example is just showing the usage of "StorageMover_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 diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/tsp-location.yaml b/sdk/storagemover/Azure.ResourceManager.StorageMover/tsp-location.yaml index 489becdfd83b..d16f64fe81a3 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/tsp-location.yaml +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storagemover/StorageMover.Management +commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b repo: Azure/azure-rest-api-specs -commit: a920a0ebf21edd5f70ba6039f7e7df6c40733d0b -additionalDirectories: [] +additionalDirectories: diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md index daab7b92e586..2bef201f51f1 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-preview.22 (Unreleased) +## 1.0.0-preview.23 (Unreleased) ### Features Added @@ -10,6 +10,65 @@ ### Other Changes +## 1.0.0-preview.22 (2025-09-05) + +### Features Added +- Model ServiceNowV2ObjectDataset has a new parameter value_type +- Added Presto server linked service +- Model DynamicsSink has a new parameter bypass_business_logic_execution +- Model DynamicsSink has a new parameter bypass_power_automate_flows +- Model AzurePostgreSqlSink has a new parameter write_method +- Model AzurePostgreSqlSink has a new parameter upsert_settings +- Model SnowflakeV2LinkedService has a new parameter role +- Model SnowflakeV2LinkedService has a new parameter schema +- Model AzurePostgreSqlLinkedService has a new parameter service_principal_embedded_cert +- Model AzurePostgreSqlLinkedService has a new parameter service_principal_embedded_cert_password +- Model ODataLinkedService has a new parameter service_principal_embedded_cert +- Model ODataLinkedService has a new parameter service_principal_embedded_cert_password +- Model Office365LinkedService has a new parameter service_principal_embedded_cert +- Model Office365LinkedService has a new parameter service_principal_embedded_cert_password +- Model RestServiceLinkedService has a new parameter service_principal_embedded_cert +- Model RestServiceLinkedService has a new parameter service_principal_embedded_cert_password +- Model SharePointOnlineListLinkedService has a new parameter service_principal_embedded_cert +- Model SharePointOnlineListLinkedService has a new parameter service_principal_embedded_cert_password +- Model AzureDatabricksLinkedService has a new parameter data_security_mode +- Model AmazonRdsForOracleLinkedService has a new parameter server +- Model AmazonRdsForOracleLinkedService has a new parameter authentication_type +- Model AmazonRdsForOracleLinkedService has a new parameter username +- Model AmazonRdsForOracleLinkedService has a new parameter encryption_client +- Model AmazonRdsForOracleLinkedService has a new parameter encryption_types_client +- Model AmazonRdsForOracleLinkedService has a new parameter crypto_checksum_client +- Model AmazonRdsForOracleLinkedService has a new parameter crypto_checksum_types_client +- Model AmazonRdsForOracleLinkedService has a new parameter initial_lob_fetch_size +- Model AmazonRdsForOracleLinkedService has a new parameter fetch_size +- Model AmazonRdsForOracleLinkedService has a new parameter statement_cache_size +- Model AmazonRdsForOracleLinkedService has a new parameter initialization_string +- Model AmazonRdsForOracleLinkedService has a new parameter enable_bulk_load +- Model AmazonRdsForOracleLinkedService has a new parameter fetch_tswtz_as_timestamp +- Model AmazonRdsForOracleLinkedService has a new parameter support_v1_data_types +- Model FtpServerLinkedService has a new parameter enable_server_certificate_validation +- Model HiveLinkedService has a new parameter enable_server_certificate_validation +- Model HttpLinkedService has a new parameter enable_server_certificate_validation +- Model ImpalaLinkedService has a new parameter enable_server_certificate_validation +- Model RestServiceLinkedService has a new parameter enable_server_certificate_validation +- Model SparkLinkedService has a new parameter enable_server_certificate_validation +- Model QuickBooksLinkedService has a new parameter refresh_token +- Model AmazonRdsForOracleSource has a new parameter number_precision +- Model AmazonRdsForOracleSource has a new parameter number_scale +- Model OracleSource has a new parameter number_precision +- Model OracleSource has a new parameter number_scale +- Model LakeHouseLinkedService has a new parameter authentication_type +- Model LakeHouseLinkedService has a new parameter credential +- Model WarehouseLinkedService has a new parameter authentication_type +- Model WarehouseLinkedService has a new parameter credential +- Model HDInsightLinkedService has a new parameter cluster_auth_type +- Model HDInsightLinkedService has a new parameter credential + +### Breaking Changes +- Model OracleLinkedService parameter connection_string now is not required +- Model GreenplumLinkedService remove parameter password +- Model ExpressionV2 parameter value change its type from string to object + ## 1.0.0-preview.21 (2025-03-07) ### Features Added diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.net8.0.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.net8.0.cs index 29b96e746535..4c7ba7ff8483 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.net8.0.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.net8.0.cs @@ -1071,12 +1071,43 @@ public partial class AmazonMWSSource : Azure.Analytics.Synapse.Artifacts.Models. public AmazonMWSSource() { } public object Query { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AmazonRdsForOracleAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AmazonRdsForOracleAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType Basic { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType 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.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class AmazonRdsForOracleLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public AmazonRdsForOracleLinkedService(object connectionString) { } + public AmazonRdsForOracleLinkedService() { } + public Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType? AuthenticationType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public object CryptoChecksumClient { get { throw null; } set { } } + public object CryptoChecksumTypesClient { get { throw null; } set { } } + public object EnableBulkLoad { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } + public object EncryptionClient { get { throw null; } set { } } + public object EncryptionTypesClient { get { throw null; } set { } } + public object FetchSize { get { throw null; } set { } } + public object FetchTswtzAsTimestamp { get { throw null; } set { } } + public object InitializationString { get { throw null; } set { } } + public object InitialLobFetchSize { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } + public object Server { get { throw null; } set { } } + public object StatementCacheSize { get { throw null; } set { } } + public object SupportV1DataTypes { get { throw null; } set { } } + public object Username { get { throw null; } set { } } } public partial class AmazonRdsForOraclePartitionSettings { @@ -1090,6 +1121,8 @@ public partial class AmazonRdsForOracleSource : Azure.Analytics.Synapse.Artifact { public AmazonRdsForOracleSource() { } public object AdditionalColumns { get { throw null; } set { } } + public object NumberPrecision { get { throw null; } set { } } + public object NumberScale { get { throw null; } set { } } public object OracleReaderQuery { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOraclePartitionSettings PartitionSettings { get { throw null; } set { } } @@ -1553,6 +1586,7 @@ public AzureDatabricksLinkedService(object domain) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessToken { get { throw null; } set { } } public object Authentication { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } + public object DataSecurityMode { get { throw null; } set { } } public object Domain { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object ExistingClusterId { get { throw null; } set { } } @@ -1895,6 +1929,13 @@ public partial class AzurePostgreSqlSink : Azure.Analytics.Synapse.Artifacts.Mod { public AzurePostgreSqlSink() { } public object PreCopyScript { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlSinkUpsertSettings UpsertSettings { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum? WriteMethod { get { throw null; } set { } } + } + public partial class AzurePostgreSqlSinkUpsertSettings + { + public AzurePostgreSqlSinkUpsertSettings() { } + public object Keys { get { throw null; } set { } } } public partial class AzurePostgreSqlSource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { @@ -1908,6 +1949,25 @@ public AzurePostgreSqlTableDataset(Azure.Analytics.Synapse.Artifacts.Models.Link public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzurePostgreSqlWriteMethodEnum : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzurePostgreSqlWriteMethodEnum(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum BulkInsert { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum CopyCommand { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum Upsert { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum 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.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum left, Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum left, Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum right) { throw null; } + public override string ToString() { throw null; } + } public partial class AzureQueueSink : Azure.Analytics.Synapse.Artifacts.Models.CopySink { public AzureQueueSink() { } @@ -2460,6 +2520,8 @@ public partial class CommonDataServiceForAppsSink : Azure.Analytics.Synapse.Arti { public CommonDataServiceForAppsSink(Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior writeBehavior) { } public object AlternateKeyName { get { throw null; } set { } } + public object BypassBusinessLogicExecution { get { throw null; } set { } } + public object BypassPowerAutomateFlows { get { throw null; } set { } } public object IgnoreNullValues { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior WriteBehavior { get { throw null; } set { } } } @@ -3317,6 +3379,8 @@ public partial class DynamicsCrmSink : Azure.Analytics.Synapse.Artifacts.Models. { public DynamicsCrmSink(Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior writeBehavior) { } public object AlternateKeyName { get { throw null; } set { } } + public object BypassBusinessLogicExecution { get { throw null; } set { } } + public object BypassPowerAutomateFlows { get { throw null; } set { } } public object IgnoreNullValues { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior WriteBehavior { get { throw null; } set { } } } @@ -3353,6 +3417,8 @@ public partial class DynamicsSink : Azure.Analytics.Synapse.Artifacts.Models.Cop { public DynamicsSink(Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior writeBehavior) { } public object AlternateKeyName { get { throw null; } set { } } + public object BypassBusinessLogicExecution { get { throw null; } set { } } + public object BypassPowerAutomateFlows { get { throw null; } set { } } public object IgnoreNullValues { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior WriteBehavior { get { throw null; } set { } } } @@ -3558,7 +3624,7 @@ public ExpressionV2() { } public System.Collections.Generic.IList Operands { get { throw null; } } public System.Collections.Generic.IList Operators { get { throw null; } } public Azure.Analytics.Synapse.Artifacts.Models.ExpressionV2Type? Type { get { throw null; } set { } } - public string Value { get { throw null; } set { } } + public object Value { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExpressionV2Type : System.IEquatable @@ -3945,7 +4011,6 @@ public GreenplumLinkedService() { } public object Database { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public object Port { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference Pwd { get { throw null; } set { } } public object SslMode { get { throw null; } set { } } @@ -4058,6 +4123,25 @@ public HdfsSource() { } public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.HDInsightActivityDebugInfoOption left, Azure.Analytics.Synapse.Artifacts.Models.HDInsightActivityDebugInfoOption right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HDInsightClusterAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HDInsightClusterAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType BasicAuth { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType SystemAssignedManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType 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.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class HDInsightHiveActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public HDInsightHiveActivity(string name) : base (default(string)) { } @@ -4073,7 +4157,9 @@ public HDInsightHiveActivity(string name) : base (default(string)) { } public partial class HDInsightLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public HDInsightLinkedService(object clusterUri) { } + public Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType? ClusterAuthType { get { throw null; } set { } } public object ClusterUri { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object FileSystem { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference HcatalogLinkedServiceName { get { throw null; } set { } } @@ -4196,6 +4282,7 @@ public HiveLinkedService(object host, Azure.Analytics.Synapse.Artifacts.Models.H public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.HiveAuthenticationType AuthenticationType { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } @@ -4394,11 +4481,13 @@ public ImpalaLinkedService(object host, Azure.Analytics.Synapse.Artifacts.Models public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.ImpalaAuthenticationType AuthenticationType { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public object Port { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ImpalaThriftTransportProtocol? ThriftTransportProtocol { get { throw null; } set { } } public object TrustedCertPath { get { throw null; } set { } } public object Username { get { throw null; } set { } } public object UseSystemTrustStore { get { throw null; } set { } } @@ -4415,6 +4504,11 @@ public partial class ImpalaSource : Azure.Analytics.Synapse.Artifacts.Models.Tab public ImpalaSource() { } public object Query { get { throw null; } set { } } } + public enum ImpalaThriftTransportProtocol + { + Binary = 0, + Http = 1, + } public abstract partial class ImportSettings { protected ImportSettings() { } @@ -4764,10 +4858,31 @@ public KqlScriptResource() { } public Azure.Analytics.Synapse.Artifacts.Models.KqlScript Properties { get { throw null; } set { } } public string Type { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LakehouseAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LakehouseAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType ServicePrincipal { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType SystemAssignedManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType 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.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class LakeHouseLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public LakeHouseLinkedService() { } public object ArtifactId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType? AuthenticationType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public string EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalCredential { get { throw null; } set { } } public object ServicePrincipalCredentialType { get { throw null; } set { } } @@ -5722,6 +5837,9 @@ public partial class Office365LinkedService : Azure.Analytics.Synapse.Artifacts. public Office365LinkedService(object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, Azure.Analytics.Synapse.Artifacts.Models.SecretBase servicePrincipalKey) { } public object EncryptedCredential { get { throw null; } set { } } public object Office365TenantId { get { throw null; } set { } } + public object ServicePrincipalCredentialType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalEmbeddedCert { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalEmbeddedCertPassword { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalKey { get { throw null; } set { } } public object ServicePrincipalTenantId { get { throw null; } set { } } @@ -5764,7 +5882,7 @@ internal OperationResult() { } } public partial class OracleLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public OracleLinkedService(object connectionString) { } + public OracleLinkedService() { } public Azure.Analytics.Synapse.Artifacts.Models.OracleAuthenticationType? AuthenticationType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } public object CryptoChecksumClient { get { throw null; } set { } } @@ -5840,6 +5958,8 @@ public partial class OracleSource : Azure.Analytics.Synapse.Artifacts.Models.Cop { public OracleSource() { } public object AdditionalColumns { get { throw null; } set { } } + public object NumberPrecision { get { throw null; } set { } } + public object NumberScale { get { throw null; } set { } } public object OracleReaderQuery { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.OraclePartitionOption? PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.OraclePartitionSettings PartitionSettings { get { throw null; } set { } } @@ -6213,11 +6333,12 @@ public PowerBIWorkspaceLinkedService(string workspaceId, string tenantId) { } } public partial class PrestoLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public PrestoLinkedService(object host, object serverVersion, object catalog, Azure.Analytics.Synapse.Artifacts.Models.PrestoAuthenticationType authenticationType) { } + public PrestoLinkedService(object host, object catalog, Azure.Analytics.Synapse.Artifacts.Models.PrestoAuthenticationType authenticationType) { } public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.PrestoAuthenticationType AuthenticationType { get { throw null; } set { } } public object Catalog { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } @@ -6284,7 +6405,7 @@ public QuickbaseLinkedService(object url, Azure.Analytics.Synapse.Artifacts.Mode } public partial class QuickBooksLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, Azure.Analytics.Synapse.Artifacts.Models.SecretBase consumerSecret, Azure.Analytics.Synapse.Artifacts.Models.SecretBase accessToken, Azure.Analytics.Synapse.Artifacts.Models.SecretBase accessTokenSecret) { } + public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, Azure.Analytics.Synapse.Artifacts.Models.SecretBase consumerSecret) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessToken { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessTokenSecret { get { throw null; } set { } } public object CompanyId { get { throw null; } set { } } @@ -6293,6 +6414,7 @@ public QuickBooksLinkedService(object endpoint, object companyId, object consume public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ConsumerSecret { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Endpoint { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase RefreshToken { get { throw null; } set { } } public object UseEncryptedEndpoints { get { throw null; } set { } } } public partial class QuickBooksObjectDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset @@ -7367,10 +7489,41 @@ public partial class ServiceNowSource : Azure.Analytics.Synapse.Artifacts.Models public ServiceNowSource() { } public object Query { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceNowV2AuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceNowV2AuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType Basic { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType OAuth2 { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType 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.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ServiceNowV2LinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService + { + public ServiceNowV2LinkedService(object endpoint, Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType authenticationType) { } + public Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType AuthenticationType { get { throw null; } set { } } + public object ClientId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ClientSecret { get { throw null; } set { } } + public string EncryptedCredential { get { throw null; } set { } } + public object Endpoint { get { throw null; } set { } } + public object GrantType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } + public object Username { get { throw null; } set { } } + } public partial class ServiceNowV2ObjectDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { public ServiceNowV2ObjectDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } public object TableName { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ValueType? ValueType { get { throw null; } set { } } } public partial class ServiceNowV2Source : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { @@ -7580,6 +7733,8 @@ public SnowflakeV2LinkedService(object accountIdentifier, object database, objec public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase PrivateKey { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase PrivateKeyPassphrase { get { throw null; } set { } } + public object Role { get { throw null; } set { } } + public object Schema { get { throw null; } set { } } public object Scope { get { throw null; } set { } } public object TenantId { get { throw null; } set { } } public object User { get { throw null; } set { } } @@ -7818,6 +7973,7 @@ public SparkLinkedService(object host, object port, Azure.Analytics.Synapse.Arti public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SparkAuthenticationType AuthenticationType { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } @@ -8842,8 +8998,10 @@ public partial class TypeConversionSettings public TypeConversionSettings() { } public object AllowDataTruncation { get { throw null; } set { } } public object Culture { get { throw null; } set { } } + public object DateFormat { get { throw null; } set { } } public object DateTimeFormat { get { throw null; } set { } } public object DateTimeOffsetFormat { get { throw null; } set { } } + public object TimeFormat { get { throw null; } set { } } public object TimeSpanFormat { get { throw null; } set { } } public object TreatBooleanAsNumber { get { throw null; } set { } } } @@ -8874,6 +9032,24 @@ public ValidationActivity(string name, Azure.Analytics.Synapse.Artifacts.Models. public object Sleep { get { throw null; } set { } } public object Timeout { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ValueType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ValueType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ValueType Actual { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ValueType Display { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ValueType 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.Analytics.Synapse.Artifacts.Models.ValueType left, Azure.Analytics.Synapse.Artifacts.Models.ValueType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ValueType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ValueType left, Azure.Analytics.Synapse.Artifacts.Models.ValueType right) { throw null; } + public override string ToString() { throw null; } + } public partial class VariableSpecification { public VariableSpecification(Azure.Analytics.Synapse.Artifacts.Models.VariableType type) { } @@ -8933,10 +9109,31 @@ public partial class WaitActivity : Azure.Analytics.Synapse.Artifacts.Models.Con public WaitActivity(string name, object waitTimeInSeconds) : base (default(string)) { } public object WaitTimeInSeconds { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WarehouseAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WarehouseAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType ServicePrincipal { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType SystemAssignedManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType 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.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class WarehouseLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public WarehouseLinkedService(object artifactId, object endpoint) { } public object ArtifactId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType? AuthenticationType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public string EncryptedCredential { get { throw null; } set { } } public object Endpoint { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalCredential { get { throw null; } set { } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs index 29b96e746535..4c7ba7ff8483 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs @@ -1071,12 +1071,43 @@ public partial class AmazonMWSSource : Azure.Analytics.Synapse.Artifacts.Models. public AmazonMWSSource() { } public object Query { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AmazonRdsForOracleAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AmazonRdsForOracleAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType Basic { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType 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.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class AmazonRdsForOracleLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public AmazonRdsForOracleLinkedService(object connectionString) { } + public AmazonRdsForOracleLinkedService() { } + public Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOracleAuthenticationType? AuthenticationType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public object CryptoChecksumClient { get { throw null; } set { } } + public object CryptoChecksumTypesClient { get { throw null; } set { } } + public object EnableBulkLoad { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } + public object EncryptionClient { get { throw null; } set { } } + public object EncryptionTypesClient { get { throw null; } set { } } + public object FetchSize { get { throw null; } set { } } + public object FetchTswtzAsTimestamp { get { throw null; } set { } } + public object InitializationString { get { throw null; } set { } } + public object InitialLobFetchSize { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } + public object Server { get { throw null; } set { } } + public object StatementCacheSize { get { throw null; } set { } } + public object SupportV1DataTypes { get { throw null; } set { } } + public object Username { get { throw null; } set { } } } public partial class AmazonRdsForOraclePartitionSettings { @@ -1090,6 +1121,8 @@ public partial class AmazonRdsForOracleSource : Azure.Analytics.Synapse.Artifact { public AmazonRdsForOracleSource() { } public object AdditionalColumns { get { throw null; } set { } } + public object NumberPrecision { get { throw null; } set { } } + public object NumberScale { get { throw null; } set { } } public object OracleReaderQuery { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AmazonRdsForOraclePartitionSettings PartitionSettings { get { throw null; } set { } } @@ -1553,6 +1586,7 @@ public AzureDatabricksLinkedService(object domain) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessToken { get { throw null; } set { } } public object Authentication { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } + public object DataSecurityMode { get { throw null; } set { } } public object Domain { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object ExistingClusterId { get { throw null; } set { } } @@ -1895,6 +1929,13 @@ public partial class AzurePostgreSqlSink : Azure.Analytics.Synapse.Artifacts.Mod { public AzurePostgreSqlSink() { } public object PreCopyScript { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlSinkUpsertSettings UpsertSettings { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum? WriteMethod { get { throw null; } set { } } + } + public partial class AzurePostgreSqlSinkUpsertSettings + { + public AzurePostgreSqlSinkUpsertSettings() { } + public object Keys { get { throw null; } set { } } } public partial class AzurePostgreSqlSource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { @@ -1908,6 +1949,25 @@ public AzurePostgreSqlTableDataset(Azure.Analytics.Synapse.Artifacts.Models.Link public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzurePostgreSqlWriteMethodEnum : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzurePostgreSqlWriteMethodEnum(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum BulkInsert { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum CopyCommand { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum Upsert { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum 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.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum left, Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum left, Azure.Analytics.Synapse.Artifacts.Models.AzurePostgreSqlWriteMethodEnum right) { throw null; } + public override string ToString() { throw null; } + } public partial class AzureQueueSink : Azure.Analytics.Synapse.Artifacts.Models.CopySink { public AzureQueueSink() { } @@ -2460,6 +2520,8 @@ public partial class CommonDataServiceForAppsSink : Azure.Analytics.Synapse.Arti { public CommonDataServiceForAppsSink(Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior writeBehavior) { } public object AlternateKeyName { get { throw null; } set { } } + public object BypassBusinessLogicExecution { get { throw null; } set { } } + public object BypassPowerAutomateFlows { get { throw null; } set { } } public object IgnoreNullValues { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior WriteBehavior { get { throw null; } set { } } } @@ -3317,6 +3379,8 @@ public partial class DynamicsCrmSink : Azure.Analytics.Synapse.Artifacts.Models. { public DynamicsCrmSink(Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior writeBehavior) { } public object AlternateKeyName { get { throw null; } set { } } + public object BypassBusinessLogicExecution { get { throw null; } set { } } + public object BypassPowerAutomateFlows { get { throw null; } set { } } public object IgnoreNullValues { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior WriteBehavior { get { throw null; } set { } } } @@ -3353,6 +3417,8 @@ public partial class DynamicsSink : Azure.Analytics.Synapse.Artifacts.Models.Cop { public DynamicsSink(Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior writeBehavior) { } public object AlternateKeyName { get { throw null; } set { } } + public object BypassBusinessLogicExecution { get { throw null; } set { } } + public object BypassPowerAutomateFlows { get { throw null; } set { } } public object IgnoreNullValues { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.DynamicsSinkWriteBehavior WriteBehavior { get { throw null; } set { } } } @@ -3558,7 +3624,7 @@ public ExpressionV2() { } public System.Collections.Generic.IList Operands { get { throw null; } } public System.Collections.Generic.IList Operators { get { throw null; } } public Azure.Analytics.Synapse.Artifacts.Models.ExpressionV2Type? Type { get { throw null; } set { } } - public string Value { get { throw null; } set { } } + public object Value { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExpressionV2Type : System.IEquatable @@ -3945,7 +4011,6 @@ public GreenplumLinkedService() { } public object Database { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public object Port { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference Pwd { get { throw null; } set { } } public object SslMode { get { throw null; } set { } } @@ -4058,6 +4123,25 @@ public HdfsSource() { } public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.HDInsightActivityDebugInfoOption left, Azure.Analytics.Synapse.Artifacts.Models.HDInsightActivityDebugInfoOption right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HDInsightClusterAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HDInsightClusterAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType BasicAuth { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType SystemAssignedManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType 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.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class HDInsightHiveActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public HDInsightHiveActivity(string name) : base (default(string)) { } @@ -4073,7 +4157,9 @@ public HDInsightHiveActivity(string name) : base (default(string)) { } public partial class HDInsightLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public HDInsightLinkedService(object clusterUri) { } + public Azure.Analytics.Synapse.Artifacts.Models.HDInsightClusterAuthenticationType? ClusterAuthType { get { throw null; } set { } } public object ClusterUri { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object FileSystem { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference HcatalogLinkedServiceName { get { throw null; } set { } } @@ -4196,6 +4282,7 @@ public HiveLinkedService(object host, Azure.Analytics.Synapse.Artifacts.Models.H public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.HiveAuthenticationType AuthenticationType { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } @@ -4394,11 +4481,13 @@ public ImpalaLinkedService(object host, Azure.Analytics.Synapse.Artifacts.Models public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.ImpalaAuthenticationType AuthenticationType { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public object Port { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ImpalaThriftTransportProtocol? ThriftTransportProtocol { get { throw null; } set { } } public object TrustedCertPath { get { throw null; } set { } } public object Username { get { throw null; } set { } } public object UseSystemTrustStore { get { throw null; } set { } } @@ -4415,6 +4504,11 @@ public partial class ImpalaSource : Azure.Analytics.Synapse.Artifacts.Models.Tab public ImpalaSource() { } public object Query { get { throw null; } set { } } } + public enum ImpalaThriftTransportProtocol + { + Binary = 0, + Http = 1, + } public abstract partial class ImportSettings { protected ImportSettings() { } @@ -4764,10 +4858,31 @@ public KqlScriptResource() { } public Azure.Analytics.Synapse.Artifacts.Models.KqlScript Properties { get { throw null; } set { } } public string Type { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LakehouseAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LakehouseAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType ServicePrincipal { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType SystemAssignedManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType 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.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class LakeHouseLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public LakeHouseLinkedService() { } public object ArtifactId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.LakehouseAuthenticationType? AuthenticationType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public string EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalCredential { get { throw null; } set { } } public object ServicePrincipalCredentialType { get { throw null; } set { } } @@ -5722,6 +5837,9 @@ public partial class Office365LinkedService : Azure.Analytics.Synapse.Artifacts. public Office365LinkedService(object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, Azure.Analytics.Synapse.Artifacts.Models.SecretBase servicePrincipalKey) { } public object EncryptedCredential { get { throw null; } set { } } public object Office365TenantId { get { throw null; } set { } } + public object ServicePrincipalCredentialType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalEmbeddedCert { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalEmbeddedCertPassword { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalKey { get { throw null; } set { } } public object ServicePrincipalTenantId { get { throw null; } set { } } @@ -5764,7 +5882,7 @@ internal OperationResult() { } } public partial class OracleLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public OracleLinkedService(object connectionString) { } + public OracleLinkedService() { } public Azure.Analytics.Synapse.Artifacts.Models.OracleAuthenticationType? AuthenticationType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } public object CryptoChecksumClient { get { throw null; } set { } } @@ -5840,6 +5958,8 @@ public partial class OracleSource : Azure.Analytics.Synapse.Artifacts.Models.Cop { public OracleSource() { } public object AdditionalColumns { get { throw null; } set { } } + public object NumberPrecision { get { throw null; } set { } } + public object NumberScale { get { throw null; } set { } } public object OracleReaderQuery { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.OraclePartitionOption? PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.OraclePartitionSettings PartitionSettings { get { throw null; } set { } } @@ -6213,11 +6333,12 @@ public PowerBIWorkspaceLinkedService(string workspaceId, string tenantId) { } } public partial class PrestoLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public PrestoLinkedService(object host, object serverVersion, object catalog, Azure.Analytics.Synapse.Artifacts.Models.PrestoAuthenticationType authenticationType) { } + public PrestoLinkedService(object host, object catalog, Azure.Analytics.Synapse.Artifacts.Models.PrestoAuthenticationType authenticationType) { } public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.PrestoAuthenticationType AuthenticationType { get { throw null; } set { } } public object Catalog { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } @@ -6284,7 +6405,7 @@ public QuickbaseLinkedService(object url, Azure.Analytics.Synapse.Artifacts.Mode } public partial class QuickBooksLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, Azure.Analytics.Synapse.Artifacts.Models.SecretBase consumerSecret, Azure.Analytics.Synapse.Artifacts.Models.SecretBase accessToken, Azure.Analytics.Synapse.Artifacts.Models.SecretBase accessTokenSecret) { } + public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, Azure.Analytics.Synapse.Artifacts.Models.SecretBase consumerSecret) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessToken { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessTokenSecret { get { throw null; } set { } } public object CompanyId { get { throw null; } set { } } @@ -6293,6 +6414,7 @@ public QuickBooksLinkedService(object endpoint, object companyId, object consume public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ConsumerSecret { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Endpoint { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase RefreshToken { get { throw null; } set { } } public object UseEncryptedEndpoints { get { throw null; } set { } } } public partial class QuickBooksObjectDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset @@ -7367,10 +7489,41 @@ public partial class ServiceNowSource : Azure.Analytics.Synapse.Artifacts.Models public ServiceNowSource() { } public object Query { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceNowV2AuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceNowV2AuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType Basic { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType OAuth2 { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType 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.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ServiceNowV2LinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService + { + public ServiceNowV2LinkedService(object endpoint, Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType authenticationType) { } + public Azure.Analytics.Synapse.Artifacts.Models.ServiceNowV2AuthenticationType AuthenticationType { get { throw null; } set { } } + public object ClientId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ClientSecret { get { throw null; } set { } } + public string EncryptedCredential { get { throw null; } set { } } + public object Endpoint { get { throw null; } set { } } + public object GrantType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } + public object Username { get { throw null; } set { } } + } public partial class ServiceNowV2ObjectDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { public ServiceNowV2ObjectDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } public object TableName { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ValueType? ValueType { get { throw null; } set { } } } public partial class ServiceNowV2Source : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { @@ -7580,6 +7733,8 @@ public SnowflakeV2LinkedService(object accountIdentifier, object database, objec public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase PrivateKey { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase PrivateKeyPassphrase { get { throw null; } set { } } + public object Role { get { throw null; } set { } } + public object Schema { get { throw null; } set { } } public object Scope { get { throw null; } set { } } public object TenantId { get { throw null; } set { } } public object User { get { throw null; } set { } } @@ -7818,6 +7973,7 @@ public SparkLinkedService(object host, object port, Azure.Analytics.Synapse.Arti public object AllowHostNameCNMismatch { get { throw null; } set { } } public object AllowSelfSignedServerCert { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SparkAuthenticationType AuthenticationType { get { throw null; } set { } } + public object EnableServerCertificateValidation { get { throw null; } set { } } public object EnableSsl { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object Host { get { throw null; } set { } } @@ -8842,8 +8998,10 @@ public partial class TypeConversionSettings public TypeConversionSettings() { } public object AllowDataTruncation { get { throw null; } set { } } public object Culture { get { throw null; } set { } } + public object DateFormat { get { throw null; } set { } } public object DateTimeFormat { get { throw null; } set { } } public object DateTimeOffsetFormat { get { throw null; } set { } } + public object TimeFormat { get { throw null; } set { } } public object TimeSpanFormat { get { throw null; } set { } } public object TreatBooleanAsNumber { get { throw null; } set { } } } @@ -8874,6 +9032,24 @@ public ValidationActivity(string name, Azure.Analytics.Synapse.Artifacts.Models. public object Sleep { get { throw null; } set { } } public object Timeout { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ValueType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ValueType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ValueType Actual { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ValueType Display { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ValueType 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.Analytics.Synapse.Artifacts.Models.ValueType left, Azure.Analytics.Synapse.Artifacts.Models.ValueType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ValueType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ValueType left, Azure.Analytics.Synapse.Artifacts.Models.ValueType right) { throw null; } + public override string ToString() { throw null; } + } public partial class VariableSpecification { public VariableSpecification(Azure.Analytics.Synapse.Artifacts.Models.VariableType type) { } @@ -8933,10 +9109,31 @@ public partial class WaitActivity : Azure.Analytics.Synapse.Artifacts.Models.Con public WaitActivity(string name, object waitTimeInSeconds) : base (default(string)) { } public object WaitTimeInSeconds { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WarehouseAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WarehouseAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType ServicePrincipal { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType SystemAssignedManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType 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.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class WarehouseLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public WarehouseLinkedService(object artifactId, object endpoint) { } public object ArtifactId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.WarehouseAuthenticationType? AuthenticationType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public string EncryptedCredential { get { throw null; } set { } } public object Endpoint { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalCredential { get { throw null; } set { } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj index 38b5cd3f19f2..f590c2787d90 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj @@ -2,7 +2,7 @@ This is the Microsoft Azure Synapse Analytics Artifacts client library Azure.Analytics.Synapse.Artifacts - 1.0.0-preview.22 + 1.0.0-preview.23 Microsoft Azure Synapse Artifacts;$(PackageCommonTags) true $(RequiredTargetFrameworks) diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/AnalyticsSynapseArtifactsModelFactory.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/AnalyticsSynapseArtifactsModelFactory.cs index 21f2a9b988b5..2c9a98ae9afc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/AnalyticsSynapseArtifactsModelFactory.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/AnalyticsSynapseArtifactsModelFactory.cs @@ -616,7 +616,7 @@ public static OperationResult OperationResult(string status = null, string code /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// /// A new instance for mocking. public static LinkedServiceResource LinkedServiceResource(string id = null, string name = null, string type = null, string etag = null, LinkedService properties = null) diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleAuthenticationType.cs new file mode 100644 index 000000000000..620e04a099c7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleAuthenticationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Authentication type for connecting to the AmazonRdsForOracle database. Only used for Version 2.0. + public readonly partial struct AmazonRdsForOracleAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AmazonRdsForOracleAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + + /// Basic. + public static AmazonRdsForOracleAuthenticationType Basic { get; } = new AmazonRdsForOracleAuthenticationType(BasicValue); + /// Determines if two values are the same. + public static bool operator ==(AmazonRdsForOracleAuthenticationType left, AmazonRdsForOracleAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AmazonRdsForOracleAuthenticationType left, AmazonRdsForOracleAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AmazonRdsForOracleAuthenticationType(string value) => new AmazonRdsForOracleAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AmazonRdsForOracleAuthenticationType other && Equals(other); + /// + public bool Equals(AmazonRdsForOracleAuthenticationType 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/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs index 2ce7127d8895..016809980b77 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.Serialization.cs @@ -64,13 +64,86 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("typeProperties"u8); writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - writer.WriteObjectValue(ConnectionString); + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteObjectValue(ConnectionString); + } + if (Optional.IsDefined(Server)) + { + writer.WritePropertyName("server"u8); + writer.WriteObjectValue(Server); + } + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("authenticationType"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteObjectValue(Username); + } if (Optional.IsDefined(Password)) { writer.WritePropertyName("password"u8); writer.WriteObjectValue(Password); } + if (Optional.IsDefined(EncryptionClient)) + { + writer.WritePropertyName("encryptionClient"u8); + writer.WriteObjectValue(EncryptionClient); + } + if (Optional.IsDefined(EncryptionTypesClient)) + { + writer.WritePropertyName("encryptionTypesClient"u8); + writer.WriteObjectValue(EncryptionTypesClient); + } + if (Optional.IsDefined(CryptoChecksumClient)) + { + writer.WritePropertyName("cryptoChecksumClient"u8); + writer.WriteObjectValue(CryptoChecksumClient); + } + if (Optional.IsDefined(CryptoChecksumTypesClient)) + { + writer.WritePropertyName("cryptoChecksumTypesClient"u8); + writer.WriteObjectValue(CryptoChecksumTypesClient); + } + if (Optional.IsDefined(InitialLobFetchSize)) + { + writer.WritePropertyName("initialLobFetchSize"u8); + writer.WriteObjectValue(InitialLobFetchSize); + } + if (Optional.IsDefined(FetchSize)) + { + writer.WritePropertyName("fetchSize"u8); + writer.WriteObjectValue(FetchSize); + } + if (Optional.IsDefined(StatementCacheSize)) + { + writer.WritePropertyName("statementCacheSize"u8); + writer.WriteObjectValue(StatementCacheSize); + } + if (Optional.IsDefined(InitializationString)) + { + writer.WritePropertyName("initializationString"u8); + writer.WriteObjectValue(InitializationString); + } + if (Optional.IsDefined(EnableBulkLoad)) + { + writer.WritePropertyName("enableBulkLoad"u8); + writer.WriteObjectValue(EnableBulkLoad); + } + if (Optional.IsDefined(SupportV1DataTypes)) + { + writer.WritePropertyName("supportV1DataTypes"u8); + writer.WriteObjectValue(SupportV1DataTypes); + } + if (Optional.IsDefined(FetchTswtzAsTimestamp)) + { + writer.WritePropertyName("fetchTswtzAsTimestamp"u8); + writer.WriteObjectValue(FetchTswtzAsTimestamp); + } if (Optional.IsDefined(EncryptedCredential)) { writer.WritePropertyName("encryptedCredential"u8); @@ -98,7 +171,21 @@ internal static AmazonRdsForOracleLinkedService DeserializeAmazonRdsForOracleLin IDictionary parameters = default; IList annotations = default; object connectionString = default; + object server = default; + AmazonRdsForOracleAuthenticationType? authenticationType = default; + object username = default; SecretBase password = default; + object encryptionClient = default; + object encryptionTypesClient = default; + object cryptoChecksumClient = default; + object cryptoChecksumTypesClient = default; + object initialLobFetchSize = default; + object fetchSize = default; + object statementCacheSize = default; + object initializationString = default; + object enableBulkLoad = default; + object supportV1DataTypes = default; + object fetchTswtzAsTimestamp = default; object encryptedCredential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -174,9 +261,40 @@ internal static AmazonRdsForOracleLinkedService DeserializeAmazonRdsForOracleLin { if (property0.NameEquals("connectionString"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } connectionString = property0.Value.GetObject(); continue; } + if (property0.NameEquals("server"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new AmazonRdsForOracleAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("password"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -186,6 +304,105 @@ internal static AmazonRdsForOracleLinkedService DeserializeAmazonRdsForOracleLin password = SecretBase.DeserializeSecretBase(property0.Value); continue; } + if (property0.NameEquals("encryptionClient"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptionClient = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptionTypesClient"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptionTypesClient = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("cryptoChecksumClient"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cryptoChecksumClient = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("cryptoChecksumTypesClient"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cryptoChecksumTypesClient = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("initialLobFetchSize"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialLobFetchSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("fetchSize"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fetchSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("statementCacheSize"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statementCacheSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("initializationString"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initializationString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableBulkLoad"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableBulkLoad = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("supportV1DataTypes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + supportV1DataTypes = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("fetchTswtzAsTimestamp"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fetchTswtzAsTimestamp = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("encryptedCredential"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -210,7 +427,21 @@ internal static AmazonRdsForOracleLinkedService DeserializeAmazonRdsForOracleLin annotations ?? new ChangeTrackingList(), additionalProperties, connectionString, + server, + authenticationType, + username, password, + encryptionClient, + encryptionTypesClient, + cryptoChecksumClient, + cryptoChecksumTypesClient, + initialLobFetchSize, + fetchSize, + statementCacheSize, + initializationString, + enableBulkLoad, + supportV1DataTypes, + fetchTswtzAsTimestamp, encryptedCredential); } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.cs index 21a57a16ca11..754c44cb7866 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleLinkedService.cs @@ -5,22 +5,16 @@ #nullable disable -using System; using System.Collections.Generic; namespace Azure.Analytics.Synapse.Artifacts.Models { - /// AmazonRdsForOracle database. + /// AmazonRdsForOracle database. This linked service has supported version property. The Version 1.0 is scheduled for deprecation while your pipeline will continue to run after EOL but without any bug fix or new features. public partial class AmazonRdsForOracleLinkedService : LinkedService { /// Initializes a new instance of . - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. - /// is null. - public AmazonRdsForOracleLinkedService(object connectionString) + public AmazonRdsForOracleLinkedService() { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; Type = "AmazonRdsForOracle"; } @@ -32,29 +26,85 @@ public AmazonRdsForOracleLinkedService(object connectionString) /// Parameters for linked service. /// List of tags that can be used for describing the linked service. /// Additional Properties. - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Only used for Version 1.0. + /// The location of AmazonRdsForOracle database you want to connect to, the supported forms include connector descriptor, Easy Connect (Plus) Naming and Oracle Net Services Name (Only self-hosted IR). Type: string. Only used for Version 2.0. + /// Authentication type for connecting to the AmazonRdsForOracle database. Only used for Version 2.0. + /// The AmazonRdsForOracle database username. Type: string. Only used for Version 2.0. /// /// The Azure key vault secret reference of password in connection string. /// 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 and . /// + /// Specifies the encryption client behavior. Supported values are accepted, rejected, requested or required, default value is required. Type: string. Only used for Version 2.0. + /// Specifies the encryption algorithms that client can use. Supported values are AES128, AES192, AES256, 3DES112, 3DES168, default value is (AES256). Type: string. Only used for Version 2.0. + /// Specifies the desired data integrity behavior when this client connects to a server. Supported values are accepted, rejected, requested or required, default value is required. Type: string. Only used for Version 2.0. + /// Specifies the crypto-checksum algorithms that client can use. Supported values are SHA1, SHA256, SHA384, SHA512, default value is (SHA512). Type: string. Only used for Version 2.0. + /// Specifies the amount that the source initially fetches for LOB columns, default value is 0. Type: integer. Only used for Version 2.0. + /// Specifies the number of bytes that the driver allocates to fetch the data in one database round-trip, default value is 10485760. Type: integer. Only used for Version 2.0. + /// Specifies the number of cursors or statements to be cached for each database connection, default value is 0. Type: integer. Only used for Version 2.0. + /// Specifies a command that is issued immediately after connecting to the database to manage session settings. Type: string. Only used for Version 2.0. + /// Specifies whether to use bulk copy or batch insert when loading data into the database, default value is true. Type: boolean. Only used for Version 2.0. + /// Specifies whether to use the Version 1.0 data type mappings. Do not set this to true unless you want to keep backward compatibility with Version 1.0's data type mappings, default value is false. Type: boolean. Only used for Version 2.0. + /// Specifies whether the driver returns column value with the TIMESTAMP WITH TIME ZONE data type as DateTime or string. This setting is ignored if supportV1DataTypes is not true, default value is true. Type: boolean. Only used for Version 2.0. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AmazonRdsForOracleLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, SecretBase password, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal AmazonRdsForOracleLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object server, AmazonRdsForOracleAuthenticationType? authenticationType, object username, SecretBase password, object encryptionClient, object encryptionTypesClient, object cryptoChecksumClient, object cryptoChecksumTypesClient, object initialLobFetchSize, object fetchSize, object statementCacheSize, object initializationString, object enableBulkLoad, object supportV1DataTypes, object fetchTswtzAsTimestamp, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; + Server = server; + AuthenticationType = authenticationType; + Username = username; Password = password; + EncryptionClient = encryptionClient; + EncryptionTypesClient = encryptionTypesClient; + CryptoChecksumClient = cryptoChecksumClient; + CryptoChecksumTypesClient = cryptoChecksumTypesClient; + InitialLobFetchSize = initialLobFetchSize; + FetchSize = fetchSize; + StatementCacheSize = statementCacheSize; + InitializationString = initializationString; + EnableBulkLoad = enableBulkLoad; + SupportV1DataTypes = supportV1DataTypes; + FetchTswtzAsTimestamp = fetchTswtzAsTimestamp; EncryptedCredential = encryptedCredential; Type = type ?? "AmazonRdsForOracle"; } - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Only used for Version 1.0. public object ConnectionString { get; set; } + /// The location of AmazonRdsForOracle database you want to connect to, the supported forms include connector descriptor, Easy Connect (Plus) Naming and Oracle Net Services Name (Only self-hosted IR). Type: string. Only used for Version 2.0. + public object Server { get; set; } + /// Authentication type for connecting to the AmazonRdsForOracle database. Only used for Version 2.0. + public AmazonRdsForOracleAuthenticationType? AuthenticationType { get; set; } + /// The AmazonRdsForOracle database username. Type: string. Only used for Version 2.0. + public object Username { get; set; } /// /// The Azure key vault secret reference of password in connection string. /// 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 and . /// public SecretBase Password { get; set; } + /// Specifies the encryption client behavior. Supported values are accepted, rejected, requested or required, default value is required. Type: string. Only used for Version 2.0. + public object EncryptionClient { get; set; } + /// Specifies the encryption algorithms that client can use. Supported values are AES128, AES192, AES256, 3DES112, 3DES168, default value is (AES256). Type: string. Only used for Version 2.0. + public object EncryptionTypesClient { get; set; } + /// Specifies the desired data integrity behavior when this client connects to a server. Supported values are accepted, rejected, requested or required, default value is required. Type: string. Only used for Version 2.0. + public object CryptoChecksumClient { get; set; } + /// Specifies the crypto-checksum algorithms that client can use. Supported values are SHA1, SHA256, SHA384, SHA512, default value is (SHA512). Type: string. Only used for Version 2.0. + public object CryptoChecksumTypesClient { get; set; } + /// Specifies the amount that the source initially fetches for LOB columns, default value is 0. Type: integer. Only used for Version 2.0. + public object InitialLobFetchSize { get; set; } + /// Specifies the number of bytes that the driver allocates to fetch the data in one database round-trip, default value is 10485760. Type: integer. Only used for Version 2.0. + public object FetchSize { get; set; } + /// Specifies the number of cursors or statements to be cached for each database connection, default value is 0. Type: integer. Only used for Version 2.0. + public object StatementCacheSize { get; set; } + /// Specifies a command that is issued immediately after connecting to the database to manage session settings. Type: string. Only used for Version 2.0. + public object InitializationString { get; set; } + /// Specifies whether to use bulk copy or batch insert when loading data into the database, default value is true. Type: boolean. Only used for Version 2.0. + public object EnableBulkLoad { get; set; } + /// Specifies whether to use the Version 1.0 data type mappings. Do not set this to true unless you want to keep backward compatibility with Version 1.0's data type mappings, default value is false. Type: boolean. Only used for Version 2.0. + public object SupportV1DataTypes { get; set; } + /// Specifies whether the driver returns column value with the TIMESTAMP WITH TIME ZONE data type as DateTime or string. This setting is ignored if supportV1DataTypes is not true, default value is true. Type: boolean. Only used for Version 2.0. + public object FetchTswtzAsTimestamp { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.Serialization.cs index 338b3bc5f829..dbb2038506a3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.Serialization.cs @@ -44,6 +44,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("additionalColumns"u8); writer.WriteObjectValue(AdditionalColumns); } + if (Optional.IsDefined(NumberPrecision)) + { + writer.WritePropertyName("numberPrecision"u8); + writer.WriteObjectValue(NumberPrecision); + } + if (Optional.IsDefined(NumberScale)) + { + writer.WritePropertyName("numberScale"u8); + writer.WriteObjectValue(NumberScale); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (Optional.IsDefined(SourceRetryCount)) @@ -80,6 +90,8 @@ internal static AmazonRdsForOracleSource DeserializeAmazonRdsForOracleSource(Jso object partitionOption = default; AmazonRdsForOraclePartitionSettings partitionSettings = default; object additionalColumns = default; + object numberPrecision = default; + object numberScale = default; string type = default; object sourceRetryCount = default; object sourceRetryWait = default; @@ -133,6 +145,24 @@ internal static AmazonRdsForOracleSource DeserializeAmazonRdsForOracleSource(Jso additionalColumns = property.Value.GetObject(); continue; } + if (property.NameEquals("numberPrecision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberPrecision = property.Value.GetObject(); + continue; + } + if (property.NameEquals("numberScale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberScale = property.Value.GetObject(); + continue; + } if (property.NameEquals("type"u8)) { type = property.Value.GetString(); @@ -178,7 +208,9 @@ internal static AmazonRdsForOracleSource DeserializeAmazonRdsForOracleSource(Jso queryTimeout, partitionOption, partitionSettings, - additionalColumns); + additionalColumns, + numberPrecision, + numberScale); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.cs index 4422a0696c24..aea354a584d5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForOracleSource.cs @@ -29,13 +29,17 @@ public AmazonRdsForOracleSource() /// The partition mechanism that will be used for AmazonRdsForOracle read in parallel. Type: string (or Expression with resultType string). /// The settings that will be leveraged for AmazonRdsForOracle source partitioning. /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal AmazonRdsForOracleSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object oracleReaderQuery, object queryTimeout, object partitionOption, AmazonRdsForOraclePartitionSettings partitionSettings, object additionalColumns) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) + /// The decimal precision used to represent Oracle NUMBER type without precision and scale. The range is 1 to 256 and default value is 256 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + /// The decimal scale used to represent Oracle NUMBER type without precision and scale. The range is 0 to 130 and default value is 130 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + internal AmazonRdsForOracleSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object oracleReaderQuery, object queryTimeout, object partitionOption, AmazonRdsForOraclePartitionSettings partitionSettings, object additionalColumns, object numberPrecision, object numberScale) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) { OracleReaderQuery = oracleReaderQuery; QueryTimeout = queryTimeout; PartitionOption = partitionOption; PartitionSettings = partitionSettings; AdditionalColumns = additionalColumns; + NumberPrecision = numberPrecision; + NumberScale = numberScale; Type = type ?? "AmazonRdsForOracleSource"; } @@ -49,5 +53,9 @@ internal AmazonRdsForOracleSource(string type, object sourceRetryCount, object s public AmazonRdsForOraclePartitionSettings PartitionSettings { get; set; } /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). public object AdditionalColumns { get; set; } + /// The decimal precision used to represent Oracle NUMBER type without precision and scale. The range is 1 to 256 and default value is 256 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + public object NumberPrecision { get; set; } + /// The decimal scale used to represent Oracle NUMBER type without precision and scale. The range is 0 to 130 and default value is 130 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + public object NumberScale { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs index d905f2b6ed3a..ed375930fe96 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs @@ -189,6 +189,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("credential"u8); writer.WriteObjectValue(Credential); } + if (Optional.IsDefined(DataSecurityMode)) + { + writer.WritePropertyName("dataSecurityMode"u8); + writer.WriteObjectValue(DataSecurityMode); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -229,6 +234,7 @@ internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedSer object encryptedCredential = default; object policyId = default; CredentialReference credential = default; + object dataSecurityMode = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -504,6 +510,15 @@ internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedSer credential = CredentialReference.DeserializeCredentialReference(property0.Value); continue; } + if (property0.NameEquals("dataSecurityMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSecurityMode = property0.Value.GetObject(); + continue; + } } continue; } @@ -536,7 +551,8 @@ internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedSer newClusterEnableElasticDisk, encryptedCredential, policyId, - credential); + credential, + dataSecurityMode); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs index c5f505f58ebd..b0085abab399 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs @@ -58,7 +58,8 @@ public AzureDatabricksLinkedService(object domain) /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). /// The policy id for limiting the ability to configure clusters based on a user defined set of rules. Type: string (or Expression with resultType string). /// The credential reference containing authentication information. - internal AzureDatabricksLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object authentication, object workspaceResourceId, object existingClusterId, object instancePoolId, object newClusterVersion, object newClusterNumOfWorker, object newClusterNodeType, IDictionary newClusterSparkConf, IDictionary newClusterSparkEnvVars, IDictionary newClusterCustomTags, object newClusterLogDestination, object newClusterDriverNodeType, object newClusterInitScripts, object newClusterEnableElasticDisk, object encryptedCredential, object policyId, CredentialReference credential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + /// The data security mode for the Databricks Cluster. Type: string (or Expression with resultType string). + internal AzureDatabricksLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object authentication, object workspaceResourceId, object existingClusterId, object instancePoolId, object newClusterVersion, object newClusterNumOfWorker, object newClusterNodeType, IDictionary newClusterSparkConf, IDictionary newClusterSparkEnvVars, IDictionary newClusterCustomTags, object newClusterLogDestination, object newClusterDriverNodeType, object newClusterInitScripts, object newClusterEnableElasticDisk, object encryptedCredential, object policyId, CredentialReference credential, object dataSecurityMode) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { Domain = domain; AccessToken = accessToken; @@ -79,6 +80,7 @@ internal AzureDatabricksLinkedService(string type, string version, IntegrationRu EncryptedCredential = encryptedCredential; PolicyId = policyId; Credential = credential; + DataSecurityMode = dataSecurityMode; Type = type ?? "AzureDatabricks"; } @@ -124,5 +126,7 @@ internal AzureDatabricksLinkedService(string type, string version, IntegrationRu public object PolicyId { get; set; } /// The credential reference containing authentication information. public CredentialReference Credential { get; set; } + /// The data security mode for the Databricks Cluster. Type: string (or Expression with resultType string). + public object DataSecurityMode { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.Serialization.cs index 488b75803ec7..bca180fb64b5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.Serialization.cs @@ -24,6 +24,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preCopyScript"u8); writer.WriteObjectValue(PreCopyScript); } + if (Optional.IsDefined(WriteMethod)) + { + writer.WritePropertyName("writeMethod"u8); + writer.WriteStringValue(WriteMethod.Value.ToString()); + } + if (Optional.IsDefined(UpsertSettings)) + { + writer.WritePropertyName("upsertSettings"u8); + writer.WriteObjectValue(UpsertSettings); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (Optional.IsDefined(WriteBatchSize)) @@ -66,6 +76,8 @@ internal static AzurePostgreSqlSink DeserializeAzurePostgreSqlSink(JsonElement e return null; } object preCopyScript = default; + AzurePostgreSqlWriteMethodEnum? writeMethod = default; + AzurePostgreSqlSinkUpsertSettings upsertSettings = default; string type = default; object writeBatchSize = default; object writeBatchTimeout = default; @@ -85,6 +97,24 @@ internal static AzurePostgreSqlSink DeserializeAzurePostgreSqlSink(JsonElement e preCopyScript = property.Value.GetObject(); continue; } + if (property.NameEquals("writeMethod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeMethod = new AzurePostgreSqlWriteMethodEnum(property.Value.GetString()); + continue; + } + if (property.NameEquals("upsertSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upsertSettings = AzurePostgreSqlSinkUpsertSettings.DeserializeAzurePostgreSqlSinkUpsertSettings(property.Value); + continue; + } if (property.NameEquals("type"u8)) { type = property.Value.GetString(); @@ -146,7 +176,9 @@ internal static AzurePostgreSqlSink DeserializeAzurePostgreSqlSink(JsonElement e sinkRetryWait, maxConcurrentConnections, additionalProperties, - preCopyScript); + preCopyScript, + writeMethod, + upsertSettings); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.cs index 70f1bd853583..17c3f2c3ac75 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSink.cs @@ -9,7 +9,7 @@ namespace Azure.Analytics.Synapse.Artifacts.Models { - /// A copy activity Azure PostgreSQL sink. + /// A copy activity Azure Database for PostgreSQL sink. public partial class AzurePostgreSqlSink : CopySink { /// Initializes a new instance of . @@ -27,13 +27,21 @@ public AzurePostgreSqlSink() /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). /// Additional Properties. /// A query to execute before starting the copy. Type: string (or Expression with resultType string). - internal AzurePostgreSqlSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object preCopyScript) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) + /// The write behavior for the operation. Default is Bulk Insert. + /// Azure Database for PostgreSQL upsert option settings. + internal AzurePostgreSqlSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object preCopyScript, AzurePostgreSqlWriteMethodEnum? writeMethod, AzurePostgreSqlSinkUpsertSettings upsertSettings) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) { PreCopyScript = preCopyScript; + WriteMethod = writeMethod; + UpsertSettings = upsertSettings; Type = type ?? "AzurePostgreSqlSink"; } /// A query to execute before starting the copy. Type: string (or Expression with resultType string). public object PreCopyScript { get; set; } + /// The write behavior for the operation. Default is Bulk Insert. + public AzurePostgreSqlWriteMethodEnum? WriteMethod { get; set; } + /// Azure Database for PostgreSQL upsert option settings. + public AzurePostgreSqlSinkUpsertSettings UpsertSettings { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSinkUpsertSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSinkUpsertSettings.Serialization.cs new file mode 100644 index 000000000000..4e2c41662b2e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSinkUpsertSettings.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzurePostgreSqlSinkUpsertSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Keys)) + { + writer.WritePropertyName("keys"u8); + writer.WriteObjectValue(Keys); + } + writer.WriteEndObject(); + } + + internal static AzurePostgreSqlSinkUpsertSettings DeserializeAzurePostgreSqlSinkUpsertSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + object keys = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keys = property.Value.GetObject(); + continue; + } + } + return new AzurePostgreSqlSinkUpsertSettings(keys); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AzurePostgreSqlSinkUpsertSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzurePostgreSqlSinkUpsertSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSinkUpsertSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSinkUpsertSettings.cs new file mode 100644 index 000000000000..76513a82fbab --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSinkUpsertSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Database for PostgreSQL upsert option settings. + public partial class AzurePostgreSqlSinkUpsertSettings + { + /// Initializes a new instance of . + public AzurePostgreSqlSinkUpsertSettings() + { + } + + /// Initializes a new instance of . + /// Key column names for unique row identification. Type: array of strings (or Expression with resultType array of strings). + internal AzurePostgreSqlSinkUpsertSettings(object keys) + { + Keys = keys; + } + + /// Key column names for unique row identification. Type: array of strings (or Expression with resultType array of strings). + public object Keys { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSource.cs index 08af597aa5e5..81edb3c66be3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlSource.cs @@ -9,7 +9,7 @@ namespace Azure.Analytics.Synapse.Artifacts.Models { - /// A copy activity Azure PostgreSQL source. + /// A copy activity Azure Database for PostgreSQL source. public partial class AzurePostgreSqlSource : TabularSource { /// Initializes a new instance of . diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlWriteMethodEnum.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlWriteMethodEnum.cs new file mode 100644 index 000000000000..443ac5288778 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlWriteMethodEnum.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The write behavior for the operation. Default is Bulk Insert. + public readonly partial struct AzurePostgreSqlWriteMethodEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzurePostgreSqlWriteMethodEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BulkInsertValue = "BulkInsert"; + private const string CopyCommandValue = "CopyCommand"; + private const string UpsertValue = "Upsert"; + + /// BulkInsert. + public static AzurePostgreSqlWriteMethodEnum BulkInsert { get; } = new AzurePostgreSqlWriteMethodEnum(BulkInsertValue); + /// CopyCommand. + public static AzurePostgreSqlWriteMethodEnum CopyCommand { get; } = new AzurePostgreSqlWriteMethodEnum(CopyCommandValue); + /// Upsert. + public static AzurePostgreSqlWriteMethodEnum Upsert { get; } = new AzurePostgreSqlWriteMethodEnum(UpsertValue); + /// Determines if two values are the same. + public static bool operator ==(AzurePostgreSqlWriteMethodEnum left, AzurePostgreSqlWriteMethodEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzurePostgreSqlWriteMethodEnum left, AzurePostgreSqlWriteMethodEnum right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzurePostgreSqlWriteMethodEnum(string value) => new AzurePostgreSqlWriteMethodEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzurePostgreSqlWriteMethodEnum other && Equals(other); + /// + public bool Equals(AzurePostgreSqlWriteMethodEnum 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/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs index 6709cac4c793..c13c04f7d750 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.Serialization.cs @@ -31,6 +31,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("alternateKeyName"u8); writer.WriteObjectValue(AlternateKeyName); } + if (Optional.IsDefined(BypassBusinessLogicExecution)) + { + writer.WritePropertyName("bypassBusinessLogicExecution"u8); + writer.WriteObjectValue(BypassBusinessLogicExecution); + } + if (Optional.IsDefined(BypassPowerAutomateFlows)) + { + writer.WritePropertyName("bypassPowerAutomateFlows"u8); + writer.WriteObjectValue(BypassPowerAutomateFlows); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (Optional.IsDefined(WriteBatchSize)) @@ -75,6 +85,8 @@ internal static CommonDataServiceForAppsSink DeserializeCommonDataServiceForApps DynamicsSinkWriteBehavior writeBehavior = default; object ignoreNullValues = default; object alternateKeyName = default; + object bypassBusinessLogicExecution = default; + object bypassPowerAutomateFlows = default; string type = default; object writeBatchSize = default; object writeBatchTimeout = default; @@ -108,6 +120,24 @@ internal static CommonDataServiceForAppsSink DeserializeCommonDataServiceForApps alternateKeyName = property.Value.GetObject(); continue; } + if (property.NameEquals("bypassBusinessLogicExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassBusinessLogicExecution = property.Value.GetObject(); + continue; + } + if (property.NameEquals("bypassPowerAutomateFlows"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassPowerAutomateFlows = property.Value.GetObject(); + continue; + } if (property.NameEquals("type"u8)) { type = property.Value.GetString(); @@ -171,7 +201,9 @@ internal static CommonDataServiceForAppsSink DeserializeCommonDataServiceForApps additionalProperties, writeBehavior, ignoreNullValues, - alternateKeyName); + alternateKeyName, + bypassBusinessLogicExecution, + bypassPowerAutomateFlows); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.cs index 09689a432c19..56aab316ddf5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsSink.cs @@ -31,11 +31,15 @@ public CommonDataServiceForAppsSink(DynamicsSinkWriteBehavior writeBehavior) /// The write behavior for the operation. /// The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - internal CommonDataServiceForAppsSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) + /// Controls the bypass of Dataverse custom business logic. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). + /// Controls the bypass of Power Automate flows. Default is false. Type: boolean (or Expression with resultType boolean). + internal CommonDataServiceForAppsSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName, object bypassBusinessLogicExecution, object bypassPowerAutomateFlows) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) { WriteBehavior = writeBehavior; IgnoreNullValues = ignoreNullValues; AlternateKeyName = alternateKeyName; + BypassBusinessLogicExecution = bypassBusinessLogicExecution; + BypassPowerAutomateFlows = bypassPowerAutomateFlows; Type = type ?? "CommonDataServiceForAppsSink"; } @@ -45,5 +49,9 @@ internal CommonDataServiceForAppsSink(string type, object writeBatchSize, object public object IgnoreNullValues { get; set; } /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). public object AlternateKeyName { get; set; } + /// Controls the bypass of Dataverse custom business logic. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). + public object BypassBusinessLogicExecution { get; set; } + /// Controls the bypass of Power Automate flows. Default is false. Type: boolean (or Expression with resultType boolean). + public object BypassPowerAutomateFlows { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.Serialization.cs index 72302f02e75e..9e00534eb7be 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.Serialization.cs @@ -31,6 +31,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("alternateKeyName"u8); writer.WriteObjectValue(AlternateKeyName); } + if (Optional.IsDefined(BypassBusinessLogicExecution)) + { + writer.WritePropertyName("bypassBusinessLogicExecution"u8); + writer.WriteObjectValue(BypassBusinessLogicExecution); + } + if (Optional.IsDefined(BypassPowerAutomateFlows)) + { + writer.WritePropertyName("bypassPowerAutomateFlows"u8); + writer.WriteObjectValue(BypassPowerAutomateFlows); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (Optional.IsDefined(WriteBatchSize)) @@ -75,6 +85,8 @@ internal static DynamicsCrmSink DeserializeDynamicsCrmSink(JsonElement element) DynamicsSinkWriteBehavior writeBehavior = default; object ignoreNullValues = default; object alternateKeyName = default; + object bypassBusinessLogicExecution = default; + object bypassPowerAutomateFlows = default; string type = default; object writeBatchSize = default; object writeBatchTimeout = default; @@ -108,6 +120,24 @@ internal static DynamicsCrmSink DeserializeDynamicsCrmSink(JsonElement element) alternateKeyName = property.Value.GetObject(); continue; } + if (property.NameEquals("bypassBusinessLogicExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassBusinessLogicExecution = property.Value.GetObject(); + continue; + } + if (property.NameEquals("bypassPowerAutomateFlows"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassPowerAutomateFlows = property.Value.GetObject(); + continue; + } if (property.NameEquals("type"u8)) { type = property.Value.GetString(); @@ -171,7 +201,9 @@ internal static DynamicsCrmSink DeserializeDynamicsCrmSink(JsonElement element) additionalProperties, writeBehavior, ignoreNullValues, - alternateKeyName); + alternateKeyName, + bypassBusinessLogicExecution, + bypassPowerAutomateFlows); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.cs index 7933907b974c..3794c51741a9 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmSink.cs @@ -31,11 +31,15 @@ public DynamicsCrmSink(DynamicsSinkWriteBehavior writeBehavior) /// The write behavior for the operation. /// The flag indicating whether to ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - internal DynamicsCrmSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) + /// Controls the bypass of Dataverse custom business logic. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). + /// Controls the bypass of Power Automate flows. Default is false. Type: boolean (or Expression with resultType boolean). + internal DynamicsCrmSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName, object bypassBusinessLogicExecution, object bypassPowerAutomateFlows) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) { WriteBehavior = writeBehavior; IgnoreNullValues = ignoreNullValues; AlternateKeyName = alternateKeyName; + BypassBusinessLogicExecution = bypassBusinessLogicExecution; + BypassPowerAutomateFlows = bypassPowerAutomateFlows; Type = type ?? "DynamicsCrmSink"; } @@ -45,5 +49,9 @@ internal DynamicsCrmSink(string type, object writeBatchSize, object writeBatchTi public object IgnoreNullValues { get; set; } /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). public object AlternateKeyName { get; set; } + /// Controls the bypass of Dataverse custom business logic. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). + public object BypassBusinessLogicExecution { get; set; } + /// Controls the bypass of Power Automate flows. Default is false. Type: boolean (or Expression with resultType boolean). + public object BypassPowerAutomateFlows { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.Serialization.cs index 864febe97d5d..3f5593503346 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.Serialization.cs @@ -31,6 +31,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("alternateKeyName"u8); writer.WriteObjectValue(AlternateKeyName); } + if (Optional.IsDefined(BypassBusinessLogicExecution)) + { + writer.WritePropertyName("bypassBusinessLogicExecution"u8); + writer.WriteObjectValue(BypassBusinessLogicExecution); + } + if (Optional.IsDefined(BypassPowerAutomateFlows)) + { + writer.WritePropertyName("bypassPowerAutomateFlows"u8); + writer.WriteObjectValue(BypassPowerAutomateFlows); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (Optional.IsDefined(WriteBatchSize)) @@ -75,6 +85,8 @@ internal static DynamicsSink DeserializeDynamicsSink(JsonElement element) DynamicsSinkWriteBehavior writeBehavior = default; object ignoreNullValues = default; object alternateKeyName = default; + object bypassBusinessLogicExecution = default; + object bypassPowerAutomateFlows = default; string type = default; object writeBatchSize = default; object writeBatchTimeout = default; @@ -108,6 +120,24 @@ internal static DynamicsSink DeserializeDynamicsSink(JsonElement element) alternateKeyName = property.Value.GetObject(); continue; } + if (property.NameEquals("bypassBusinessLogicExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassBusinessLogicExecution = property.Value.GetObject(); + continue; + } + if (property.NameEquals("bypassPowerAutomateFlows"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassPowerAutomateFlows = property.Value.GetObject(); + continue; + } if (property.NameEquals("type"u8)) { type = property.Value.GetString(); @@ -171,7 +201,9 @@ internal static DynamicsSink DeserializeDynamicsSink(JsonElement element) additionalProperties, writeBehavior, ignoreNullValues, - alternateKeyName); + alternateKeyName, + bypassBusinessLogicExecution, + bypassPowerAutomateFlows); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.cs index ea2b928c40a9..653cf60587a9 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsSink.cs @@ -31,11 +31,15 @@ public DynamicsSink(DynamicsSinkWriteBehavior writeBehavior) /// The write behavior for the operation. /// The flag indicating whether ignore null values from input dataset (except key fields) during write operation. Default is false. Type: boolean (or Expression with resultType boolean). /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). - internal DynamicsSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) + /// Controls the bypass of Dataverse custom business logic. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). + /// Controls the bypass of Power Automate flows. Default is false. Type: boolean (or Expression with resultType boolean). + internal DynamicsSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, DynamicsSinkWriteBehavior writeBehavior, object ignoreNullValues, object alternateKeyName, object bypassBusinessLogicExecution, object bypassPowerAutomateFlows) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) { WriteBehavior = writeBehavior; IgnoreNullValues = ignoreNullValues; AlternateKeyName = alternateKeyName; + BypassBusinessLogicExecution = bypassBusinessLogicExecution; + BypassPowerAutomateFlows = bypassPowerAutomateFlows; Type = type ?? "DynamicsSink"; } @@ -45,5 +49,9 @@ internal DynamicsSink(string type, object writeBatchSize, object writeBatchTimeo public object IgnoreNullValues { get; set; } /// The logical name of the alternate key which will be used when upserting records. Type: string (or Expression with resultType string). public object AlternateKeyName { get; set; } + /// Controls the bypass of Dataverse custom business logic. Type: string (or Expression with resultType string). Type: string (or Expression with resultType string). + public object BypassBusinessLogicExecution { get; set; } + /// Controls the bypass of Power Automate flows. Default is false. Type: boolean (or Expression with resultType boolean). + public object BypassPowerAutomateFlows { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.Serialization.cs index a0c052656c11..6aba52bf7e06 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.Serialization.cs @@ -27,7 +27,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WriteObjectValue(Value); } if (Optional.IsCollectionDefined(Operators)) { @@ -59,7 +59,7 @@ internal static ExpressionV2 DeserializeExpressionV2(JsonElement element) return null; } ExpressionV2Type? type = default; - string value = default; + object value = default; IList operators = default; IList operands = default; foreach (var property in element.EnumerateObject()) @@ -75,7 +75,11 @@ internal static ExpressionV2 DeserializeExpressionV2(JsonElement element) } if (property.NameEquals("value"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetObject(); continue; } if (property.NameEquals("operators"u8)) diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.cs index a6bdc25bf8d2..90e43bc9f01b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExpressionV2.cs @@ -21,10 +21,10 @@ public ExpressionV2() /// Initializes a new instance of . /// Type of expressions supported by the system. Type: string. - /// Value for Constant/Field Type: string. + /// Value for Constant/Field Type: object. /// Expression operator value Type: list of strings. /// List of nested expressions. - internal ExpressionV2(ExpressionV2Type? type, string value, IList operators, IList operands) + internal ExpressionV2(ExpressionV2Type? type, object value, IList operators, IList operands) { Type = type; Value = value; @@ -34,8 +34,8 @@ internal ExpressionV2(ExpressionV2Type? type, string value, IList operat /// Type of expressions supported by the system. Type: string. public ExpressionV2Type? Type { get; set; } - /// Value for Constant/Field Type: string. - public string Value { get; set; } + /// Value for Constant/Field Type: object. + public object Value { get; set; } /// Expression operator value Type: list of strings. public IList Operators { get; } /// List of nested expressions. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs index 6463fdd1e38c..a468bea0b5ed 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs @@ -119,11 +119,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("commandTimeout"u8); writer.WriteObjectValue(CommandTimeout); } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - writer.WriteObjectValue(Password); - } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -156,7 +151,6 @@ internal static GreenplumLinkedService DeserializeGreenplumLinkedService(JsonEle object sslMode = default; object connectionTimeout = default; object commandTimeout = default; - SecretBase password = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -328,15 +322,6 @@ internal static GreenplumLinkedService DeserializeGreenplumLinkedService(JsonEle commandTimeout = property0.Value.GetObject(); continue; } - if (property0.NameEquals("password"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - password = SecretBase.DeserializeSecretBase(property0.Value); - continue; - } } continue; } @@ -361,8 +346,7 @@ internal static GreenplumLinkedService DeserializeGreenplumLinkedService(JsonEle database, sslMode, connectionTimeout, - commandTimeout, - password); + commandTimeout); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs index d1f7128ab23f..a7be6a6fba50 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs @@ -37,12 +37,7 @@ public GreenplumLinkedService() /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. Only used for V2. /// The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. Type: integer. Only used for V2. /// The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. Set to zero for infinity. Type: integer. Only used for V2. - /// - /// The Azure key vault secret reference of password in connection string. Type: string. Only used for V2. - /// 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 and . - /// - internal GreenplumLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential, GreenplumAuthenticationType? authenticationType, object host, object port, object username, object database, object sslMode, object connectionTimeout, object commandTimeout, SecretBase password) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal GreenplumLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential, GreenplumAuthenticationType? authenticationType, object host, object port, object username, object database, object sslMode, object connectionTimeout, object commandTimeout) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; Pwd = pwd; @@ -55,7 +50,6 @@ internal GreenplumLinkedService(string type, string version, IntegrationRuntimeR SslMode = sslMode; ConnectionTimeout = connectionTimeout; CommandTimeout = commandTimeout; - Password = password; Type = type ?? "Greenplum"; } @@ -81,11 +75,5 @@ internal GreenplumLinkedService(string type, string version, IntegrationRuntimeR public object ConnectionTimeout { get; set; } /// The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. Set to zero for infinity. Type: integer. Only used for V2. public object CommandTimeout { get; set; } - /// - /// The Azure key vault secret reference of password in connection string. Type: string. Only used for V2. - /// 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 and . - /// - public SecretBase Password { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightClusterAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightClusterAuthenticationType.cs new file mode 100644 index 000000000000..81cf49aa29fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightClusterAuthenticationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight cluster authentication type. + public readonly partial struct HDInsightClusterAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HDInsightClusterAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicAuthValue = "BasicAuth"; + private const string SystemAssignedManagedIdentityValue = "SystemAssignedManagedIdentity"; + private const string UserAssignedManagedIdentityValue = "UserAssignedManagedIdentity"; + + /// BasicAuth. + public static HDInsightClusterAuthenticationType BasicAuth { get; } = new HDInsightClusterAuthenticationType(BasicAuthValue); + /// SystemAssignedManagedIdentity. + public static HDInsightClusterAuthenticationType SystemAssignedManagedIdentity { get; } = new HDInsightClusterAuthenticationType(SystemAssignedManagedIdentityValue); + /// UserAssignedManagedIdentity. + public static HDInsightClusterAuthenticationType UserAssignedManagedIdentity { get; } = new HDInsightClusterAuthenticationType(UserAssignedManagedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(HDInsightClusterAuthenticationType left, HDInsightClusterAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HDInsightClusterAuthenticationType left, HDInsightClusterAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HDInsightClusterAuthenticationType(string value) => new HDInsightClusterAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HDInsightClusterAuthenticationType other && Equals(other); + /// + public bool Equals(HDInsightClusterAuthenticationType 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/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs index f67967acf066..6efbbd6bb5eb 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs @@ -66,6 +66,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("clusterUri"u8); writer.WriteObjectValue(ClusterUri); + if (Optional.IsDefined(ClusterAuthType)) + { + writer.WritePropertyName("clusterAuthType"u8); + writer.WriteStringValue(ClusterAuthType.Value.ToString()); + } if (Optional.IsDefined(UserName)) { writer.WritePropertyName("userName"u8); @@ -101,6 +106,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("fileSystem"u8); writer.WriteObjectValue(FileSystem); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -123,6 +133,7 @@ internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonEle IDictionary parameters = default; IList annotations = default; object clusterUri = default; + HDInsightClusterAuthenticationType? clusterAuthType = default; object userName = default; SecretBase password = default; LinkedServiceReference linkedServiceName = default; @@ -130,6 +141,7 @@ internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonEle object encryptedCredential = default; object isEspEnabled = default; object fileSystem = default; + CredentialReference credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -207,6 +219,15 @@ internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonEle clusterUri = property0.Value.GetObject(); continue; } + if (property0.NameEquals("clusterAuthType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterAuthType = new HDInsightClusterAuthenticationType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("userName"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -270,6 +291,15 @@ internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonEle fileSystem = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } @@ -285,13 +315,15 @@ internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonEle annotations ?? new ChangeTrackingList(), additionalProperties, clusterUri, + clusterAuthType, userName, password, linkedServiceName, hcatalogLinkedServiceName, encryptedCredential, isEspEnabled, - fileSystem); + fileSystem, + credential); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs index a881283926d3..6babb6e24ec6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs @@ -33,6 +33,7 @@ public HDInsightLinkedService(object clusterUri) /// List of tags that can be used for describing the linked service. /// Additional Properties. /// HDInsight cluster URI. Type: string (or Expression with resultType string). + /// HDInsight cluster authentication type. /// HDInsight cluster user name. Type: string (or Expression with resultType string). /// /// HDInsight cluster password. @@ -44,9 +45,11 @@ public HDInsightLinkedService(object clusterUri) /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). /// Specify if the HDInsight is created with ESP (Enterprise Security Package). Type: Boolean. /// Specify the FileSystem if the main storage for the HDInsight is ADLS Gen2. Type: string (or Expression with resultType string). - internal HDInsightLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clusterUri, object userName, SecretBase password, LinkedServiceReference linkedServiceName, LinkedServiceReference hcatalogLinkedServiceName, object encryptedCredential, object isEspEnabled, object fileSystem) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing MI authentication information for the HDInsight cluster. + internal HDInsightLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clusterUri, HDInsightClusterAuthenticationType? clusterAuthType, object userName, SecretBase password, LinkedServiceReference linkedServiceName, LinkedServiceReference hcatalogLinkedServiceName, object encryptedCredential, object isEspEnabled, object fileSystem, CredentialReference credential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { ClusterUri = clusterUri; + ClusterAuthType = clusterAuthType; UserName = userName; Password = password; LinkedServiceName = linkedServiceName; @@ -54,11 +57,14 @@ internal HDInsightLinkedService(string type, string version, IntegrationRuntimeR EncryptedCredential = encryptedCredential; IsEspEnabled = isEspEnabled; FileSystem = fileSystem; + Credential = credential; Type = type ?? "HDInsight"; } /// HDInsight cluster URI. Type: string (or Expression with resultType string). public object ClusterUri { get; set; } + /// HDInsight cluster authentication type. + public HDInsightClusterAuthenticationType? ClusterAuthType { get; set; } /// HDInsight cluster user name. Type: string (or Expression with resultType string). public object UserName { get; set; } /// @@ -77,5 +83,7 @@ internal HDInsightLinkedService(string type, string version, IntegrationRuntimeR public object IsEspEnabled { get; set; } /// Specify the FileSystem if the main storage for the HDInsight is ADLS Gen2. Type: string (or Expression with resultType string). public object FileSystem { get; set; } + /// The credential reference containing MI authentication information for the HDInsight cluster. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs index 3ce3645c33c5..8399e08aeb51 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs @@ -118,6 +118,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("enableSsl"u8); writer.WriteObjectValue(EnableSsl); } + if (Optional.IsDefined(EnableServerCertificateValidation)) + { + writer.WritePropertyName("enableServerCertificateValidation"u8); + writer.WriteObjectValue(EnableServerCertificateValidation); + } if (Optional.IsDefined(TrustedCertPath)) { writer.WritePropertyName("trustedCertPath"u8); @@ -176,6 +181,7 @@ internal static HiveLinkedService DeserializeHiveLinkedService(JsonElement eleme SecretBase password = default; object httpPath = default; object enableSsl = default; + object enableServerCertificateValidation = default; object trustedCertPath = default; object useSystemTrustStore = default; object allowHostNameCNMismatch = default; @@ -353,6 +359,15 @@ internal static HiveLinkedService DeserializeHiveLinkedService(JsonElement eleme enableSsl = property0.Value.GetObject(); continue; } + if (property0.NameEquals("enableServerCertificateValidation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("trustedCertPath"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -424,6 +439,7 @@ internal static HiveLinkedService DeserializeHiveLinkedService(JsonElement eleme password, httpPath, enableSsl, + enableServerCertificateValidation, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs index 31a12a96dc5e..a9b95f652089 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs @@ -50,12 +50,13 @@ public HiveLinkedService(object host, HiveAuthenticationType authenticationType) /// /// The partial URL corresponding to the Hive server. /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// Specifies whether the connections to the server will validate server certificate, the default value is True. Only used for Version 2.0. /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. /// Specifies whether to allow self-signed certificates from the server. The default value is false. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal HiveLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, HiveServerType? serverType, HiveThriftTransportProtocol? thriftTransportProtocol, HiveAuthenticationType authenticationType, object serviceDiscoveryMode, object zooKeeperNameSpace, object useNativeQuery, object username, SecretBase password, object httpPath, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal HiveLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, HiveServerType? serverType, HiveThriftTransportProtocol? thriftTransportProtocol, HiveAuthenticationType authenticationType, object serviceDiscoveryMode, object zooKeeperNameSpace, object useNativeQuery, object username, SecretBase password, object httpPath, object enableSsl, object enableServerCertificateValidation, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { Host = host; Port = port; @@ -69,6 +70,7 @@ internal HiveLinkedService(string type, string version, IntegrationRuntimeRefere Password = password; HttpPath = httpPath; EnableSsl = enableSsl; + EnableServerCertificateValidation = enableServerCertificateValidation; TrustedCertPath = trustedCertPath; UseSystemTrustStore = useSystemTrustStore; AllowHostNameCNMismatch = allowHostNameCNMismatch; @@ -105,6 +107,8 @@ internal HiveLinkedService(string type, string version, IntegrationRuntimeRefere public object HttpPath { get; set; } /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. public object EnableSsl { get; set; } + /// Specifies whether the connections to the server will validate server certificate, the default value is True. Only used for Version 2.0. + public object EnableServerCertificateValidation { get; set; } /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. public object TrustedCertPath { get; set; } /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs index 0c1ad5ee0151..50d886906506 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs @@ -83,11 +83,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("password"u8); writer.WriteObjectValue(Password); } + if (Optional.IsDefined(ThriftTransportProtocol)) + { + writer.WritePropertyName("thriftTransportProtocol"u8); + writer.WriteStringValue(ThriftTransportProtocol.Value.ToSerialString()); + } if (Optional.IsDefined(EnableSsl)) { writer.WritePropertyName("enableSsl"u8); writer.WriteObjectValue(EnableSsl); } + if (Optional.IsDefined(EnableServerCertificateValidation)) + { + writer.WritePropertyName("enableServerCertificateValidation"u8); + writer.WriteObjectValue(EnableServerCertificateValidation); + } if (Optional.IsDefined(TrustedCertPath)) { writer.WritePropertyName("trustedCertPath"u8); @@ -139,7 +149,9 @@ internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement e ImpalaAuthenticationType authenticationType = default; object username = default; SecretBase password = default; + ImpalaThriftTransportProtocol? thriftTransportProtocol = default; object enableSsl = default; + object enableServerCertificateValidation = default; object trustedCertPath = default; object useSystemTrustStore = default; object allowHostNameCNMismatch = default; @@ -254,6 +266,15 @@ internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement e password = SecretBase.DeserializeSecretBase(property0.Value); continue; } + if (property0.NameEquals("thriftTransportProtocol"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + thriftTransportProtocol = property0.Value.GetString().ToImpalaThriftTransportProtocol(); + continue; + } if (property0.NameEquals("enableSsl"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -263,6 +284,15 @@ internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement e enableSsl = property0.Value.GetObject(); continue; } + if (property0.NameEquals("enableServerCertificateValidation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("trustedCertPath"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -327,7 +357,9 @@ internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement e authenticationType, username, password, + thriftTransportProtocol, enableSsl, + enableServerCertificateValidation, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs index e28546ad9d2e..0a745fedb887 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs @@ -43,20 +43,24 @@ public ImpalaLinkedService(object host, ImpalaAuthenticationType authenticationT /// 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 and . /// + /// The transport protocol to use in the Thrift layer (for V2 only). Default value is Binary. /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// Specify whether to enable server SSL certificate validation when you connect.Always use System Trust Store (for V2 only). The default value is true. /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. /// Specifies whether to allow self-signed certificates from the server. The default value is false. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal ImpalaLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, ImpalaAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal ImpalaLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, ImpalaAuthenticationType authenticationType, object username, SecretBase password, ImpalaThriftTransportProtocol? thriftTransportProtocol, object enableSsl, object enableServerCertificateValidation, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { Host = host; Port = port; AuthenticationType = authenticationType; Username = username; Password = password; + ThriftTransportProtocol = thriftTransportProtocol; EnableSsl = enableSsl; + EnableServerCertificateValidation = enableServerCertificateValidation; TrustedCertPath = trustedCertPath; UseSystemTrustStore = useSystemTrustStore; AllowHostNameCNMismatch = allowHostNameCNMismatch; @@ -79,8 +83,12 @@ internal ImpalaLinkedService(string type, string version, IntegrationRuntimeRefe /// The available derived classes include and . /// public SecretBase Password { get; set; } + /// The transport protocol to use in the Thrift layer (for V2 only). Default value is Binary. + public ImpalaThriftTransportProtocol? ThriftTransportProtocol { get; set; } /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. public object EnableSsl { get; set; } + /// Specify whether to enable server SSL certificate validation when you connect.Always use System Trust Store (for V2 only). The default value is true. + public object EnableServerCertificateValidation { get; set; } /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. public object TrustedCertPath { get; set; } /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaThriftTransportProtocol.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaThriftTransportProtocol.Serialization.cs new file mode 100644 index 000000000000..a80893688f85 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaThriftTransportProtocol.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class ImpalaThriftTransportProtocolExtensions + { + public static string ToSerialString(this ImpalaThriftTransportProtocol value) => value switch + { + ImpalaThriftTransportProtocol.Binary => "Binary", + ImpalaThriftTransportProtocol.Http => "HTTP", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ImpalaThriftTransportProtocol value.") + }; + + public static ImpalaThriftTransportProtocol ToImpalaThriftTransportProtocol(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Binary")) return ImpalaThriftTransportProtocol.Binary; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "HTTP")) return ImpalaThriftTransportProtocol.Http; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ImpalaThriftTransportProtocol value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaThriftTransportProtocol.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaThriftTransportProtocol.cs new file mode 100644 index 000000000000..f39bf7c62432 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaThriftTransportProtocol.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The transport protocol to use in the Thrift layer (for V2 only). Default value is Binary. + public enum ImpalaThriftTransportProtocol + { + /// Binary. + Binary, + /// HTTP. + Http + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.Serialization.cs index 034acde83c58..db2d5a54d838 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.Serialization.cs @@ -74,6 +74,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("artifactId"u8); writer.WriteObjectValue(ArtifactId); } + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("authenticationType"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } if (Optional.IsDefined(ServicePrincipalId)) { writer.WritePropertyName("servicePrincipalId"u8); @@ -104,6 +109,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("servicePrincipalCredential"u8); writer.WriteObjectValue(ServicePrincipalCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -127,12 +137,14 @@ internal static LakeHouseLinkedService DeserializeLakeHouseLinkedService(JsonEle IList annotations = default; object workspaceId = default; object artifactId = default; + LakehouseAuthenticationType? authenticationType = default; object servicePrincipalId = default; SecretBase servicePrincipalKey = default; object tenant = default; string encryptedCredential = default; object servicePrincipalCredentialType = default; SecretBase servicePrincipalCredential = default; + CredentialReference credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -223,6 +235,15 @@ internal static LakeHouseLinkedService DeserializeLakeHouseLinkedService(JsonEle artifactId = property0.Value.GetObject(); continue; } + if (property0.NameEquals("authenticationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new LakehouseAuthenticationType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("servicePrincipalId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -273,6 +294,15 @@ internal static LakeHouseLinkedService DeserializeLakeHouseLinkedService(JsonEle servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } @@ -289,12 +319,14 @@ internal static LakeHouseLinkedService DeserializeLakeHouseLinkedService(JsonEle additionalProperties, workspaceId, artifactId, + authenticationType, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential, servicePrincipalCredentialType, - servicePrincipalCredential); + servicePrincipalCredential, + credential); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.cs index 29dce8f0ebd6..92e1fe3ae3b5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakeHouseLinkedService.cs @@ -28,6 +28,7 @@ public LakeHouseLinkedService() /// Additional Properties. /// The ID of Microsoft Fabric workspace. Type: string (or Expression with resultType string). /// The ID of Microsoft Fabric Lakehouse artifact. Type: string (or Expression with resultType string). + /// The authentication type to use. /// The ID of the application used to authenticate against Microsoft Fabric Lakehouse. Type: string (or Expression with resultType string). /// /// The Key of the application used to authenticate against Microsoft Fabric Lakehouse. @@ -42,16 +43,19 @@ public LakeHouseLinkedService() /// 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 and . /// - internal LakeHouseLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object workspaceId, object artifactId, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, string encryptedCredential, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal LakeHouseLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object workspaceId, object artifactId, LakehouseAuthenticationType? authenticationType, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, string encryptedCredential, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential, CredentialReference credential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { WorkspaceId = workspaceId; ArtifactId = artifactId; + AuthenticationType = authenticationType; ServicePrincipalId = servicePrincipalId; ServicePrincipalKey = servicePrincipalKey; Tenant = tenant; EncryptedCredential = encryptedCredential; ServicePrincipalCredentialType = servicePrincipalCredentialType; ServicePrincipalCredential = servicePrincipalCredential; + Credential = credential; Type = type ?? "Lakehouse"; } @@ -59,6 +63,8 @@ internal LakeHouseLinkedService(string type, string version, IntegrationRuntimeR public object WorkspaceId { get; set; } /// The ID of Microsoft Fabric Lakehouse artifact. Type: string (or Expression with resultType string). public object ArtifactId { get; set; } + /// The authentication type to use. + public LakehouseAuthenticationType? AuthenticationType { get; set; } /// The ID of the application used to authenticate against Microsoft Fabric Lakehouse. Type: string (or Expression with resultType string). public object ServicePrincipalId { get; set; } /// @@ -79,5 +85,7 @@ internal LakeHouseLinkedService(string type, string version, IntegrationRuntimeR /// The available derived classes include and . /// public SecretBase ServicePrincipalCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakehouseAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakehouseAuthenticationType.cs new file mode 100644 index 000000000000..b69b647fc153 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LakehouseAuthenticationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to use. + public readonly partial struct LakehouseAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LakehouseAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServicePrincipalValue = "ServicePrincipal"; + private const string SystemAssignedManagedIdentityValue = "SystemAssignedManagedIdentity"; + private const string UserAssignedManagedIdentityValue = "UserAssignedManagedIdentity"; + + /// ServicePrincipal. + public static LakehouseAuthenticationType ServicePrincipal { get; } = new LakehouseAuthenticationType(ServicePrincipalValue); + /// SystemAssignedManagedIdentity. + public static LakehouseAuthenticationType SystemAssignedManagedIdentity { get; } = new LakehouseAuthenticationType(SystemAssignedManagedIdentityValue); + /// UserAssignedManagedIdentity. + public static LakehouseAuthenticationType UserAssignedManagedIdentity { get; } = new LakehouseAuthenticationType(UserAssignedManagedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(LakehouseAuthenticationType left, LakehouseAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LakehouseAuthenticationType left, LakehouseAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LakehouseAuthenticationType(string value) => new LakehouseAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LakehouseAuthenticationType other && Equals(other); + /// + public bool Equals(LakehouseAuthenticationType 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/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs index 297211a46fa1..0ac85ce69550 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs @@ -179,6 +179,7 @@ internal static LinkedService DeserializeLinkedService(JsonElement element) case "SapOpenHub": return SapOpenHubLinkedService.DeserializeSapOpenHubLinkedService(element); case "SapTable": return SapTableLinkedService.DeserializeSapTableLinkedService(element); case "ServiceNow": return ServiceNowLinkedService.DeserializeServiceNowLinkedService(element); + case "ServiceNowV2": return ServiceNowV2LinkedService.DeserializeServiceNowV2LinkedService(element); case "Sftp": return SftpServerLinkedService.DeserializeSftpServerLinkedService(element); case "SharePointOnlineList": return SharePointOnlineListLinkedService.DeserializeSharePointOnlineListLinkedService(element); case "Shopify": return ShopifyLinkedService.DeserializeShopifyLinkedService(element); diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs index 84b7298b74f4..c22f52a4fea7 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs @@ -12,7 +12,7 @@ namespace Azure.Analytics.Synapse.Artifacts.Models /// /// The Azure Synapse nested object which contains the information and credential which can be used to connect with related store or compute 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// public abstract partial class LinkedService { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs index 5aea3beb17ef..a357fbcf5c3a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs @@ -16,7 +16,7 @@ public partial class LinkedServiceDebugResource : SubResourceDebugResource /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// /// is null. public LinkedServiceDebugResource(LinkedService properties) @@ -31,7 +31,7 @@ public LinkedServiceDebugResource(LinkedService properties) /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// internal LinkedServiceDebugResource(string name, LinkedService properties) : base(name) { @@ -41,7 +41,7 @@ internal LinkedServiceDebugResource(string name, LinkedService properties) : bas /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// public LinkedService Properties { get; set; } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs index 8210abc4eb15..c827d9b8783e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs @@ -16,7 +16,7 @@ public partial class LinkedServiceResource : SubResource /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// /// is null. public LinkedServiceResource(LinkedService properties) @@ -34,7 +34,7 @@ public LinkedServiceResource(LinkedService properties) /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// internal LinkedServiceResource(string id, string name, string type, string etag, LinkedService properties) : base(id, name, type, etag) { @@ -44,7 +44,7 @@ internal LinkedServiceResource(string id, string name, string type, string etag, /// /// Properties of linked service. /// 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 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// public LinkedService Properties { get; set; } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs index cfad393bc56c..fa0537590e18 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs @@ -72,6 +72,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(ServicePrincipalId); writer.WritePropertyName("servicePrincipalKey"u8); writer.WriteObjectValue(ServicePrincipalKey); + if (Optional.IsDefined(ServicePrincipalCredentialType)) + { + writer.WritePropertyName("servicePrincipalCredentialType"u8); + writer.WriteObjectValue(ServicePrincipalCredentialType); + } + if (Optional.IsDefined(ServicePrincipalEmbeddedCert)) + { + writer.WritePropertyName("servicePrincipalEmbeddedCert"u8); + writer.WriteObjectValue(ServicePrincipalEmbeddedCert); + } + if (Optional.IsDefined(ServicePrincipalEmbeddedCertPassword)) + { + writer.WritePropertyName("servicePrincipalEmbeddedCertPassword"u8); + writer.WriteObjectValue(ServicePrincipalEmbeddedCertPassword); + } if (Optional.IsDefined(EncryptedCredential)) { writer.WritePropertyName("encryptedCredential"u8); @@ -102,6 +117,9 @@ internal static Office365LinkedService DeserializeOffice365LinkedService(JsonEle object servicePrincipalTenantId = default; object servicePrincipalId = default; SecretBase servicePrincipalKey = default; + object servicePrincipalCredentialType = default; + SecretBase servicePrincipalEmbeddedCert = default; + SecretBase servicePrincipalEmbeddedCertPassword = default; object encryptedCredential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -195,6 +213,33 @@ internal static Office365LinkedService DeserializeOffice365LinkedService(JsonEle servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); continue; } + if (property0.NameEquals("servicePrincipalCredentialType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredentialType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalEmbeddedCert"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalEmbeddedCert = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalEmbeddedCertPassword"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalEmbeddedCertPassword = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } if (property0.NameEquals("encryptedCredential"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -222,6 +267,9 @@ internal static Office365LinkedService DeserializeOffice365LinkedService(JsonEle servicePrincipalTenantId, servicePrincipalId, servicePrincipalKey, + servicePrincipalCredentialType, + servicePrincipalEmbeddedCert, + servicePrincipalEmbeddedCertPassword, encryptedCredential); } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs index 40c75324aea1..6d022478e0bc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs @@ -53,13 +53,27 @@ public Office365LinkedService(object office365TenantId, object servicePrincipalT /// 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 and . /// + /// The service principal credential type for authentication.'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. If not specified, 'ServicePrincipalKey' is in use. Type: string (or Expression with resultType string). + /// + /// Specify the base64 encoded certificate of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + /// 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 and . + /// + /// + /// Specify the password of your certificate if your certificate has a password and you are using AadServicePrincipal authentication. Type: string (or Expression with resultType string). + /// 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 and . + /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal Office365LinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, SecretBase servicePrincipalKey, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal Office365LinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, SecretBase servicePrincipalKey, object servicePrincipalCredentialType, SecretBase servicePrincipalEmbeddedCert, SecretBase servicePrincipalEmbeddedCertPassword, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { Office365TenantId = office365TenantId; ServicePrincipalTenantId = servicePrincipalTenantId; ServicePrincipalId = servicePrincipalId; ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalEmbeddedCert = servicePrincipalEmbeddedCert; + ServicePrincipalEmbeddedCertPassword = servicePrincipalEmbeddedCertPassword; EncryptedCredential = encryptedCredential; Type = type ?? "Office365"; } @@ -76,6 +90,20 @@ internal Office365LinkedService(string type, string version, IntegrationRuntimeR /// The available derived classes include and . /// public SecretBase ServicePrincipalKey { get; set; } + /// The service principal credential type for authentication.'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. If not specified, 'ServicePrincipalKey' is in use. Type: string (or Expression with resultType string). + public object ServicePrincipalCredentialType { get; set; } + /// + /// Specify the base64 encoded certificate of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + /// 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 and . + /// + public SecretBase ServicePrincipalEmbeddedCert { get; set; } + /// + /// Specify the password of your certificate if your certificate has a password and you are using AadServicePrincipal authentication. Type: string (or Expression with resultType string). + /// 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 and . + /// + public SecretBase ServicePrincipalEmbeddedCertPassword { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs index e59afc877e7d..461688b89637 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs @@ -64,8 +64,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("typeProperties"u8); writer.WriteStartObject(); - writer.WritePropertyName("connectionString"u8); - writer.WriteObjectValue(ConnectionString); + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteObjectValue(ConnectionString); + } if (Optional.IsDefined(Server)) { writer.WritePropertyName("server"u8); @@ -258,6 +261,10 @@ internal static OracleLinkedService DeserializeOracleLinkedService(JsonElement e { if (property0.NameEquals("connectionString"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } connectionString = property0.Value.GetObject(); continue; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs index da55d040f439..6f14d20626c9 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs @@ -5,7 +5,6 @@ #nullable disable -using System; using System.Collections.Generic; namespace Azure.Analytics.Synapse.Artifacts.Models @@ -14,13 +13,8 @@ namespace Azure.Analytics.Synapse.Artifacts.Models public partial class OracleLinkedService : LinkedService { /// Initializes a new instance of . - /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Only used for Version 1.0. - /// is null. - public OracleLinkedService(object connectionString) + public OracleLinkedService() { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; Type = "Oracle"; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.Serialization.cs index c668b608ceac..383cc7b328a3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.Serialization.cs @@ -44,6 +44,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("additionalColumns"u8); writer.WriteObjectValue(AdditionalColumns); } + if (Optional.IsDefined(NumberPrecision)) + { + writer.WritePropertyName("numberPrecision"u8); + writer.WriteObjectValue(NumberPrecision); + } + if (Optional.IsDefined(NumberScale)) + { + writer.WritePropertyName("numberScale"u8); + writer.WriteObjectValue(NumberScale); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(Type); if (Optional.IsDefined(SourceRetryCount)) @@ -80,6 +90,8 @@ internal static OracleSource DeserializeOracleSource(JsonElement element) OraclePartitionOption? partitionOption = default; OraclePartitionSettings partitionSettings = default; object additionalColumns = default; + object numberPrecision = default; + object numberScale = default; string type = default; object sourceRetryCount = default; object sourceRetryWait = default; @@ -133,6 +145,24 @@ internal static OracleSource DeserializeOracleSource(JsonElement element) additionalColumns = property.Value.GetObject(); continue; } + if (property.NameEquals("numberPrecision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberPrecision = property.Value.GetObject(); + continue; + } + if (property.NameEquals("numberScale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberScale = property.Value.GetObject(); + continue; + } if (property.NameEquals("type"u8)) { type = property.Value.GetString(); @@ -178,7 +208,9 @@ internal static OracleSource DeserializeOracleSource(JsonElement element) queryTimeout, partitionOption, partitionSettings, - additionalColumns); + additionalColumns, + numberPrecision, + numberScale); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.cs index 7d68ff4be2f0..9a23797d2fdc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleSource.cs @@ -29,13 +29,17 @@ public OracleSource() /// The partition mechanism that will be used for Oracle read in parallel. /// The settings that will be leveraged for Oracle source partitioning. /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal OracleSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object oracleReaderQuery, object queryTimeout, OraclePartitionOption? partitionOption, OraclePartitionSettings partitionSettings, object additionalColumns) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) + /// The decimal precision used to represent Oracle NUMBER type without precision and scale. The range is 1 to 256 and default value is 256 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + /// The decimal scale used to represent Oracle NUMBER type without precision and scale. The range is 0 to 130 and default value is 130 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + internal OracleSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object oracleReaderQuery, object queryTimeout, OraclePartitionOption? partitionOption, OraclePartitionSettings partitionSettings, object additionalColumns, object numberPrecision, object numberScale) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) { OracleReaderQuery = oracleReaderQuery; QueryTimeout = queryTimeout; PartitionOption = partitionOption; PartitionSettings = partitionSettings; AdditionalColumns = additionalColumns; + NumberPrecision = numberPrecision; + NumberScale = numberScale; Type = type ?? "OracleSource"; } @@ -49,5 +53,9 @@ internal OracleSource(string type, object sourceRetryCount, object sourceRetryWa public OraclePartitionSettings PartitionSettings { get; set; } /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). public object AdditionalColumns { get; set; } + /// The decimal precision used to represent Oracle NUMBER type without precision and scale. The range is 1 to 256 and default value is 256 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + public object NumberPrecision { get; set; } + /// The decimal scale used to represent Oracle NUMBER type without precision and scale. The range is 0 to 130 and default value is 130 if not specified. Type: integer (or Expression with resultType integer). Only used for Version 2.0. + public object NumberScale { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs index f827873022ad..c71d87bfcc90 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs @@ -66,8 +66,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("host"u8); writer.WriteObjectValue(Host); - writer.WritePropertyName("serverVersion"u8); - writer.WriteObjectValue(ServerVersion); + if (Optional.IsDefined(ServerVersion)) + { + writer.WritePropertyName("serverVersion"u8); + writer.WriteObjectValue(ServerVersion); + } writer.WritePropertyName("catalog"u8); writer.WriteObjectValue(Catalog); if (Optional.IsDefined(Port)) @@ -92,6 +95,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("enableSsl"u8); writer.WriteObjectValue(EnableSsl); } + if (Optional.IsDefined(EnableServerCertificateValidation)) + { + writer.WritePropertyName("enableServerCertificateValidation"u8); + writer.WriteObjectValue(EnableServerCertificateValidation); + } if (Optional.IsDefined(TrustedCertPath)) { writer.WritePropertyName("trustedCertPath"u8); @@ -151,6 +159,7 @@ internal static PrestoLinkedService DeserializePrestoLinkedService(JsonElement e object username = default; SecretBase password = default; object enableSsl = default; + object enableServerCertificateValidation = default; object trustedCertPath = default; object useSystemTrustStore = default; object allowHostNameCNMismatch = default; @@ -236,6 +245,10 @@ internal static PrestoLinkedService DeserializePrestoLinkedService(JsonElement e } if (property0.NameEquals("serverVersion"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } serverVersion = property0.Value.GetObject(); continue; } @@ -285,6 +298,15 @@ internal static PrestoLinkedService DeserializePrestoLinkedService(JsonElement e enableSsl = property0.Value.GetObject(); continue; } + if (property0.NameEquals("enableServerCertificateValidation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("trustedCertPath"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -361,6 +383,7 @@ internal static PrestoLinkedService DeserializePrestoLinkedService(JsonElement e username, password, enableSsl, + enableServerCertificateValidation, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs index 906dc5095de3..c225aa08b704 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs @@ -10,23 +10,20 @@ namespace Azure.Analytics.Synapse.Artifacts.Models { - /// Presto server linked service. + /// Presto server linked service. This linked service has supported version property. The Version 1.0 is scheduled for deprecation while your pipeline will continue to run after EOL but without any bug fix or new features. public partial class PrestoLinkedService : LinkedService { /// Initializes a new instance of . /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). - /// The version of the Presto server. (i.e. 0.148-t). /// The catalog context for all request against the server. /// The authentication mechanism used to connect to the Presto server. - /// , or is null. - public PrestoLinkedService(object host, object serverVersion, object catalog, PrestoAuthenticationType authenticationType) + /// or is null. + public PrestoLinkedService(object host, object catalog, PrestoAuthenticationType authenticationType) { Argument.AssertNotNull(host, nameof(host)); - Argument.AssertNotNull(serverVersion, nameof(serverVersion)); Argument.AssertNotNull(catalog, nameof(catalog)); Host = host; - ServerVersion = serverVersion; Catalog = catalog; AuthenticationType = authenticationType; Type = "Presto"; @@ -41,9 +38,9 @@ public PrestoLinkedService(object host, object serverVersion, object catalog, Pr /// List of tags that can be used for describing the linked service. /// Additional Properties. /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). - /// The version of the Presto server. (i.e. 0.148-t). + /// The version of the Presto server. (i.e. 0.148-t) Only used for Version 1.0. /// The catalog context for all request against the server. - /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080. + /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080 when disable SSL, default value is 443 when enable SSL. /// The authentication mechanism used to connect to the Presto server. /// The user name used to connect to the Presto server. /// @@ -51,14 +48,15 @@ public PrestoLinkedService(object host, object serverVersion, object catalog, Pr /// 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 and . /// - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. - /// Specifies whether to allow self-signed certificates from the server. The default value is false. - /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value is the system time zone. + /// Specifies whether the connections to the server are encrypted using SSL. The default value for legacy version is False. The default value for version 2.0 is True. + /// Specifies whether the connections to the server will validate server certificate, the default value is True. Only used for Version 2.0. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. Only used for Version 1.0. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. Only used for Version 1.0. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. Only used for Version 1.0. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. Only used for Version 1.0. + /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value for Version 1.0 is the client system time zone. The default value for Version 2.0 is server system timeZone. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal PrestoLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object serverVersion, object catalog, object port, PrestoAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object timeZoneID, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal PrestoLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object serverVersion, object catalog, object port, PrestoAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object enableServerCertificateValidation, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object timeZoneID, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { Host = host; ServerVersion = serverVersion; @@ -68,6 +66,7 @@ internal PrestoLinkedService(string type, string version, IntegrationRuntimeRefe Username = username; Password = password; EnableSsl = enableSsl; + EnableServerCertificateValidation = enableServerCertificateValidation; TrustedCertPath = trustedCertPath; UseSystemTrustStore = useSystemTrustStore; AllowHostNameCNMismatch = allowHostNameCNMismatch; @@ -79,11 +78,11 @@ internal PrestoLinkedService(string type, string version, IntegrationRuntimeRefe /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). public object Host { get; set; } - /// The version of the Presto server. (i.e. 0.148-t). + /// The version of the Presto server. (i.e. 0.148-t) Only used for Version 1.0. public object ServerVersion { get; set; } /// The catalog context for all request against the server. public object Catalog { get; set; } - /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080. + /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080 when disable SSL, default value is 443 when enable SSL. public object Port { get; set; } /// The authentication mechanism used to connect to the Presto server. public PrestoAuthenticationType AuthenticationType { get; set; } @@ -95,17 +94,19 @@ internal PrestoLinkedService(string type, string version, IntegrationRuntimeRefe /// The available derived classes include and . /// public SecretBase Password { get; set; } - /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// Specifies whether the connections to the server are encrypted using SSL. The default value for legacy version is False. The default value for version 2.0 is True. public object EnableSsl { get; set; } - /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether the connections to the server will validate server certificate, the default value is True. Only used for Version 2.0. + public object EnableServerCertificateValidation { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. Only used for Version 1.0. public object TrustedCertPath { get; set; } - /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. Only used for Version 1.0. public object UseSystemTrustStore { get; set; } - /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. Only used for Version 1.0. public object AllowHostNameCNMismatch { get; set; } - /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. Only used for Version 1.0. public object AllowSelfSignedServerCert { get; set; } - /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value is the system time zone. + /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value for Version 1.0 is the client system time zone. The default value for Version 2.0 is server system timeZone. public object TimeZoneID { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs index b95843b238da..0619f35a7e99 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs @@ -77,10 +77,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(ConsumerKey); writer.WritePropertyName("consumerSecret"u8); writer.WriteObjectValue(ConsumerSecret); - writer.WritePropertyName("accessToken"u8); - writer.WriteObjectValue(AccessToken); - writer.WritePropertyName("accessTokenSecret"u8); - writer.WriteObjectValue(AccessTokenSecret); + if (Optional.IsDefined(AccessToken)) + { + writer.WritePropertyName("accessToken"u8); + writer.WriteObjectValue(AccessToken); + } + if (Optional.IsDefined(AccessTokenSecret)) + { + writer.WritePropertyName("accessTokenSecret"u8); + writer.WriteObjectValue(AccessTokenSecret); + } + if (Optional.IsDefined(RefreshToken)) + { + writer.WritePropertyName("refreshToken"u8); + writer.WriteObjectValue(RefreshToken); + } if (Optional.IsDefined(UseEncryptedEndpoints)) { writer.WritePropertyName("useEncryptedEndpoints"u8); @@ -119,6 +130,7 @@ internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonE SecretBase consumerSecret = default; SecretBase accessToken = default; SecretBase accessTokenSecret = default; + SecretBase refreshToken = default; object useEncryptedEndpoints = default; object encryptedCredential = default; IDictionary additionalProperties = default; @@ -224,14 +236,31 @@ internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonE } if (property0.NameEquals("accessToken"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } accessToken = SecretBase.DeserializeSecretBase(property0.Value); continue; } if (property0.NameEquals("accessTokenSecret"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } accessTokenSecret = SecretBase.DeserializeSecretBase(property0.Value); continue; } + if (property0.NameEquals("refreshToken"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } if (property0.NameEquals("useEncryptedEndpoints"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -271,6 +300,7 @@ internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonE consumerSecret, accessToken, accessTokenSecret, + refreshToken, useEncryptedEndpoints, encryptedCredential); } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs index 9668672bb03b..ab4cd35391fa 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs @@ -10,44 +10,30 @@ namespace Azure.Analytics.Synapse.Artifacts.Models { - /// QuickBooks server linked service. + /// QuickBooks server linked service. This linked service has supported version property. The Version 1.0 is scheduled for deprecation while your pipeline will continue to run after EOL but without any bug fix or new features. public partial class QuickBooksLinkedService : LinkedService { /// Initializes a new instance of . /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). /// The company ID of the QuickBooks company to authorize. - /// The consumer key for OAuth 1.0 authentication. + /// The consumer key for OAuth 2.0 authentication. /// - /// The consumer secret for OAuth 1.0 authentication. + /// The consumer secret for OAuth 2.0 authentication. /// 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 and . /// - /// - /// The access token for OAuth 1.0 authentication. - /// 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 and . - /// - /// - /// The access token secret for OAuth 1.0 authentication. - /// 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 and . - /// - /// , , , , or is null. - public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, SecretBase consumerSecret, SecretBase accessToken, SecretBase accessTokenSecret) + /// , , or is null. + public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, SecretBase consumerSecret) { Argument.AssertNotNull(endpoint, nameof(endpoint)); Argument.AssertNotNull(companyId, nameof(companyId)); Argument.AssertNotNull(consumerKey, nameof(consumerKey)); Argument.AssertNotNull(consumerSecret, nameof(consumerSecret)); - Argument.AssertNotNull(accessToken, nameof(accessToken)); - Argument.AssertNotNull(accessTokenSecret, nameof(accessTokenSecret)); Endpoint = endpoint; CompanyId = companyId; ConsumerKey = consumerKey; ConsumerSecret = consumerSecret; - AccessToken = accessToken; - AccessTokenSecret = accessTokenSecret; Type = "QuickBooks"; } @@ -62,25 +48,30 @@ public QuickBooksLinkedService(object endpoint, object companyId, object consume /// Properties used to connect to QuickBooks. It is mutually exclusive with any other properties in the linked service. Type: object. /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). /// The company ID of the QuickBooks company to authorize. - /// The consumer key for OAuth 1.0 authentication. + /// The consumer key for OAuth 2.0 authentication. /// - /// The consumer secret for OAuth 1.0 authentication. + /// The consumer secret for OAuth 2.0 authentication. /// 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 and . /// /// - /// The access token for OAuth 1.0 authentication. + /// The access token for OAuth 2.0 authentication. /// 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 and . /// /// - /// The access token secret for OAuth 1.0 authentication. + /// The access token secret is deprecated for OAuth 1.0 authentication. Only used for version 1.0. + /// 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 and . + /// + /// + /// The refresh token for OAuth 2.0 authentication. /// 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 and . /// /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal QuickBooksLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionProperties, object endpoint, object companyId, object consumerKey, SecretBase consumerSecret, SecretBase accessToken, SecretBase accessTokenSecret, object useEncryptedEndpoints, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal QuickBooksLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionProperties, object endpoint, object companyId, object consumerKey, SecretBase consumerSecret, SecretBase accessToken, SecretBase accessTokenSecret, SecretBase refreshToken, object useEncryptedEndpoints, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { ConnectionProperties = connectionProperties; Endpoint = endpoint; @@ -89,6 +80,7 @@ internal QuickBooksLinkedService(string type, string version, IntegrationRuntime ConsumerSecret = consumerSecret; AccessToken = accessToken; AccessTokenSecret = accessTokenSecret; + RefreshToken = refreshToken; UseEncryptedEndpoints = useEncryptedEndpoints; EncryptedCredential = encryptedCredential; Type = type ?? "QuickBooks"; @@ -100,26 +92,32 @@ internal QuickBooksLinkedService(string type, string version, IntegrationRuntime public object Endpoint { get; set; } /// The company ID of the QuickBooks company to authorize. public object CompanyId { get; set; } - /// The consumer key for OAuth 1.0 authentication. + /// The consumer key for OAuth 2.0 authentication. public object ConsumerKey { get; set; } /// - /// The consumer secret for OAuth 1.0 authentication. + /// The consumer secret for OAuth 2.0 authentication. /// 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 and . /// public SecretBase ConsumerSecret { get; set; } /// - /// The access token for OAuth 1.0 authentication. + /// The access token for OAuth 2.0 authentication. /// 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 and . /// public SecretBase AccessToken { get; set; } /// - /// The access token secret for OAuth 1.0 authentication. + /// The access token secret is deprecated for OAuth 1.0 authentication. Only used for version 1.0. /// 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 and . /// public SecretBase AccessTokenSecret { get; set; } + /// + /// The refresh token for OAuth 2.0 authentication. + /// 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 and . + /// + public SecretBase RefreshToken { get; set; } /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. public object UseEncryptedEndpoints { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2AuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2AuthenticationType.cs index a9ed3e305805..2e0fe99ace7d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2AuthenticationType.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2AuthenticationType.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Synapse.Artifacts.Models { /// The authentication type to use. - internal readonly partial struct ServiceNowV2AuthenticationType : IEquatable + public readonly partial struct ServiceNowV2AuthenticationType : IEquatable { private readonly string _value; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedService.Serialization.cs new file mode 100644 index 000000000000..2b96bfb6322f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedService.Serialization.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(ServiceNowV2LinkedServiceConverter))] + public partial class ServiceNowV2LinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(ConnectVia)) + { + writer.WritePropertyName("connectVia"u8); + writer.WriteObjectValue(ConnectVia); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Annotations)) + { + writer.WritePropertyName("annotations"u8); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"u8); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("authenticationType"u8); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteObjectValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteObjectValue(Password); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteObjectValue(ClientId); + } + if (Optional.IsDefined(ClientSecret)) + { + writer.WritePropertyName("clientSecret"u8); + writer.WriteObjectValue(ClientSecret); + } + if (Optional.IsDefined(GrantType)) + { + writer.WritePropertyName("grantType"u8); + writer.WriteObjectValue(GrantType); + } + if (Optional.IsDefined(EncryptedCredential)) + { + writer.WritePropertyName("encryptedCredential"u8); + writer.WriteStringValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ServiceNowV2LinkedService DeserializeServiceNowV2LinkedService(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = default; + string version = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + ServiceNowV2AuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object clientId = default; + SecretBase clientSecret = default; + object grantType = default; + string encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint"u8)) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType"u8)) + { + authenticationType = new ServiceNowV2AuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("clientId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("grantType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + grantType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential"u8)) + { + encryptedCredential = property0.Value.GetString(); + continue; + } + } + continue; + } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + additionalProperties = additionalPropertiesDictionary; + return new ServiceNowV2LinkedService( + type, + version, + connectVia, + description, + parameters ?? new ChangeTrackingDictionary(), + annotations ?? new ChangeTrackingList(), + additionalProperties, + endpoint, + authenticationType, + username, + password, + clientId, + clientSecret, + grantType, + encryptedCredential); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ServiceNowV2LinkedService FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceNowV2LinkedService(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + + internal partial class ServiceNowV2LinkedServiceConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ServiceNowV2LinkedService model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + + public override ServiceNowV2LinkedService Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceNowV2LinkedService(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedService.cs new file mode 100644 index 000000000000..9b672ab38386 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedService.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// ServiceNowV2 server linked service. + public partial class ServiceNowV2LinkedService : LinkedService + { + /// Initializes a new instance of . + /// The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com). + /// The authentication type to use. + /// is null. + public ServiceNowV2LinkedService(object endpoint, ServiceNowV2AuthenticationType authenticationType) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + + Endpoint = endpoint; + AuthenticationType = authenticationType; + Type = "ServiceNowV2"; + } + + /// Initializes a new instance of . + /// Type of linked service. + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// Additional Properties. + /// The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com). + /// The authentication type to use. + /// The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication. + /// + /// The password corresponding to the user name for Basic and OAuth2 authentication. + /// 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 and . + /// + /// The client id for OAuth2 authentication. + /// + /// The client secret for OAuth2 authentication. + /// 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 and . + /// + /// GrantType for OAuth2 authentication. Default value is password. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. + internal ServiceNowV2LinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, ServiceNowV2AuthenticationType authenticationType, object username, SecretBase password, object clientId, SecretBase clientSecret, object grantType, string encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ClientId = clientId; + ClientSecret = clientSecret; + GrantType = grantType; + EncryptedCredential = encryptedCredential; + Type = type ?? "ServiceNowV2"; + } + + /// The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com). + public object Endpoint { get; set; } + /// The authentication type to use. + public ServiceNowV2AuthenticationType AuthenticationType { get; set; } + /// The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication. + public object Username { get; set; } + /// + /// The password corresponding to the user name for Basic and OAuth2 authentication. + /// 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 and . + /// + public SecretBase Password { get; set; } + /// The client id for OAuth2 authentication. + public object ClientId { get; set; } + /// + /// The client secret for OAuth2 authentication. + /// 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 and . + /// + public SecretBase ClientSecret { get; set; } + /// GrantType for OAuth2 authentication. Default value is password. + public object GrantType { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. + public string EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedServiceTypeProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedServiceTypeProperties.cs deleted file mode 100644 index 2acf533ea2b0..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2LinkedServiceTypeProperties.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// ServiceNowV2 server linked service properties. - internal partial class ServiceNowV2LinkedServiceTypeProperties - { - /// Initializes a new instance of . - /// The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com). - /// The authentication type to use. - /// is null. - internal ServiceNowV2LinkedServiceTypeProperties(object endpoint, ServiceNowV2AuthenticationType authenticationType) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - - Endpoint = endpoint; - AuthenticationType = authenticationType; - } - - /// Initializes a new instance of . - /// The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com). - /// The authentication type to use. - /// The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication. - /// - /// The password corresponding to the user name for Basic and OAuth2 authentication. - /// 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 and . - /// - /// The client id for OAuth2 authentication. - /// - /// The client secret for OAuth2 authentication. - /// 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 and . - /// - /// GrantType for OAuth2 authentication. Default value is password. - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal ServiceNowV2LinkedServiceTypeProperties(object endpoint, ServiceNowV2AuthenticationType authenticationType, object username, SecretBase password, object clientId, SecretBase clientSecret, object grantType, string encryptedCredential) - { - Endpoint = endpoint; - AuthenticationType = authenticationType; - Username = username; - Password = password; - ClientId = clientId; - ClientSecret = clientSecret; - GrantType = grantType; - EncryptedCredential = encryptedCredential; - } - - /// The endpoint of the ServiceNowV2 server. (i.e. <instance>.service-now.com). - public object Endpoint { get; } - /// The authentication type to use. - public ServiceNowV2AuthenticationType AuthenticationType { get; } - /// The user name used to connect to the ServiceNowV2 server for Basic and OAuth2 authentication. - public object Username { get; } - /// - /// The password corresponding to the user name for Basic and OAuth2 authentication. - /// 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 and . - /// - public SecretBase Password { get; } - /// The client id for OAuth2 authentication. - public object ClientId { get; } - /// - /// The client secret for OAuth2 authentication. - /// 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 and . - /// - public SecretBase ClientSecret { get; } - /// GrantType for OAuth2 authentication. Default value is password. - public object GrantType { get; } - /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - public string EncryptedCredential { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.Serialization.cs index 2b6e9c235f3e..64586161e986 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.Serialization.cs @@ -76,6 +76,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tableName"u8); writer.WriteObjectValue(TableName); } + if (Optional.IsDefined(ValueType)) + { + writer.WritePropertyName("valueType"u8); + writer.WriteStringValue(ValueType.Value.ToString()); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -100,6 +105,7 @@ internal static ServiceNowV2ObjectDataset DeserializeServiceNowV2ObjectDataset(J IList annotations = default; DatasetFolder folder = default; object tableName = default; + ValueType? valueType = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -199,6 +205,15 @@ internal static ServiceNowV2ObjectDataset DeserializeServiceNowV2ObjectDataset(J tableName = property0.Value.GetObject(); continue; } + if (property0.NameEquals("valueType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueType = new ValueType(property0.Value.GetString()); + continue; + } } continue; } @@ -215,7 +230,8 @@ internal static ServiceNowV2ObjectDataset DeserializeServiceNowV2ObjectDataset(J annotations ?? new ChangeTrackingList(), folder, additionalProperties, - tableName); + tableName, + valueType); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.cs index 7cf0adf9ac5e..99e1da4aea66 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowV2ObjectDataset.cs @@ -34,13 +34,17 @@ public ServiceNowV2ObjectDataset(LinkedServiceReference linkedServiceName) : bas /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. /// Additional Properties. /// The table name. Type: string (or Expression with resultType string). - internal ServiceNowV2ObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + /// Type of value copied from source. + internal ServiceNowV2ObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, ValueType? valueType) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) { TableName = tableName; + ValueType = valueType; Type = type ?? "ServiceNowV2Object"; } /// The table name. Type: string (or Expression with resultType string). public object TableName { get; set; } + /// Type of value copied from source. + public ValueType? ValueType { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs index 164387fc93de..cde660170cfe 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.Serialization.cs @@ -105,11 +105,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("scope"u8); writer.WriteObjectValue(Scope); } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteObjectValue(Role); + } if (Optional.IsDefined(Host)) { writer.WritePropertyName("host"u8); writer.WriteObjectValue(Host); } + if (Optional.IsDefined(Schema)) + { + writer.WritePropertyName("schema"u8); + writer.WriteObjectValue(Schema); + } if (Optional.IsDefined(PrivateKey)) { writer.WritePropertyName("privateKey"u8); @@ -156,7 +166,9 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso SecretBase clientSecret = default; object tenantId = default; object scope = default; + object role = default; object host = default; + object schema = default; SecretBase privateKey = default; SecretBase privateKeyPassphrase = default; string encryptedCredential = default; @@ -310,6 +322,15 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso scope = property0.Value.GetObject(); continue; } + if (property0.NameEquals("role"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("host"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -319,6 +340,15 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso host = property0.Value.GetObject(); continue; } + if (property0.NameEquals("schema"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("privateKey"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -366,7 +396,9 @@ internal static SnowflakeV2LinkedService DeserializeSnowflakeV2LinkedService(Jso clientSecret, tenantId, scope, + role, host, + schema, privateKey, privateKeyPassphrase, encryptedCredential); diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.cs index f91f1a9d4306..3688a34acd7f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SnowflakeV2LinkedService.cs @@ -56,7 +56,9 @@ public SnowflakeV2LinkedService(object accountIdentifier, object database, objec /// /// The tenant ID of the application registered in Azure Active Directory for AADServicePrincipal authentication. /// The scope of the application registered in Azure Active Directory for AADServicePrincipal authentication. - /// The host name of the Snowflake account. + /// The default access control role to use in the Snowflake session. Type: string (or Expression with resultType string). + /// The host name of the Snowflake account. Type: string (or Expression with resultType string). + /// Schema name for connection. Type: string (or Expression with resultType string). /// /// The Azure key vault secret reference of privateKey for KeyPair auth. /// 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. @@ -68,7 +70,7 @@ public SnowflakeV2LinkedService(object accountIdentifier, object database, objec /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal SnowflakeV2LinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accountIdentifier, object user, SecretBase password, object database, object warehouse, SnowflakeAuthenticationType? authenticationType, object clientId, SecretBase clientSecret, object tenantId, object scope, object host, SecretBase privateKey, SecretBase privateKeyPassphrase, string encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal SnowflakeV2LinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accountIdentifier, object user, SecretBase password, object database, object warehouse, SnowflakeAuthenticationType? authenticationType, object clientId, SecretBase clientSecret, object tenantId, object scope, object role, object host, object schema, SecretBase privateKey, SecretBase privateKeyPassphrase, string encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { AccountIdentifier = accountIdentifier; User = user; @@ -80,7 +82,9 @@ internal SnowflakeV2LinkedService(string type, string version, IntegrationRuntim ClientSecret = clientSecret; TenantId = tenantId; Scope = scope; + Role = role; Host = host; + Schema = schema; PrivateKey = privateKey; PrivateKeyPassphrase = privateKeyPassphrase; EncryptedCredential = encryptedCredential; @@ -115,8 +119,12 @@ internal SnowflakeV2LinkedService(string type, string version, IntegrationRuntim public object TenantId { get; set; } /// The scope of the application registered in Azure Active Directory for AADServicePrincipal authentication. public object Scope { get; set; } - /// The host name of the Snowflake account. + /// The default access control role to use in the Snowflake session. Type: string (or Expression with resultType string). + public object Role { get; set; } + /// The host name of the Snowflake account. Type: string (or Expression with resultType string). public object Host { get; set; } + /// Schema name for connection. Type: string (or Expression with resultType string). + public object Schema { get; set; } /// /// The Azure key vault secret reference of privateKey for KeyPair auth. /// 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. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs index e54c251a63a6..8ae57d9bc741 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs @@ -100,6 +100,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("enableSsl"u8); writer.WriteObjectValue(EnableSsl); } + if (Optional.IsDefined(EnableServerCertificateValidation)) + { + writer.WritePropertyName("enableServerCertificateValidation"u8); + writer.WriteObjectValue(EnableServerCertificateValidation); + } if (Optional.IsDefined(TrustedCertPath)) { writer.WritePropertyName("trustedCertPath"u8); @@ -155,6 +160,7 @@ internal static SparkLinkedService DeserializeSparkLinkedService(JsonElement ele SecretBase password = default; object httpPath = default; object enableSsl = default; + object enableServerCertificateValidation = default; object trustedCertPath = default; object useSystemTrustStore = default; object allowHostNameCNMismatch = default; @@ -301,6 +307,15 @@ internal static SparkLinkedService DeserializeSparkLinkedService(JsonElement ele enableSsl = property0.Value.GetObject(); continue; } + if (property0.NameEquals("enableServerCertificateValidation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("trustedCertPath"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -369,6 +384,7 @@ internal static SparkLinkedService DeserializeSparkLinkedService(JsonElement ele password, httpPath, enableSsl, + enableServerCertificateValidation, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs index 6724b189634e..5b4af886e07e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs @@ -50,12 +50,13 @@ public SparkLinkedService(object host, object port, SparkAuthenticationType auth /// /// The partial URL corresponding to the Spark server. /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// Specifies whether the connections to the server will validate server certificate, the default value is True. Only used for Version 2.0. /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. /// Specifies whether to allow self-signed certificates from the server. The default value is false. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal SparkLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, SparkServerType? serverType, SparkThriftTransportProtocol? thriftTransportProtocol, SparkAuthenticationType authenticationType, object username, SecretBase password, object httpPath, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + internal SparkLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, SparkServerType? serverType, SparkThriftTransportProtocol? thriftTransportProtocol, SparkAuthenticationType authenticationType, object username, SecretBase password, object httpPath, object enableSsl, object enableServerCertificateValidation, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { Host = host; Port = port; @@ -66,6 +67,7 @@ internal SparkLinkedService(string type, string version, IntegrationRuntimeRefer Password = password; HttpPath = httpPath; EnableSsl = enableSsl; + EnableServerCertificateValidation = enableServerCertificateValidation; TrustedCertPath = trustedCertPath; UseSystemTrustStore = useSystemTrustStore; AllowHostNameCNMismatch = allowHostNameCNMismatch; @@ -96,6 +98,8 @@ internal SparkLinkedService(string type, string version, IntegrationRuntimeRefer public object HttpPath { get; set; } /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. public object EnableSsl { get; set; } + /// Specifies whether the connections to the server will validate server certificate, the default value is True. Only used for Version 2.0. + public object EnableServerCertificateValidation { get; set; } /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. public object TrustedCertPath { get; set; } /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.Serialization.cs index 9e303fa09254..3f379bbd6f02 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.Serialization.cs @@ -43,6 +43,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("timeSpanFormat"u8); writer.WriteObjectValue(TimeSpanFormat); } + if (Optional.IsDefined(TimeFormat)) + { + writer.WritePropertyName("timeFormat"u8); + writer.WriteObjectValue(TimeFormat); + } + if (Optional.IsDefined(DateFormat)) + { + writer.WritePropertyName("dateFormat"u8); + writer.WriteObjectValue(DateFormat); + } if (Optional.IsDefined(Culture)) { writer.WritePropertyName("culture"u8); @@ -62,6 +72,8 @@ internal static TypeConversionSettings DeserializeTypeConversionSettings(JsonEle object dateTimeFormat = default; object dateTimeOffsetFormat = default; object timeSpanFormat = default; + object timeFormat = default; + object dateFormat = default; object culture = default; foreach (var property in element.EnumerateObject()) { @@ -110,6 +122,24 @@ internal static TypeConversionSettings DeserializeTypeConversionSettings(JsonEle timeSpanFormat = property.Value.GetObject(); continue; } + if (property.NameEquals("timeFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeFormat = property.Value.GetObject(); + continue; + } + if (property.NameEquals("dateFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormat = property.Value.GetObject(); + continue; + } if (property.NameEquals("culture"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -126,6 +156,8 @@ internal static TypeConversionSettings DeserializeTypeConversionSettings(JsonEle dateTimeFormat, dateTimeOffsetFormat, timeSpanFormat, + timeFormat, + dateFormat, culture); } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.cs index b4696c54520c..a7d89ae5ef4f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeConversionSettings.cs @@ -21,14 +21,18 @@ public TypeConversionSettings() /// The format for DateTime values. Type: string (or Expression with resultType string). /// The format for DateTimeOffset values. Type: string (or Expression with resultType string). /// The format for TimeSpan values. Type: string (or Expression with resultType string). + /// The format for Time values. Type: string (or Expression with resultType string). + /// The format for Date values. Type: string (or Expression with resultType string). /// The culture used to convert data from/to string. Type: string (or Expression with resultType string). - internal TypeConversionSettings(object allowDataTruncation, object treatBooleanAsNumber, object dateTimeFormat, object dateTimeOffsetFormat, object timeSpanFormat, object culture) + internal TypeConversionSettings(object allowDataTruncation, object treatBooleanAsNumber, object dateTimeFormat, object dateTimeOffsetFormat, object timeSpanFormat, object timeFormat, object dateFormat, object culture) { AllowDataTruncation = allowDataTruncation; TreatBooleanAsNumber = treatBooleanAsNumber; DateTimeFormat = dateTimeFormat; DateTimeOffsetFormat = dateTimeOffsetFormat; TimeSpanFormat = timeSpanFormat; + TimeFormat = timeFormat; + DateFormat = dateFormat; Culture = culture; } @@ -42,6 +46,10 @@ internal TypeConversionSettings(object allowDataTruncation, object treatBooleanA public object DateTimeOffsetFormat { get; set; } /// The format for TimeSpan values. Type: string (or Expression with resultType string). public object TimeSpanFormat { get; set; } + /// The format for Time values. Type: string (or Expression with resultType string). + public object TimeFormat { get; set; } + /// The format for Date values. Type: string (or Expression with resultType string). + public object DateFormat { get; set; } /// The culture used to convert data from/to string. Type: string (or Expression with resultType string). public object Culture { get; set; } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValueType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValueType.cs new file mode 100644 index 000000000000..131d00bb571a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValueType.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.Analytics.Synapse.Artifacts.Models +{ + /// Type of value copied from source. + public readonly partial struct ValueType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ValueType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActualValue = "actual"; + private const string DisplayValue = "display"; + + /// actual. + public static ValueType Actual { get; } = new ValueType(ActualValue); + /// display. + public static ValueType Display { get; } = new ValueType(DisplayValue); + /// Determines if two values are the same. + public static bool operator ==(ValueType left, ValueType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ValueType left, ValueType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ValueType(string value) => new ValueType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ValueType other && Equals(other); + /// + public bool Equals(ValueType 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/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseAuthenticationType.cs new file mode 100644 index 000000000000..a25dde2269d6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseAuthenticationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to use. + public readonly partial struct WarehouseAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WarehouseAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServicePrincipalValue = "ServicePrincipal"; + private const string SystemAssignedManagedIdentityValue = "SystemAssignedManagedIdentity"; + private const string UserAssignedManagedIdentityValue = "UserAssignedManagedIdentity"; + + /// ServicePrincipal. + public static WarehouseAuthenticationType ServicePrincipal { get; } = new WarehouseAuthenticationType(ServicePrincipalValue); + /// SystemAssignedManagedIdentity. + public static WarehouseAuthenticationType SystemAssignedManagedIdentity { get; } = new WarehouseAuthenticationType(SystemAssignedManagedIdentityValue); + /// UserAssignedManagedIdentity. + public static WarehouseAuthenticationType UserAssignedManagedIdentity { get; } = new WarehouseAuthenticationType(UserAssignedManagedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(WarehouseAuthenticationType left, WarehouseAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WarehouseAuthenticationType left, WarehouseAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WarehouseAuthenticationType(string value) => new WarehouseAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WarehouseAuthenticationType other && Equals(other); + /// + public bool Equals(WarehouseAuthenticationType 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/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.Serialization.cs index ff925d2c96c4..e0248a13a708 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.Serialization.cs @@ -73,6 +73,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("workspaceId"u8); writer.WriteObjectValue(WorkspaceId); } + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("authenticationType"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } if (Optional.IsDefined(ServicePrincipalId)) { writer.WritePropertyName("servicePrincipalId"u8); @@ -103,6 +108,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("servicePrincipalCredential"u8); writer.WriteObjectValue(ServicePrincipalCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -127,12 +137,14 @@ internal static WarehouseLinkedService DeserializeWarehouseLinkedService(JsonEle object artifactId = default; object endpoint = default; object workspaceId = default; + WarehouseAuthenticationType? authenticationType = default; object servicePrincipalId = default; SecretBase servicePrincipalKey = default; object tenant = default; string encryptedCredential = default; object servicePrincipalCredentialType = default; SecretBase servicePrincipalCredential = default; + CredentialReference credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -224,6 +236,15 @@ internal static WarehouseLinkedService DeserializeWarehouseLinkedService(JsonEle workspaceId = property0.Value.GetObject(); continue; } + if (property0.NameEquals("authenticationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new WarehouseAuthenticationType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("servicePrincipalId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -274,6 +295,15 @@ internal static WarehouseLinkedService DeserializeWarehouseLinkedService(JsonEle servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } @@ -291,12 +321,14 @@ internal static WarehouseLinkedService DeserializeWarehouseLinkedService(JsonEle artifactId, endpoint, workspaceId, + authenticationType, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential, servicePrincipalCredentialType, - servicePrincipalCredential); + servicePrincipalCredential, + credential); } /// Deserializes the model from a raw response. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.cs index 000119e8c8b5..dbecd0dfb1b4 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WarehouseLinkedService.cs @@ -38,6 +38,7 @@ public WarehouseLinkedService(object artifactId, object endpoint) /// The ID of Microsoft Fabric Warehouse artifact. Type: string (or Expression with resultType string). /// The endpoint of Microsoft Fabric Warehouse server. Type: string (or Expression with resultType string). /// The ID of Microsoft Fabric workspace. Type: string (or Expression with resultType string). + /// The authentication type to use. /// The ID of the application used to authenticate against Microsoft Fabric Warehouse. Type: string (or Expression with resultType string). /// /// The Key of the application used to authenticate against Microsoft Fabric Warehouse. @@ -52,17 +53,20 @@ public WarehouseLinkedService(object artifactId, object endpoint) /// 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 and . /// - internal WarehouseLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object artifactId, object endpoint, object workspaceId, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, string encryptedCredential, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal WarehouseLinkedService(string type, string version, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object artifactId, object endpoint, object workspaceId, WarehouseAuthenticationType? authenticationType, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, string encryptedCredential, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential, CredentialReference credential) : base(type, version, connectVia, description, parameters, annotations, additionalProperties) { ArtifactId = artifactId; Endpoint = endpoint; WorkspaceId = workspaceId; + AuthenticationType = authenticationType; ServicePrincipalId = servicePrincipalId; ServicePrincipalKey = servicePrincipalKey; Tenant = tenant; EncryptedCredential = encryptedCredential; ServicePrincipalCredentialType = servicePrincipalCredentialType; ServicePrincipalCredential = servicePrincipalCredential; + Credential = credential; Type = type ?? "Warehouse"; } @@ -72,6 +76,8 @@ internal WarehouseLinkedService(string type, string version, IntegrationRuntimeR public object Endpoint { get; set; } /// The ID of Microsoft Fabric workspace. Type: string (or Expression with resultType string). public object WorkspaceId { get; set; } + /// The authentication type to use. + public WarehouseAuthenticationType? AuthenticationType { get; set; } /// The ID of the application used to authenticate against Microsoft Fabric Warehouse. Type: string (or Expression with resultType string). public object ServicePrincipalId { get; set; } /// @@ -92,5 +98,7 @@ internal WarehouseLinkedService(string type, string version, IntegrationRuntimeR /// The available derived classes include and . /// public SecretBase ServicePrincipalCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md index 1d7df60bff26..ae31f800baad 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md @@ -8,7 +8,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml tag: package-artifacts-composite-v7 require: - - https://github.com/Azure/azure-rest-api-specs/blob/0da14ec4f475435b9d7d0ba06e49f05a5daac226/specification/synapse/data-plane/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/222af3670e36c5083cb0dc8a9c2677a8f77f8958/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Artifacts generation1-convenience-client: true public-clients: true diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/Azure.ResourceManager.WorkloadOrchestration.sln b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/Azure.ResourceManager.WorkloadOrchestration.sln new file mode 100644 index 000000000000..e9e92b8bd823 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/Azure.ResourceManager.WorkloadOrchestration.sln @@ -0,0 +1,63 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{37EC73CA-DB1F-4107-9A04-A1FF61478D2F}") = "Azure.ResourceManager.WorkloadOrchestration", "src\Azure.ResourceManager.WorkloadOrchestration.csproj", "{35561B55-93A7-4814-A477-A9C391B20EA8}" +EndProject +Project("{37EC73CA-DB1F-4107-9A04-A1FF61478D2F}") = "Azure.ResourceManager.WorkloadOrchestration.Tests", "tests\Azure.ResourceManager.WorkloadOrchestration.Tests.csproj", "{11A3487A-228C-4C10-8942-4E70684B9775}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AB9D1C44-A5AD-4444-8A2C-41B42A0515CB} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {35561B55-93A7-4814-A477-A9C391B20EA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Debug|x64.ActiveCfg = Debug|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Debug|x64.Build.0 = Debug|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Debug|x86.ActiveCfg = Debug|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Debug|x86.Build.0 = Debug|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Release|Any CPU.Build.0 = Release|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Release|x64.ActiveCfg = Release|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Release|x64.Build.0 = Release|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Release|x86.ActiveCfg = Release|Any CPU + {35561B55-93A7-4814-A477-A9C391B20EA8}.Release|x86.Build.0 = Release|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Debug|x64.ActiveCfg = Debug|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Debug|x64.Build.0 = Debug|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Debug|x86.ActiveCfg = Debug|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Debug|x86.Build.0 = Debug|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Release|Any CPU.Build.0 = Release|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Release|x64.ActiveCfg = Release|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Release|x64.Build.0 = Release|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Release|x86.ActiveCfg = Release|Any CPU + {11A3487A-228C-4C10-8942-4E70684B9775}.Release|x86.Build.0 = Release|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Debug|x64.Build.0 = Debug|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Debug|x86.Build.0 = Debug|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Release|Any CPU.Build.0 = Release|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Release|x64.ActiveCfg = Release|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Release|x64.Build.0 = Release|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Release|x86.ActiveCfg = Release|Any CPU + {B9FE62D3-7CB9-4FA9-BF23-E45BC4B6A711}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/CHANGELOG.md b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/CHANGELOG.md new file mode 100644 index 000000000000..df09cab302c1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/CHANGELOG.md @@ -0,0 +1,28 @@ +# Release History + +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0 (2025-09-01) + + + +### Features Added + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + + +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/Directory.Build.props b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/README.md b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/README.md new file mode 100644 index 000000000000..d65b16e6ef83 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Workload Orchestration management client library for .NET + +Workload orchestration for Azure Arc is a comprehensive, cloud-native, cross-platform orchestrator that simplifies the configuration management, deployment, and update of Kubernetes application lifecycle management across edge environments. + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure InformaticaDataManagement management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.WorkloadOrchestration +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/api/Azure.ResourceManager.WorkloadOrchestration.net8.0.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/api/Azure.ResourceManager.WorkloadOrchestration.net8.0.cs new file mode 100644 index 000000000000..eb4097e2f1a1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/api/Azure.ResourceManager.WorkloadOrchestration.net8.0.cs @@ -0,0 +1,2477 @@ +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class AzureResourceManagerWorkloadOrchestrationContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerWorkloadOrchestrationContext() { } + public static Azure.ResourceManager.WorkloadOrchestration.AzureResourceManagerWorkloadOrchestrationContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class EdgeConfigTemplateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeConfigTemplateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configTemplateName, 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 configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configTemplateName, 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 EdgeConfigTemplateData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData 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.WorkloadOrchestration.EdgeConfigTemplateData 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 EdgeConfigTemplateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeConfigTemplateResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string configTemplateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.Response GetEdgeConfigTemplateVersion(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeConfigTemplateVersionAsync(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionCollection GetEdgeConfigTemplateVersions() { 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 RemoveVersion(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveVersionAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, 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.WorkloadOrchestration.EdgeConfigTemplateData 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.WorkloadOrchestration.EdgeConfigTemplateData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeConfigTemplateVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeConfigTemplateVersionCollection() { } + public virtual Azure.Response Exists(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configTemplateVersionName, 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 configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configTemplateVersionName, 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 EdgeConfigTemplateVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData 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.WorkloadOrchestration.EdgeConfigTemplateVersionData 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 EdgeConfigTemplateVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeConfigTemplateVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string configTemplateName, string configTemplateVersionName) { 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.WorkloadOrchestration.EdgeConfigTemplateVersionData 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.WorkloadOrchestration.EdgeConfigTemplateVersionData 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 EdgeContextCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeContextCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string contextName, Azure.ResourceManager.WorkloadOrchestration.EdgeContextData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string contextName, Azure.ResourceManager.WorkloadOrchestration.EdgeContextData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string contextName, 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 contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string contextName, 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 EdgeContextData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeContextData 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.WorkloadOrchestration.EdgeContextData 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 EdgeContextResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeContextResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeContextData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName) { 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.Response GetEdgeSiteReference(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSiteReferenceAsync(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceCollection GetEdgeSiteReferences() { throw null; } + public virtual Azure.Response GetEdgeWorkflow(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeWorkflowAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowCollection GetEdgeWorkflows() { 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.WorkloadOrchestration.EdgeContextData 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.WorkloadOrchestration.EdgeContextData 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.WorkloadOrchestration.Models.EdgeContextPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDeploymentInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDeploymentInstanceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string instanceName, Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string instanceName, Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string instanceName, 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 instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string instanceName, 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 EdgeDeploymentInstanceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDeploymentInstanceData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData 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.WorkloadOrchestration.EdgeDeploymentInstanceData 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 EdgeDeploymentInstanceHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDeploymentInstanceHistoryCollection() { } + public virtual Azure.Response Exists(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string instanceHistoryName, 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 instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string instanceHistoryName, 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 EdgeDeploymentInstanceHistoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeDeploymentInstanceHistoryData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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 EdgeDeploymentInstanceHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDeploymentInstanceHistoryResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, string instanceHistoryName) { 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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 EdgeDeploymentInstanceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDeploymentInstanceResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) { 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryCollection GetEdgeDeploymentInstanceHistories() { throw null; } + public virtual Azure.Response GetEdgeDeploymentInstanceHistory(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDeploymentInstanceHistoryAsync(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData 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.WorkloadOrchestration.EdgeDeploymentInstanceData 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.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDiagnosticCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDiagnosticCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string diagnosticName, Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string diagnosticName, Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string diagnosticName, 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 diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string diagnosticName, 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 EdgeDiagnosticData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDiagnosticData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? EdgeDiagnosticProvisioningState { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData 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.WorkloadOrchestration.EdgeDiagnosticData 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 EdgeDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDiagnosticResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string diagnosticName) { 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.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.WorkloadOrchestration.EdgeDiagnosticData 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.WorkloadOrchestration.EdgeDiagnosticData 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.WorkloadOrchestration.Models.EdgeDiagnosticPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDynamicSchemaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDynamicSchemaCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dynamicSchemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dynamicSchemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dynamicSchemaName, 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 dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dynamicSchemaName, 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 EdgeDynamicSchemaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDynamicSchemaData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData 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.WorkloadOrchestration.EdgeDynamicSchemaData 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 EdgeDynamicSchemaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDynamicSchemaResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) { 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.Response GetEdgeDynamicSchemaVersion(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDynamicSchemaVersionAsync(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionCollection GetEdgeDynamicSchemaVersions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData 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.WorkloadOrchestration.EdgeDynamicSchemaData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDynamicSchemaVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDynamicSchemaVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dynamicSchemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dynamicSchemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dynamicSchemaVersionName, 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 dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dynamicSchemaVersionName, 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 EdgeDynamicSchemaVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDynamicSchemaVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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 EdgeDynamicSchemaVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDynamicSchemaVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) { 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.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeExecutionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeExecutionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string executionName, Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string executionName, Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string executionName, 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 executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string executionName, 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 EdgeExecutionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeExecutionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData 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.WorkloadOrchestration.EdgeExecutionData 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 EdgeExecutionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeExecutionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName) { 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.WorkloadOrchestration.EdgeExecutionData 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.WorkloadOrchestration.EdgeExecutionData 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.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeJobCollection() { } + public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobName, 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 jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string jobName, 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 EdgeJobData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeJobData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeJobData 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.WorkloadOrchestration.EdgeJobData 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 EdgeJobResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeJobResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeJobData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string jobName) { 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.WorkloadOrchestration.EdgeJobData 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.WorkloadOrchestration.EdgeJobData 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 EdgeSchemaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSchemaCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schemaName, 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 schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schemaName, 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 EdgeSchemaData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData 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.WorkloadOrchestration.EdgeSchemaData 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 EdgeSchemaReferenceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSchemaReferenceCollection() { } + public virtual Azure.Response Exists(string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schemaReferenceName, 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 schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schemaReferenceName, 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 EdgeSchemaReferenceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSchemaReferenceData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceData 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.WorkloadOrchestration.EdgeSchemaReferenceData 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 EdgeSchemaReferenceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSchemaReferenceResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string schemaReferenceName) { 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.WorkloadOrchestration.EdgeSchemaReferenceData 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.WorkloadOrchestration.EdgeSchemaReferenceData 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 EdgeSchemaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSchemaResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.Response GetEdgeDynamicSchema(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDynamicSchemaAsync(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaCollection GetEdgeDynamicSchemas() { throw null; } + public virtual Azure.Response GetEdgeSchemaVersion(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSchemaVersionAsync(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionCollection GetEdgeSchemaVersions() { 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 RemoveVersion(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveVersionAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, 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.WorkloadOrchestration.EdgeSchemaData 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.WorkloadOrchestration.EdgeSchemaData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSchemaVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSchemaVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schemaVersionName, 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 schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schemaVersionName, 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 EdgeSchemaVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData 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.WorkloadOrchestration.EdgeSchemaVersionData 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 EdgeSchemaVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSchemaVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) { 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.WorkloadOrchestration.EdgeSchemaVersionData 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.WorkloadOrchestration.EdgeSchemaVersionData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSiteReferenceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSiteReferenceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteReferenceName, Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteReferenceName, Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteReferenceName, 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 siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteReferenceName, 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 EdgeSiteReferenceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSiteReferenceData() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData 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.WorkloadOrchestration.EdgeSiteReferenceData 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 EdgeSiteReferenceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSiteReferenceResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName) { 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.WorkloadOrchestration.EdgeSiteReferenceData 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.WorkloadOrchestration.EdgeSiteReferenceData 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.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSolutionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionName, 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 solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionName, 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 EdgeSolutionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData 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.WorkloadOrchestration.EdgeSolutionData 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 EdgeSolutionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName) { 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.Response GetEdgeDeploymentInstance(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDeploymentInstanceAsync(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceCollection GetEdgeDeploymentInstances() { throw null; } + public virtual Azure.Response GetEdgeSolutionVersion(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionVersionAsync(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionCollection GetEdgeSolutionVersions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData 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.WorkloadOrchestration.EdgeSolutionData 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.WorkloadOrchestration.Models.EdgeSolutionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSolutionTemplateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionTemplateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionTemplateName, 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 solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionTemplateName, 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 EdgeSolutionTemplateData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData 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.WorkloadOrchestration.EdgeSolutionTemplateData 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 EdgeSolutionTemplateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionTemplateResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionTemplateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.Response GetEdgeSolutionTemplateVersion(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionTemplateVersionAsync(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionCollection GetEdgeSolutionTemplateVersions() { 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 RemoveVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RemoveVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, 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.WorkloadOrchestration.EdgeSolutionTemplateData 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.WorkloadOrchestration.EdgeSolutionTemplateData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSolutionTemplateVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionTemplateVersionCollection() { } + public virtual Azure.Response Exists(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionTemplateVersionName, 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 solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionTemplateVersionName, 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 EdgeSolutionTemplateVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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 EdgeSolutionTemplateVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionTemplateVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation BulkDeploySolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeploySolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BulkDeploySolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeploySolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation BulkPublishSolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BulkPublishSolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName) { 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.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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 EdgeSolutionVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionVersionName, 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 solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionVersionName, 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 EdgeSolutionVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData 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.WorkloadOrchestration.EdgeSolutionVersionData 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 EdgeSolutionVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName) { 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.WorkloadOrchestration.EdgeSolutionVersionData 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.WorkloadOrchestration.EdgeSolutionVersionData 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.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeTargetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeTargetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string targetName, 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 targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string targetName, 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 EdgeTargetData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData 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.WorkloadOrchestration.EdgeTargetData 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 EdgeTargetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeTargetResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), 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 GetEdgeSolution(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionAsync(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionCollection GetEdgeSolutions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation InstallSolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.InstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task InstallSolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.InstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PublishSolutionVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PublishSolutionVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RemoveRevision(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.RemoveRevisionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RemoveRevisionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.RemoveRevisionContent 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.ResourceManager.ArmOperation ResolveConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResolveConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ReviewSolutionVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReviewSolutionVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, 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.WorkloadOrchestration.EdgeTargetData 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.WorkloadOrchestration.EdgeTargetData 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 UninstallSolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UninstallSolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateExternalValidationStatus(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateExternalValidationStatusAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeWorkflowCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string workflowName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string workflowName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, 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 workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workflowName, 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 EdgeWorkflowData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData 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.WorkloadOrchestration.EdgeWorkflowData 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 EdgeWorkflowResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeWorkflowResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName) { 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.Response GetEdgeWorkflowVersion(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeWorkflowVersionAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionCollection GetEdgeWorkflowVersions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData 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.WorkloadOrchestration.EdgeWorkflowData 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.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeWorkflowVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeWorkflowVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string versionName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string versionName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string versionName, 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 versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string versionName, 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 EdgeWorkflowVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData 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.WorkloadOrchestration.EdgeWorkflowVersionData 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 EdgeWorkflowVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeWorkflowVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) { 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.Response GetEdgeExecution(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeExecutionAsync(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionCollection GetEdgeExecutions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData 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.WorkloadOrchestration.EdgeWorkflowVersionData 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.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class WorkloadOrchestrationExtensions + { + public static Azure.Response GetEdgeConfigTemplate(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeConfigTemplateAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateResource GetEdgeConfigTemplateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateCollection GetEdgeConfigTemplates(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeConfigTemplates(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeConfigTemplatesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionResource GetEdgeConfigTemplateVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeContext(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeContextAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeContextResource GetEdgeContextResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeContextCollection GetEdgeContexts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeContexts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeContextsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryResource GetEdgeDeploymentInstanceHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceResource GetEdgeDeploymentInstanceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeDiagnostic(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeDiagnosticAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticResource GetEdgeDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticCollection GetEdgeDiagnostics(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeDiagnostics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeDiagnosticsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaResource GetEdgeDynamicSchemaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionResource GetEdgeDynamicSchemaVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionResource GetEdgeExecutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeJob(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeJobAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeJobResource GetEdgeJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeJobCollection GetEdgeJobs(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response GetEdgeSchema(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeSchemaAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetEdgeSchemaReference(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeSchemaReferenceAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceResource GetEdgeSchemaReferenceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceCollection GetEdgeSchemaReferences(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaResource GetEdgeSchemaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaCollection GetEdgeSchemas(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeSchemas(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeSchemasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionResource GetEdgeSchemaVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceResource GetEdgeSiteReferenceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionResource GetEdgeSolutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeSolutionTemplate(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeSolutionTemplateAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateResource GetEdgeSolutionTemplateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateCollection GetEdgeSolutionTemplates(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeSolutionTemplates(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeSolutionTemplatesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionResource GetEdgeSolutionTemplateVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionResource GetEdgeSolutionVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeTarget(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeTargetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeTargetResource GetEdgeTargetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeTargetCollection GetEdgeTargets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeTargets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeTargetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowResource GetEdgeWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionResource GetEdgeWorkflowVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } +} +namespace Azure.ResourceManager.WorkloadOrchestration.Mocking +{ + public partial class MockableWorkloadOrchestrationArmClient : Azure.ResourceManager.ArmResource + { + protected MockableWorkloadOrchestrationArmClient() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateResource GetEdgeConfigTemplateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionResource GetEdgeConfigTemplateVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeContextResource GetEdgeContextResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryResource GetEdgeDeploymentInstanceHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceResource GetEdgeDeploymentInstanceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticResource GetEdgeDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaResource GetEdgeDynamicSchemaResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionResource GetEdgeDynamicSchemaVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionResource GetEdgeExecutionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.Response GetEdgeJob(Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeJobAsync(Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeJobResource GetEdgeJobResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeJobCollection GetEdgeJobs(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.Response GetEdgeSchemaReference(Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSchemaReferenceAsync(Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceResource GetEdgeSchemaReferenceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceCollection GetEdgeSchemaReferences(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaResource GetEdgeSchemaResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionResource GetEdgeSchemaVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceResource GetEdgeSiteReferenceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionResource GetEdgeSolutionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateResource GetEdgeSolutionTemplateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionResource GetEdgeSolutionTemplateVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionResource GetEdgeSolutionVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeTargetResource GetEdgeTargetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowResource GetEdgeWorkflowResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionResource GetEdgeWorkflowVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableWorkloadOrchestrationResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableWorkloadOrchestrationResourceGroupResource() { } + public virtual Azure.Response GetEdgeConfigTemplate(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeConfigTemplateAsync(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateCollection GetEdgeConfigTemplates() { throw null; } + public virtual Azure.Response GetEdgeContext(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeContextAsync(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeContextCollection GetEdgeContexts() { throw null; } + public virtual Azure.Response GetEdgeDiagnostic(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDiagnosticAsync(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticCollection GetEdgeDiagnostics() { throw null; } + public virtual Azure.Response GetEdgeSchema(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSchemaAsync(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaCollection GetEdgeSchemas() { throw null; } + public virtual Azure.Response GetEdgeSolutionTemplate(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionTemplateAsync(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateCollection GetEdgeSolutionTemplates() { throw null; } + public virtual Azure.Response GetEdgeTarget(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeTargetAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeTargetCollection GetEdgeTargets() { throw null; } + } + public partial class MockableWorkloadOrchestrationSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableWorkloadOrchestrationSubscriptionResource() { } + public virtual Azure.Pageable GetEdgeConfigTemplates(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeConfigTemplatesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeContexts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeContextsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeDiagnostics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeDiagnosticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeSchemas(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeSchemasAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeSolutionTemplates(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeSolutionTemplatesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeTargets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeTargetsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + public static partial class ArmWorkloadOrchestrationModelFactory + { + public static Azure.ResourceManager.WorkloadOrchestration.Models.AvailableSolutionTemplateVersion AvailableSolutionTemplateVersion(string solutionTemplateVersion = null, string latestConfigRevision = null, bool isConfigured = false) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishTargetDetails BulkPublishTargetDetails(Azure.Core.ResourceIdentifier targetId = null, string solutionInstanceName = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType ConfigTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? updateType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType?), string version = null, Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData configTemplateVersion = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobContent DeployJobContent(Azure.Core.ResourceIdentifier parameterSolutionVersionId = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobStepStatistics DeployJobStepStatistics(int? totalCount = default(int?), int? successCount = default(int?), int? failedCount = default(int?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData EdgeConfigTemplateData(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.WorkloadOrchestration.Models.EdgeConfigTemplateProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateProperties EdgeConfigTemplateProperties(string description = null, string latestVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData EdgeConfigTemplateVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties EdgeConfigTemplateVersionProperties(string configurations = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeContextData EdgeContextData(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.WorkloadOrchestration.Models.EdgeContextProperties properties = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextProperties EdgeContextProperties(System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable hierarchies = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData EdgeDeploymentInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData EdgeDeploymentInstanceHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties EdgeDeploymentInstanceHistoryProperties(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot solutionVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot target = null, string solutionScope = null, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? activeState = default(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState?), Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy reconciliationPolicy = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus status = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties EdgeDeploymentInstanceProperties(string solutionVersionId = null, string targetId = null, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? activeState = default(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState?), Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy reconciliationPolicy = null, string solutionScope = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus status = null, long? deploymentTimestampEpoch = default(long?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus EdgeDeploymentStatus(System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), int? deployed = default(int?), int? expectedRunningJobId = default(int?), int? runningJobId = default(int?), string status = null, string statusDetails = null, int? generation = default(int?), System.Collections.Generic.IEnumerable targetStatuses = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData EdgeDiagnosticData(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.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? edgeDiagnosticProvisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData EdgeDynamicSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties EdgeDynamicSchemaProperties(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType? configurationType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType?), Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType? configurationModel = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData EdgeDynamicSchemaVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData EdgeExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties EdgeExecutionProperties(string workflowVersionId = null, System.Collections.Generic.IDictionary specification = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus status = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStageStatus EdgeExecutionStageStatus(int? status = default(int?), string statusMessage = null, string stage = null, string nextstage = null, string errorMessage = null, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? isActive = default(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState?), System.Collections.Generic.IReadOnlyDictionary inputs = null, System.Collections.Generic.IReadOnlyDictionary outputs = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus EdgeExecutionStatus(System.DateTimeOffset? updateOn = default(System.DateTimeOffset?), int? status = default(int?), string statusMessage = null, System.Collections.Generic.IEnumerable stageHistory = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeJobData EdgeJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties EdgeJobProperties(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType jobType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus status = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus), Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent jobParameter = null, string correlationId = null, System.Collections.Generic.IEnumerable steps = null, string triggeredBy = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?), Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStep EdgeJobStep(string name = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus status = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string message = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics statistics = null, System.Collections.Generic.IEnumerable steps = null, Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData EdgeSchemaData(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.WorkloadOrchestration.Models.EdgeSchemaProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaProperties EdgeSchemaProperties(string currentVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceData EdgeSchemaReferenceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties EdgeSchemaReferenceProperties(string schemaId = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData EdgeSchemaVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties EdgeSchemaVersionProperties(string value = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType EdgeSchemaVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? updateType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType?), string version = null, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData schemaVersion = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData EdgeSiteReferenceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties properties = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties EdgeSiteReferenceProperties(string siteId = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData EdgeSolutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionDependency EdgeSolutionDependency(Azure.Core.ResourceIdentifier solutionVersionId = null, string solutionInstanceName = null, Azure.Core.ResourceIdentifier solutionTemplateVersionId = null, Azure.Core.ResourceIdentifier targetId = null, System.Collections.Generic.IEnumerable dependencies = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties EdgeSolutionProperties(string solutionTemplateId = null, System.Collections.Generic.IEnumerable availableSolutionTemplateVersions = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent EdgeSolutionTemplateContent(Azure.Core.ResourceIdentifier solutionTemplateVersionId = null, string solutionInstanceName = null, System.Collections.Generic.IEnumerable solutionDependencies = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData EdgeSolutionTemplateData(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.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties EdgeSolutionTemplateProperties(string description = null, System.Collections.Generic.IEnumerable capabilities = null, string latestVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState?), bool? isExternalValidationEnabled = default(bool?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData EdgeSolutionTemplateVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties EdgeSolutionTemplateVersionProperties(string configurations = null, System.Collections.Generic.IDictionary specification = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType? orchestratorType = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType EdgeSolutionTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? updateType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType?), string version = null, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData solutionTemplateVersion = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData EdgeSolutionVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties EdgeSolutionVersionProperties(string solutionTemplateVersionId = null, int? revision = default(int?), string targetDisplayName = null, string configuration = null, string targetLevelConfiguration = null, System.Collections.Generic.IDictionary specification = null, string reviewId = null, string externalValidationId = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState?), string solutionInstanceName = null, System.Collections.Generic.IEnumerable solutionDependencies = null, Azure.ResponseError errorDetails = null, string latestActionTrackingUri = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType? actionType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData EdgeTargetData(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.WorkloadOrchestration.Models.EdgeTargetProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetProperties EdgeTargetProperties(string description = null, string displayName = null, Azure.Core.ResourceIdentifier contextId = null, System.Collections.Generic.IDictionary targetSpecification = null, System.Collections.Generic.IEnumerable capabilities = null, string hierarchyLevel = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus status = null, string solutionScope = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot EdgeTargetSnapshot(Azure.Core.ResourceIdentifier targetId = null, System.Collections.Generic.IReadOnlyDictionary targetSpecification = null, string solutionScope = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetStatus EdgeTargetStatus(string name = null, string status = null, System.Collections.Generic.IEnumerable componentStatuses = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData EdgeWorkflowData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties EdgeWorkflowProperties(string workflowTemplateId = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData EdgeWorkflowVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties EdgeWorkflowVersionProperties(int? revision = default(int?), string configuration = null, System.Collections.Generic.IEnumerable stageSpec = null, string reviewId = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState?), System.Collections.Generic.IDictionary specification = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.RemoveVersionResult RemoveVersionResult(string status = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.ResolvedConfiguration ResolvedConfiguration(string configuration = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot SolutionVersionSnapshot(Azure.Core.ResourceIdentifier solutionVersionId = null, System.Collections.Generic.IReadOnlyDictionary specification = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TargetComponentStatus TargetComponentStatus(string name = null, string status = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent UninstallSolutionContent(Azure.Core.ResourceIdentifier solutionTemplateId = null, string solutionInstanceName = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent UpdateExternalValidationStatusContent(Azure.Core.ResourceIdentifier solutionVersionId = null, Azure.ResponseError errorDetails = null, string externalValidationId = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus validationStatus = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus)) { throw null; } + } + public partial class AvailableSolutionTemplateVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AvailableSolutionTemplateVersion() { } + public bool IsConfigured { get { throw null; } } + public string LatestConfigRevision { get { throw null; } } + public string SolutionTemplateVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.AvailableSolutionTemplateVersion 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.WorkloadOrchestration.Models.AvailableSolutionTemplateVersion 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 BulkDeploySolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkDeploySolutionContent(System.Collections.Generic.IEnumerable targets) { } + public System.Collections.Generic.IList Targets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeploySolutionContent 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.WorkloadOrchestration.Models.BulkDeploySolutionContent 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 BulkDeployTargetDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkDeployTargetDetails(Azure.Core.ResourceIdentifier solutionVersionId) { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeployTargetDetails 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.WorkloadOrchestration.Models.BulkDeployTargetDetails 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 BulkPublishSolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkPublishSolutionContent(System.Collections.Generic.IEnumerable targets) { } + public System.Collections.Generic.IList SolutionDependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } set { } } + public System.Collections.Generic.IList Targets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishSolutionContent 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.WorkloadOrchestration.Models.BulkPublishSolutionContent 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 BulkPublishTargetDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkPublishTargetDetails(Azure.Core.ResourceIdentifier targetId) { } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishTargetDetails 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.WorkloadOrchestration.Models.BulkPublishTargetDetails 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 ConfigTemplateVersionWithUpdateType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConfigTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData configTemplateVersion) { } + public Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData ConfigTemplateVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? UpdateType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType 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.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType 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 ContextCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContextCapability(string name, string description) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ContextCapability 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.WorkloadOrchestration.Models.ContextCapability 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 ContextHierarchy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContextHierarchy(string name, string description) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ContextHierarchy 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.WorkloadOrchestration.Models.ContextHierarchy 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 DeployJobContent : Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeployJobContent() { } + public Azure.Core.ResourceIdentifier ParameterSolutionVersionId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobContent 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.WorkloadOrchestration.Models.DeployJobContent 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 DeployJobStepStatistics : Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeployJobStepStatistics() { } + public int? FailedCount { get { throw null; } } + public int? SuccessCount { get { throw null; } } + public int? TotalCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobStepStatistics 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.WorkloadOrchestration.Models.DeployJobStepStatistics 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 EdgeConfigTemplatePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplatePatch() { } + public string ConfigTemplateUpdateDescription { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplatePatch 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.WorkloadOrchestration.Models.EdgeConfigTemplatePatch 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 EdgeConfigTemplateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateProperties(string description) { } + public string Description { get { throw null; } set { } } + public string LatestVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateProperties 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.WorkloadOrchestration.Models.EdgeConfigTemplateProperties 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 EdgeConfigTemplateVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateVersionProperties(string configurations) { } + public string Configurations { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties 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.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties 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 EdgeContextPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatch 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.WorkloadOrchestration.Models.EdgeContextPatch 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 EdgeContextPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextPatchProperties() { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public System.Collections.Generic.IList Hierarchies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatchProperties 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.WorkloadOrchestration.Models.EdgeContextPatchProperties 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 EdgeContextProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextProperties(System.Collections.Generic.IEnumerable capabilities, System.Collections.Generic.IEnumerable hierarchies) { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public System.Collections.Generic.IList Hierarchies { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextProperties 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.WorkloadOrchestration.Models.EdgeContextProperties 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 EdgeDeploymentInstanceHistoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeDeploymentInstanceHistoryProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? ActiveState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy ReconciliationPolicy { get { throw null; } } + public string SolutionScope { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot SolutionVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus Status { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties 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.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties 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 EdgeDeploymentInstanceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDeploymentInstanceProperties(string solutionVersionId, string targetId) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? ActiveState { get { throw null; } set { } } + public long? DeploymentTimestampEpoch { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy ReconciliationPolicy { get { throw null; } set { } } + public string SolutionScope { get { throw null; } set { } } + public string SolutionVersionId { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus Status { get { throw null; } } + public string TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties 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.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties 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 EdgeDeploymentStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeDeploymentStatus() { } + public int? Deployed { get { throw null; } } + public int? ExpectedRunningJobId { get { throw null; } } + public int? Generation { get { throw null; } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public int? RunningJobId { get { throw null; } } + public string Status { get { throw null; } } + public string StatusDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TargetStatuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus 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.WorkloadOrchestration.Models.EdgeDeploymentStatus 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 EdgeDiagnosticPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDiagnosticPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatch 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.WorkloadOrchestration.Models.EdgeDiagnosticPatch 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 EdgeDiagnosticPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDiagnosticPatchProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatchProperties 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.WorkloadOrchestration.Models.EdgeDiagnosticPatchProperties 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 EdgeDynamicSchemaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDynamicSchemaProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType? ConfigurationModel { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType? ConfigurationType { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties 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.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties 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 EdgeExecutionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeExecutionProperties(string workflowVersionId) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus Status { get { throw null; } } + public string WorkflowVersionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties 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.WorkloadOrchestration.Models.EdgeExecutionProperties 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 EdgeExecutionStageStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeExecutionStageStatus() { } + public string ErrorMessage { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Inputs { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? IsActive { get { throw null; } } + public string Nextstage { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Outputs { get { throw null; } } + public string Stage { get { throw null; } } + public int? Status { get { throw null; } } + public string StatusMessage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStageStatus 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.WorkloadOrchestration.Models.EdgeExecutionStageStatus 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 EdgeExecutionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeExecutionStatus() { } + public System.Collections.Generic.IReadOnlyList StageHistory { get { throw null; } } + public int? Status { get { throw null; } } + public string StatusMessage { get { throw null; } } + public System.DateTimeOffset? UpdateOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus 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.WorkloadOrchestration.Models.EdgeExecutionStatus 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 abstract partial class EdgeJobContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EdgeJobContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent 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.WorkloadOrchestration.Models.EdgeJobContent 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 EdgeJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeJobProperties() { } + public string CorrelationId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent JobParameter { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType JobType { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Steps { get { throw null; } } + public string TriggeredBy { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties 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.WorkloadOrchestration.Models.EdgeJobProperties 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 EdgeJobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeJobStatus(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Failed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus InProgress { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus 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.WorkloadOrchestration.Models.EdgeJobStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EdgeJobStep : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeJobStep() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics Statistics { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Steps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStep 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.WorkloadOrchestration.Models.EdgeJobStep 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 abstract partial class EdgeJobStepStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EdgeJobStepStatistics() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics 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.WorkloadOrchestration.Models.EdgeJobStepStatistics 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 EdgeJobType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeJobType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType Deploy { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType ExternalValidation { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType Staging { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType 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.WorkloadOrchestration.Models.EdgeJobType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeResourceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeResourceState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState Active { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState 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.WorkloadOrchestration.Models.EdgeResourceState left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeSchemaConfigurationModelType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeSchemaConfigurationModelType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType Application { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType Common { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType 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.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeSchemaConfigurationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeSchemaConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType Hierarchy { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType Shared { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType 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.WorkloadOrchestration.Models.EdgeSchemaConfigurationType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EdgeSchemaPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatch 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.WorkloadOrchestration.Models.EdgeSchemaPatch 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 EdgeSchemaPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaPatchProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatchProperties 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.WorkloadOrchestration.Models.EdgeSchemaPatchProperties 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 EdgeSchemaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaProperties() { } + public string CurrentVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaProperties 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.WorkloadOrchestration.Models.EdgeSchemaProperties 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 EdgeSchemaReferenceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSchemaReferenceProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SchemaId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties 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.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties 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 EdgeSchemaVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaVersionProperties(string value) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties 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.WorkloadOrchestration.Models.EdgeSchemaVersionProperties 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 EdgeSchemaVersionWithUpdateType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData schemaVersion) { } + public Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData SchemaVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? UpdateType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType 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.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType 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 EdgeSiteReferenceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSiteReferenceProperties(string siteId) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SiteId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties 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.WorkloadOrchestration.Models.EdgeSiteReferenceProperties 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 EdgeSolutionDependency : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionDependency() { } + public System.Collections.Generic.IReadOnlyList Dependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } } + public Azure.Core.ResourceIdentifier SolutionTemplateVersionId { get { throw null; } } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionDependency 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.WorkloadOrchestration.Models.EdgeSolutionDependency 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 EdgeSolutionDependencyContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionDependencyContent() { } + public System.Collections.Generic.IList Dependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionTemplateId { get { throw null; } set { } } + public string SolutionTemplateVersion { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionDependencyContent 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.WorkloadOrchestration.Models.EdgeSolutionDependencyContent 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 EdgeSolutionPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatchProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatch 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.WorkloadOrchestration.Models.EdgeSolutionPatch 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 EdgeSolutionPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionPatchProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatchProperties 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.WorkloadOrchestration.Models.EdgeSolutionPatchProperties 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 EdgeSolutionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionProperties() { } + public System.Collections.Generic.IReadOnlyList AvailableSolutionTemplateVersions { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties 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.WorkloadOrchestration.Models.EdgeSolutionProperties 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 EdgeSolutionTemplateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateContent(Azure.Core.ResourceIdentifier solutionTemplateVersionId) { } + public System.Collections.Generic.IList SolutionDependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionTemplateVersionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent 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.WorkloadOrchestration.Models.EdgeSolutionTemplateContent 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 EdgeSolutionTemplatePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplatePatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch 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.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch 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 EdgeSolutionTemplatePatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplatePatchProperties() { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? IsExternalValidationEnabled { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatchProperties 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.WorkloadOrchestration.Models.EdgeSolutionTemplatePatchProperties 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 EdgeSolutionTemplateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateProperties(string description, System.Collections.Generic.IEnumerable capabilities) { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? IsExternalValidationEnabled { get { throw null; } set { } } + public string LatestVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties 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.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties 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 EdgeSolutionTemplateVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateVersionProperties(string configurations, System.Collections.Generic.IDictionary specification) { } + public string Configurations { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType? OrchestratorType { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties 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.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties 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 EdgeSolutionTemplateVersionWithUpdateType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData solutionTemplateVersion) { } + public Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData SolutionTemplateVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? UpdateType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType 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.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType 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 EdgeSolutionVersionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionVersionContent(Azure.Core.ResourceIdentifier solutionVersionId) { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionContent 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.WorkloadOrchestration.Models.EdgeSolutionVersionContent 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 EdgeSolutionVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionVersionProperties(System.Collections.Generic.IDictionary specification) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType? ActionType { get { throw null; } } + public string Configuration { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string LatestActionTrackingUri { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string ReviewId { get { throw null; } } + public int? Revision { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SolutionDependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? State { get { throw null; } } + public string TargetDisplayName { get { throw null; } } + public string TargetLevelConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties 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.WorkloadOrchestration.Models.EdgeSolutionVersionProperties 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 EdgeTargetPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatch 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.WorkloadOrchestration.Models.EdgeTargetPatch 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 EdgeTargetPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetPatchProperties() { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public Azure.Core.ResourceIdentifier ContextId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string HierarchyLevel { get { throw null; } set { } } + public string SolutionScope { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + public System.Collections.Generic.IDictionary TargetSpecification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatchProperties 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.WorkloadOrchestration.Models.EdgeTargetPatchProperties 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 EdgeTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetProperties(string description, string displayName, Azure.Core.ResourceIdentifier contextId, System.Collections.Generic.IDictionary targetSpecification, System.Collections.Generic.IEnumerable capabilities, string hierarchyLevel) { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public Azure.Core.ResourceIdentifier ContextId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string HierarchyLevel { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SolutionScope { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus Status { get { throw null; } } + public System.Collections.Generic.IDictionary TargetSpecification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetProperties 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.WorkloadOrchestration.Models.EdgeTargetProperties 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 EdgeTargetSnapshot : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeTargetSnapshot() { } + public string SolutionScope { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary TargetSpecification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot 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.WorkloadOrchestration.Models.EdgeTargetSnapshot 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 EdgeTargetStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeTargetStatus() { } + public System.Collections.Generic.IReadOnlyList ComponentStatuses { get { throw null; } } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetStatus 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.WorkloadOrchestration.Models.EdgeTargetStatus 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 EdgeUpdateType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeUpdateType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType Major { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType Minor { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType Patch { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType 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.WorkloadOrchestration.Models.EdgeUpdateType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EdgeVersionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeVersionContent(string version) { } + public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent 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.WorkloadOrchestration.Models.EdgeVersionContent 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 EdgeWorkflowProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string WorkflowTemplateId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties 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.WorkloadOrchestration.Models.EdgeWorkflowProperties 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 EdgeWorkflowStageSpec : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowStageSpec(string name) { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowTaskConfig TaskOption { get { throw null; } set { } } + public System.Collections.Generic.IList Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowStageSpec 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.WorkloadOrchestration.Models.EdgeWorkflowStageSpec 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 EdgeWorkflowTaskConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowTaskConfig() { } + public int? Concurrency { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorAction ErrorAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowTaskConfig 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.WorkloadOrchestration.Models.EdgeWorkflowTaskConfig 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 EdgeWorkflowTaskSpec : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowTaskSpec(string name, System.Collections.Generic.IDictionary specification) { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowTaskSpec 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.WorkloadOrchestration.Models.EdgeWorkflowTaskSpec 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 EdgeWorkflowVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowVersionProperties(System.Collections.Generic.IEnumerable stageSpec) { } + public string Configuration { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string ReviewId { get { throw null; } } + public int? Revision { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public System.Collections.Generic.IList StageSpec { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties 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.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties 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 InstallSolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InstallSolutionContent(Azure.Core.ResourceIdentifier solutionVersionId) { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.InstallSolutionContent 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.WorkloadOrchestration.Models.InstallSolutionContent 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 InstanceActiveState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceActiveState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState Active { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState 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.WorkloadOrchestration.Models.InstanceActiveState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InstanceReconciliationPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InstanceReconciliationPolicy(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState state, string interval) { } + public string Interval { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy 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.WorkloadOrchestration.Models.InstanceReconciliationPolicy 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 InstanceReconciliationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceReconciliationState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState Active { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState 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.WorkloadOrchestration.Models.InstanceReconciliationState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RemoveRevisionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemoveRevisionContent(Azure.Core.ResourceIdentifier solutionTemplateId, string solutionVersion) { } + public Azure.Core.ResourceIdentifier SolutionTemplateId { get { throw null; } } + public string SolutionVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.RemoveRevisionContent 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.WorkloadOrchestration.Models.RemoveRevisionContent 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 RemoveVersionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RemoveVersionResult() { } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.RemoveVersionResult 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.WorkloadOrchestration.Models.RemoveVersionResult 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 ResolvedConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResolvedConfiguration() { } + public string Configuration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ResolvedConfiguration 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.WorkloadOrchestration.Models.ResolvedConfiguration 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 SolutionInstanceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionInstanceState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Deployed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Deploying { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState ExternalValidationFailed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Failed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState InReview { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState PendingExternalValidation { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState ReadyToDeploy { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState ReadyToUpgrade { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Staging { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Undeployed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState UpgradeInReview { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState 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.WorkloadOrchestration.Models.SolutionInstanceState left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SolutionInstanceValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionInstanceValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus Invalid { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus Valid { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus 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.WorkloadOrchestration.Models.SolutionInstanceValidationStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SolutionVersionOrchestratorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionVersionOrchestratorType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType TO { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType 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.WorkloadOrchestration.Models.SolutionVersionOrchestratorType left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SolutionVersionSnapshot : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SolutionVersionSnapshot() { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Specification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot 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.WorkloadOrchestration.Models.SolutionVersionSnapshot 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 TargetComponentStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetComponentStatus() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.TargetComponentStatus 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.WorkloadOrchestration.Models.TargetComponentStatus 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 TaskErrorAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskErrorAction() { } + public int? MaxToleratedFailures { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorAction 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.WorkloadOrchestration.Models.TaskErrorAction 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 TaskErrorActionModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TaskErrorActionModeType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType SilentlyContinue { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType StopOnAnyFailure { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType StopOnNFailures { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType 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.WorkloadOrchestration.Models.TaskErrorActionModeType left, Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType left, Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UninstallSolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UninstallSolutionContent(Azure.Core.ResourceIdentifier solutionTemplateId) { } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionTemplateId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent 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.WorkloadOrchestration.Models.UninstallSolutionContent 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 UpdateExternalValidationStatusContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UpdateExternalValidationStatusContent(Azure.Core.ResourceIdentifier solutionVersionId, string externalValidationId, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus validationStatus) { } + public Azure.ResponseError ErrorDetails { get { throw null; } set { } } + public string ExternalValidationId { get { throw null; } } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus ValidationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent 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.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent 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 WorkloadOrchestrationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkloadOrchestrationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Initialized { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Inprogress { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState 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.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState left, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState left, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/api/Azure.ResourceManager.WorkloadOrchestration.netstandard2.0.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/api/Azure.ResourceManager.WorkloadOrchestration.netstandard2.0.cs new file mode 100644 index 000000000000..eb4097e2f1a1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/api/Azure.ResourceManager.WorkloadOrchestration.netstandard2.0.cs @@ -0,0 +1,2477 @@ +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class AzureResourceManagerWorkloadOrchestrationContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerWorkloadOrchestrationContext() { } + public static Azure.ResourceManager.WorkloadOrchestration.AzureResourceManagerWorkloadOrchestrationContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class EdgeConfigTemplateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeConfigTemplateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configTemplateName, 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 configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configTemplateName, 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 EdgeConfigTemplateData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData 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.WorkloadOrchestration.EdgeConfigTemplateData 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 EdgeConfigTemplateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeConfigTemplateResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string configTemplateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.Response GetEdgeConfigTemplateVersion(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeConfigTemplateVersionAsync(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionCollection GetEdgeConfigTemplateVersions() { 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 RemoveVersion(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveVersionAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, 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.WorkloadOrchestration.EdgeConfigTemplateData 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.WorkloadOrchestration.EdgeConfigTemplateData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeConfigTemplateVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeConfigTemplateVersionCollection() { } + public virtual Azure.Response Exists(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configTemplateVersionName, 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 configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configTemplateVersionName, 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 EdgeConfigTemplateVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData 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.WorkloadOrchestration.EdgeConfigTemplateVersionData 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 EdgeConfigTemplateVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeConfigTemplateVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string configTemplateName, string configTemplateVersionName) { 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.WorkloadOrchestration.EdgeConfigTemplateVersionData 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.WorkloadOrchestration.EdgeConfigTemplateVersionData 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 EdgeContextCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeContextCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string contextName, Azure.ResourceManager.WorkloadOrchestration.EdgeContextData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string contextName, Azure.ResourceManager.WorkloadOrchestration.EdgeContextData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string contextName, 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 contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string contextName, 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 EdgeContextData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeContextData 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.WorkloadOrchestration.EdgeContextData 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 EdgeContextResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeContextResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeContextData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName) { 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.Response GetEdgeSiteReference(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSiteReferenceAsync(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceCollection GetEdgeSiteReferences() { throw null; } + public virtual Azure.Response GetEdgeWorkflow(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeWorkflowAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowCollection GetEdgeWorkflows() { 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.WorkloadOrchestration.EdgeContextData 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.WorkloadOrchestration.EdgeContextData 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.WorkloadOrchestration.Models.EdgeContextPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDeploymentInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDeploymentInstanceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string instanceName, Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string instanceName, Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string instanceName, 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 instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string instanceName, 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 EdgeDeploymentInstanceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDeploymentInstanceData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData 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.WorkloadOrchestration.EdgeDeploymentInstanceData 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 EdgeDeploymentInstanceHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDeploymentInstanceHistoryCollection() { } + public virtual Azure.Response Exists(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string instanceHistoryName, 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 instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string instanceHistoryName, 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 EdgeDeploymentInstanceHistoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeDeploymentInstanceHistoryData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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 EdgeDeploymentInstanceHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDeploymentInstanceHistoryResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, string instanceHistoryName) { 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData 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 EdgeDeploymentInstanceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDeploymentInstanceResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) { 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.WorkloadOrchestration.EdgeDeploymentInstanceHistoryCollection GetEdgeDeploymentInstanceHistories() { throw null; } + public virtual Azure.Response GetEdgeDeploymentInstanceHistory(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDeploymentInstanceHistoryAsync(string instanceHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData 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.WorkloadOrchestration.EdgeDeploymentInstanceData 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.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDiagnosticCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDiagnosticCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string diagnosticName, Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string diagnosticName, Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string diagnosticName, 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 diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string diagnosticName, 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 EdgeDiagnosticData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDiagnosticData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? EdgeDiagnosticProvisioningState { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData 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.WorkloadOrchestration.EdgeDiagnosticData 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 EdgeDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDiagnosticResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string diagnosticName) { 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.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.WorkloadOrchestration.EdgeDiagnosticData 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.WorkloadOrchestration.EdgeDiagnosticData 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.WorkloadOrchestration.Models.EdgeDiagnosticPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDynamicSchemaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDynamicSchemaCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dynamicSchemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dynamicSchemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dynamicSchemaName, 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 dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dynamicSchemaName, 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 EdgeDynamicSchemaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDynamicSchemaData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData 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.WorkloadOrchestration.EdgeDynamicSchemaData 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 EdgeDynamicSchemaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDynamicSchemaResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) { 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.Response GetEdgeDynamicSchemaVersion(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDynamicSchemaVersionAsync(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionCollection GetEdgeDynamicSchemaVersions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData 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.WorkloadOrchestration.EdgeDynamicSchemaData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeDynamicSchemaVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeDynamicSchemaVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dynamicSchemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dynamicSchemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dynamicSchemaVersionName, 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 dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dynamicSchemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dynamicSchemaVersionName, 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 EdgeDynamicSchemaVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDynamicSchemaVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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 EdgeDynamicSchemaVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeDynamicSchemaVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) { 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.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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.WorkloadOrchestration.EdgeDynamicSchemaVersionData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeExecutionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeExecutionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string executionName, Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string executionName, Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string executionName, 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 executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string executionName, 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 EdgeExecutionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeExecutionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData 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.WorkloadOrchestration.EdgeExecutionData 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 EdgeExecutionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeExecutionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName) { 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.WorkloadOrchestration.EdgeExecutionData 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.WorkloadOrchestration.EdgeExecutionData 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.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeJobCollection() { } + public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobName, 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 jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string jobName, 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 EdgeJobData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeJobData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeJobData 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.WorkloadOrchestration.EdgeJobData 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 EdgeJobResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeJobResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeJobData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string jobName) { 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.WorkloadOrchestration.EdgeJobData 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.WorkloadOrchestration.EdgeJobData 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 EdgeSchemaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSchemaCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schemaName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schemaName, 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 schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schemaName, 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 EdgeSchemaData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData 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.WorkloadOrchestration.EdgeSchemaData 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 EdgeSchemaReferenceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSchemaReferenceCollection() { } + public virtual Azure.Response Exists(string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schemaReferenceName, 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 schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schemaReferenceName, 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 EdgeSchemaReferenceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSchemaReferenceData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceData 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.WorkloadOrchestration.EdgeSchemaReferenceData 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 EdgeSchemaReferenceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSchemaReferenceResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string schemaReferenceName) { 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.WorkloadOrchestration.EdgeSchemaReferenceData 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.WorkloadOrchestration.EdgeSchemaReferenceData 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 EdgeSchemaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSchemaResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.Response GetEdgeDynamicSchema(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDynamicSchemaAsync(string dynamicSchemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaCollection GetEdgeDynamicSchemas() { throw null; } + public virtual Azure.Response GetEdgeSchemaVersion(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSchemaVersionAsync(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionCollection GetEdgeSchemaVersions() { 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 RemoveVersion(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveVersionAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, 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.WorkloadOrchestration.EdgeSchemaData 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.WorkloadOrchestration.EdgeSchemaData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSchemaVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSchemaVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schemaVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schemaVersionName, 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 schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schemaVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schemaVersionName, 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 EdgeSchemaVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData 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.WorkloadOrchestration.EdgeSchemaVersionData 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 EdgeSchemaVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSchemaVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) { 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.WorkloadOrchestration.EdgeSchemaVersionData 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.WorkloadOrchestration.EdgeSchemaVersionData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSiteReferenceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSiteReferenceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteReferenceName, Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteReferenceName, Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteReferenceName, 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 siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteReferenceName, 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 EdgeSiteReferenceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSiteReferenceData() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData 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.WorkloadOrchestration.EdgeSiteReferenceData 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 EdgeSiteReferenceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSiteReferenceResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName) { 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.WorkloadOrchestration.EdgeSiteReferenceData 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.WorkloadOrchestration.EdgeSiteReferenceData 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.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSolutionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionName, 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 solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionName, 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 EdgeSolutionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData 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.WorkloadOrchestration.EdgeSolutionData 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 EdgeSolutionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName) { 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.Response GetEdgeDeploymentInstance(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDeploymentInstanceAsync(string instanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceCollection GetEdgeDeploymentInstances() { throw null; } + public virtual Azure.Response GetEdgeSolutionVersion(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionVersionAsync(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionCollection GetEdgeSolutionVersions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData 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.WorkloadOrchestration.EdgeSolutionData 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.WorkloadOrchestration.Models.EdgeSolutionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSolutionTemplateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionTemplateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionTemplateName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionTemplateName, 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 solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionTemplateName, 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 EdgeSolutionTemplateData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData 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.WorkloadOrchestration.EdgeSolutionTemplateData 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 EdgeSolutionTemplateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionTemplateResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionTemplateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.Response GetEdgeSolutionTemplateVersion(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionTemplateVersionAsync(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionCollection GetEdgeSolutionTemplateVersions() { 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 RemoveVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RemoveVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent content, 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.WorkloadOrchestration.EdgeSolutionTemplateData 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.WorkloadOrchestration.EdgeSolutionTemplateData 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.Response Update(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeSolutionTemplateVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionTemplateVersionCollection() { } + public virtual Azure.Response Exists(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionTemplateVersionName, 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 solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionTemplateVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionTemplateVersionName, 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 EdgeSolutionTemplateVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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 EdgeSolutionTemplateVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionTemplateVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation BulkDeploySolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeploySolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BulkDeploySolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeploySolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation BulkPublishSolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BulkPublishSolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName) { 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.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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.WorkloadOrchestration.EdgeSolutionTemplateVersionData 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 EdgeSolutionVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeSolutionVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionVersionName, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionVersionName, 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 solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string solutionVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionVersionName, 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 EdgeSolutionVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData 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.WorkloadOrchestration.EdgeSolutionVersionData 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 EdgeSolutionVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeSolutionVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName) { 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.WorkloadOrchestration.EdgeSolutionVersionData 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.WorkloadOrchestration.EdgeSolutionVersionData 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.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeTargetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeTargetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string targetName, 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 targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string targetName, 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 EdgeTargetData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData 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.WorkloadOrchestration.EdgeTargetData 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 EdgeTargetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeTargetResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData 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 static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), 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 GetEdgeSolution(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionAsync(string solutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionCollection GetEdgeSolutions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation InstallSolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.InstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task InstallSolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.InstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PublishSolutionVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PublishSolutionVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RemoveRevision(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.RemoveRevisionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RemoveRevisionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.RemoveRevisionContent 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.ResourceManager.ArmOperation ResolveConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResolveConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ReviewSolutionVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReviewSolutionVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent content, 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.WorkloadOrchestration.EdgeTargetData 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.WorkloadOrchestration.EdgeTargetData 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 UninstallSolution(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UninstallSolutionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateExternalValidationStatus(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateExternalValidationStatusAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeWorkflowCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string workflowName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string workflowName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, 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 workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workflowName, 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 EdgeWorkflowData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData 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.WorkloadOrchestration.EdgeWorkflowData 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 EdgeWorkflowResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeWorkflowResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName) { 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.Response GetEdgeWorkflowVersion(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeWorkflowVersionAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionCollection GetEdgeWorkflowVersions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData 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.WorkloadOrchestration.EdgeWorkflowData 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.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EdgeWorkflowVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EdgeWorkflowVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string versionName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string versionName, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string versionName, 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 versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string versionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string versionName, 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 EdgeWorkflowVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowVersionData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData 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.WorkloadOrchestration.EdgeWorkflowVersionData 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 EdgeWorkflowVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EdgeWorkflowVersionResource() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) { 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.Response GetEdgeExecution(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeExecutionAsync(string executionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionCollection GetEdgeExecutions() { throw null; } + Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData 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.WorkloadOrchestration.EdgeWorkflowVersionData 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.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class WorkloadOrchestrationExtensions + { + public static Azure.Response GetEdgeConfigTemplate(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeConfigTemplateAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateResource GetEdgeConfigTemplateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateCollection GetEdgeConfigTemplates(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeConfigTemplates(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeConfigTemplatesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionResource GetEdgeConfigTemplateVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeContext(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeContextAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeContextResource GetEdgeContextResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeContextCollection GetEdgeContexts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeContexts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeContextsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryResource GetEdgeDeploymentInstanceHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceResource GetEdgeDeploymentInstanceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeDiagnostic(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeDiagnosticAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticResource GetEdgeDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticCollection GetEdgeDiagnostics(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeDiagnostics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeDiagnosticsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaResource GetEdgeDynamicSchemaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionResource GetEdgeDynamicSchemaVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionResource GetEdgeExecutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeJob(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeJobAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeJobResource GetEdgeJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeJobCollection GetEdgeJobs(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response GetEdgeSchema(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeSchemaAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetEdgeSchemaReference(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeSchemaReferenceAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceResource GetEdgeSchemaReferenceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceCollection GetEdgeSchemaReferences(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaResource GetEdgeSchemaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaCollection GetEdgeSchemas(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeSchemas(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeSchemasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionResource GetEdgeSchemaVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceResource GetEdgeSiteReferenceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionResource GetEdgeSolutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeSolutionTemplate(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeSolutionTemplateAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateResource GetEdgeSolutionTemplateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateCollection GetEdgeSolutionTemplates(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeSolutionTemplates(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeSolutionTemplatesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionResource GetEdgeSolutionTemplateVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionResource GetEdgeSolutionVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetEdgeTarget(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEdgeTargetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeTargetResource GetEdgeTargetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeTargetCollection GetEdgeTargets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeTargets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeTargetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowResource GetEdgeWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionResource GetEdgeWorkflowVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } +} +namespace Azure.ResourceManager.WorkloadOrchestration.Mocking +{ + public partial class MockableWorkloadOrchestrationArmClient : Azure.ResourceManager.ArmResource + { + protected MockableWorkloadOrchestrationArmClient() { } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateResource GetEdgeConfigTemplateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionResource GetEdgeConfigTemplateVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeContextResource GetEdgeContextResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryResource GetEdgeDeploymentInstanceHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceResource GetEdgeDeploymentInstanceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticResource GetEdgeDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaResource GetEdgeDynamicSchemaResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionResource GetEdgeDynamicSchemaVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionResource GetEdgeExecutionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.Response GetEdgeJob(Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeJobAsync(Azure.Core.ResourceIdentifier scope, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeJobResource GetEdgeJobResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeJobCollection GetEdgeJobs(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.Response GetEdgeSchemaReference(Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSchemaReferenceAsync(Azure.Core.ResourceIdentifier scope, string schemaReferenceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceResource GetEdgeSchemaReferenceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceCollection GetEdgeSchemaReferences(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaResource GetEdgeSchemaResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionResource GetEdgeSchemaVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceResource GetEdgeSiteReferenceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionResource GetEdgeSolutionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateResource GetEdgeSolutionTemplateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionResource GetEdgeSolutionTemplateVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionResource GetEdgeSolutionVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeTargetResource GetEdgeTargetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowResource GetEdgeWorkflowResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionResource GetEdgeWorkflowVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableWorkloadOrchestrationResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableWorkloadOrchestrationResourceGroupResource() { } + public virtual Azure.Response GetEdgeConfigTemplate(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeConfigTemplateAsync(string configTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateCollection GetEdgeConfigTemplates() { throw null; } + public virtual Azure.Response GetEdgeContext(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeContextAsync(string contextName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeContextCollection GetEdgeContexts() { throw null; } + public virtual Azure.Response GetEdgeDiagnostic(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeDiagnosticAsync(string diagnosticName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticCollection GetEdgeDiagnostics() { throw null; } + public virtual Azure.Response GetEdgeSchema(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSchemaAsync(string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaCollection GetEdgeSchemas() { throw null; } + public virtual Azure.Response GetEdgeSolutionTemplate(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeSolutionTemplateAsync(string solutionTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateCollection GetEdgeSolutionTemplates() { throw null; } + public virtual Azure.Response GetEdgeTarget(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEdgeTargetAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.WorkloadOrchestration.EdgeTargetCollection GetEdgeTargets() { throw null; } + } + public partial class MockableWorkloadOrchestrationSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableWorkloadOrchestrationSubscriptionResource() { } + public virtual Azure.Pageable GetEdgeConfigTemplates(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeConfigTemplatesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeContexts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeContextsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeDiagnostics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeDiagnosticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeSchemas(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeSchemasAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeSolutionTemplates(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeSolutionTemplatesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeTargets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeTargetsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + public static partial class ArmWorkloadOrchestrationModelFactory + { + public static Azure.ResourceManager.WorkloadOrchestration.Models.AvailableSolutionTemplateVersion AvailableSolutionTemplateVersion(string solutionTemplateVersion = null, string latestConfigRevision = null, bool isConfigured = false) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishTargetDetails BulkPublishTargetDetails(Azure.Core.ResourceIdentifier targetId = null, string solutionInstanceName = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType ConfigTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? updateType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType?), string version = null, Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData configTemplateVersion = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobContent DeployJobContent(Azure.Core.ResourceIdentifier parameterSolutionVersionId = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobStepStatistics DeployJobStepStatistics(int? totalCount = default(int?), int? successCount = default(int?), int? failedCount = default(int?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateData EdgeConfigTemplateData(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.WorkloadOrchestration.Models.EdgeConfigTemplateProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateProperties EdgeConfigTemplateProperties(string description = null, string latestVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData EdgeConfigTemplateVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties EdgeConfigTemplateVersionProperties(string configurations = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeContextData EdgeContextData(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.WorkloadOrchestration.Models.EdgeContextProperties properties = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextProperties EdgeContextProperties(System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable hierarchies = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceData EdgeDeploymentInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDeploymentInstanceHistoryData EdgeDeploymentInstanceHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties EdgeDeploymentInstanceHistoryProperties(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot solutionVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot target = null, string solutionScope = null, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? activeState = default(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState?), Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy reconciliationPolicy = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus status = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties EdgeDeploymentInstanceProperties(string solutionVersionId = null, string targetId = null, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? activeState = default(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState?), Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy reconciliationPolicy = null, string solutionScope = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus status = null, long? deploymentTimestampEpoch = default(long?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus EdgeDeploymentStatus(System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), int? deployed = default(int?), int? expectedRunningJobId = default(int?), int? runningJobId = default(int?), string status = null, string statusDetails = null, int? generation = default(int?), System.Collections.Generic.IEnumerable targetStatuses = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDiagnosticData EdgeDiagnosticData(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.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? edgeDiagnosticProvisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaData EdgeDynamicSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties EdgeDynamicSchemaProperties(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType? configurationType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType?), Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType? configurationModel = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeDynamicSchemaVersionData EdgeDynamicSchemaVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeExecutionData EdgeExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties EdgeExecutionProperties(string workflowVersionId = null, System.Collections.Generic.IDictionary specification = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus status = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStageStatus EdgeExecutionStageStatus(int? status = default(int?), string statusMessage = null, string stage = null, string nextstage = null, string errorMessage = null, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? isActive = default(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState?), System.Collections.Generic.IReadOnlyDictionary inputs = null, System.Collections.Generic.IReadOnlyDictionary outputs = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus EdgeExecutionStatus(System.DateTimeOffset? updateOn = default(System.DateTimeOffset?), int? status = default(int?), string statusMessage = null, System.Collections.Generic.IEnumerable stageHistory = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeJobData EdgeJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties EdgeJobProperties(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType jobType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus status = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus), Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent jobParameter = null, string correlationId = null, System.Collections.Generic.IEnumerable steps = null, string triggeredBy = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?), Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStep EdgeJobStep(string name = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus status = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string message = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics statistics = null, System.Collections.Generic.IEnumerable steps = null, Azure.ResponseError errorDetails = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaData EdgeSchemaData(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.WorkloadOrchestration.Models.EdgeSchemaProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaProperties EdgeSchemaProperties(string currentVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaReferenceData EdgeSchemaReferenceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties EdgeSchemaReferenceProperties(string schemaId = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData EdgeSchemaVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties EdgeSchemaVersionProperties(string value = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType EdgeSchemaVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? updateType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType?), string version = null, Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData schemaVersion = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSiteReferenceData EdgeSiteReferenceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties properties = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties EdgeSiteReferenceProperties(string siteId = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionData EdgeSolutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionDependency EdgeSolutionDependency(Azure.Core.ResourceIdentifier solutionVersionId = null, string solutionInstanceName = null, Azure.Core.ResourceIdentifier solutionTemplateVersionId = null, Azure.Core.ResourceIdentifier targetId = null, System.Collections.Generic.IEnumerable dependencies = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties EdgeSolutionProperties(string solutionTemplateId = null, System.Collections.Generic.IEnumerable availableSolutionTemplateVersions = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent EdgeSolutionTemplateContent(Azure.Core.ResourceIdentifier solutionTemplateVersionId = null, string solutionInstanceName = null, System.Collections.Generic.IEnumerable solutionDependencies = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateData EdgeSolutionTemplateData(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.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties EdgeSolutionTemplateProperties(string description = null, System.Collections.Generic.IEnumerable capabilities = null, string latestVersion = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState?), bool? isExternalValidationEnabled = default(bool?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData EdgeSolutionTemplateVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties EdgeSolutionTemplateVersionProperties(string configurations = null, System.Collections.Generic.IDictionary specification = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType? orchestratorType = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType EdgeSolutionTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? updateType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType?), string version = null, Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData solutionTemplateVersion = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionVersionData EdgeSolutionVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties EdgeSolutionVersionProperties(string solutionTemplateVersionId = null, int? revision = default(int?), string targetDisplayName = null, string configuration = null, string targetLevelConfiguration = null, System.Collections.Generic.IDictionary specification = null, string reviewId = null, string externalValidationId = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState?), string solutionInstanceName = null, System.Collections.Generic.IEnumerable solutionDependencies = null, Azure.ResponseError errorDetails = null, string latestActionTrackingUri = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType? actionType = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeTargetData EdgeTargetData(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.WorkloadOrchestration.Models.EdgeTargetProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetProperties EdgeTargetProperties(string description = null, string displayName = null, Azure.Core.ResourceIdentifier contextId = null, System.Collections.Generic.IDictionary targetSpecification = null, System.Collections.Generic.IEnumerable capabilities = null, string hierarchyLevel = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus status = null, string solutionScope = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState?), Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot EdgeTargetSnapshot(Azure.Core.ResourceIdentifier targetId = null, System.Collections.Generic.IReadOnlyDictionary targetSpecification = null, string solutionScope = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetStatus EdgeTargetStatus(string name = null, string status = null, System.Collections.Generic.IEnumerable componentStatuses = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowData EdgeWorkflowData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties EdgeWorkflowProperties(string workflowTemplateId = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.EdgeWorkflowVersionData EdgeWorkflowVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties EdgeWorkflowVersionProperties(int? revision = default(int?), string configuration = null, System.Collections.Generic.IEnumerable stageSpec = null, string reviewId = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? state = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState?), System.Collections.Generic.IDictionary specification = null, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? provisioningState = default(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.RemoveVersionResult RemoveVersionResult(string status = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.ResolvedConfiguration ResolvedConfiguration(string configuration = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot SolutionVersionSnapshot(Azure.Core.ResourceIdentifier solutionVersionId = null, System.Collections.Generic.IReadOnlyDictionary specification = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TargetComponentStatus TargetComponentStatus(string name = null, string status = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent UninstallSolutionContent(Azure.Core.ResourceIdentifier solutionTemplateId = null, string solutionInstanceName = null) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent UpdateExternalValidationStatusContent(Azure.Core.ResourceIdentifier solutionVersionId = null, Azure.ResponseError errorDetails = null, string externalValidationId = null, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus validationStatus = default(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus)) { throw null; } + } + public partial class AvailableSolutionTemplateVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AvailableSolutionTemplateVersion() { } + public bool IsConfigured { get { throw null; } } + public string LatestConfigRevision { get { throw null; } } + public string SolutionTemplateVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.AvailableSolutionTemplateVersion 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.WorkloadOrchestration.Models.AvailableSolutionTemplateVersion 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 BulkDeploySolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkDeploySolutionContent(System.Collections.Generic.IEnumerable targets) { } + public System.Collections.Generic.IList Targets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeploySolutionContent 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.WorkloadOrchestration.Models.BulkDeploySolutionContent 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 BulkDeployTargetDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkDeployTargetDetails(Azure.Core.ResourceIdentifier solutionVersionId) { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkDeployTargetDetails 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.WorkloadOrchestration.Models.BulkDeployTargetDetails 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 BulkPublishSolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkPublishSolutionContent(System.Collections.Generic.IEnumerable targets) { } + public System.Collections.Generic.IList SolutionDependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } set { } } + public System.Collections.Generic.IList Targets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishSolutionContent 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.WorkloadOrchestration.Models.BulkPublishSolutionContent 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 BulkPublishTargetDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BulkPublishTargetDetails(Azure.Core.ResourceIdentifier targetId) { } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.BulkPublishTargetDetails 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.WorkloadOrchestration.Models.BulkPublishTargetDetails 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 ConfigTemplateVersionWithUpdateType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConfigTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData configTemplateVersion) { } + public Azure.ResourceManager.WorkloadOrchestration.EdgeConfigTemplateVersionData ConfigTemplateVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? UpdateType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType 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.WorkloadOrchestration.Models.ConfigTemplateVersionWithUpdateType 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 ContextCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContextCapability(string name, string description) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ContextCapability 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.WorkloadOrchestration.Models.ContextCapability 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 ContextHierarchy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContextHierarchy(string name, string description) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ContextHierarchy 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.WorkloadOrchestration.Models.ContextHierarchy 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 DeployJobContent : Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeployJobContent() { } + public Azure.Core.ResourceIdentifier ParameterSolutionVersionId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobContent 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.WorkloadOrchestration.Models.DeployJobContent 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 DeployJobStepStatistics : Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeployJobStepStatistics() { } + public int? FailedCount { get { throw null; } } + public int? SuccessCount { get { throw null; } } + public int? TotalCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.DeployJobStepStatistics 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.WorkloadOrchestration.Models.DeployJobStepStatistics 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 EdgeConfigTemplatePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplatePatch() { } + public string ConfigTemplateUpdateDescription { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplatePatch 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.WorkloadOrchestration.Models.EdgeConfigTemplatePatch 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 EdgeConfigTemplateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateProperties(string description) { } + public string Description { get { throw null; } set { } } + public string LatestVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateProperties 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.WorkloadOrchestration.Models.EdgeConfigTemplateProperties 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 EdgeConfigTemplateVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeConfigTemplateVersionProperties(string configurations) { } + public string Configurations { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties 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.WorkloadOrchestration.Models.EdgeConfigTemplateVersionProperties 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 EdgeContextPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatch 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.WorkloadOrchestration.Models.EdgeContextPatch 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 EdgeContextPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextPatchProperties() { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public System.Collections.Generic.IList Hierarchies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextPatchProperties 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.WorkloadOrchestration.Models.EdgeContextPatchProperties 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 EdgeContextProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeContextProperties(System.Collections.Generic.IEnumerable capabilities, System.Collections.Generic.IEnumerable hierarchies) { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public System.Collections.Generic.IList Hierarchies { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeContextProperties 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.WorkloadOrchestration.Models.EdgeContextProperties 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 EdgeDeploymentInstanceHistoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeDeploymentInstanceHistoryProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? ActiveState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy ReconciliationPolicy { get { throw null; } } + public string SolutionScope { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot SolutionVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus Status { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties 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.WorkloadOrchestration.Models.EdgeDeploymentInstanceHistoryProperties 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 EdgeDeploymentInstanceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDeploymentInstanceProperties(string solutionVersionId, string targetId) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? ActiveState { get { throw null; } set { } } + public long? DeploymentTimestampEpoch { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy ReconciliationPolicy { get { throw null; } set { } } + public string SolutionScope { get { throw null; } set { } } + public string SolutionVersionId { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus Status { get { throw null; } } + public string TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties 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.WorkloadOrchestration.Models.EdgeDeploymentInstanceProperties 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 EdgeDeploymentStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeDeploymentStatus() { } + public int? Deployed { get { throw null; } } + public int? ExpectedRunningJobId { get { throw null; } } + public int? Generation { get { throw null; } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public int? RunningJobId { get { throw null; } } + public string Status { get { throw null; } } + public string StatusDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TargetStatuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus 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.WorkloadOrchestration.Models.EdgeDeploymentStatus 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 EdgeDiagnosticPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDiagnosticPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatch 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.WorkloadOrchestration.Models.EdgeDiagnosticPatch 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 EdgeDiagnosticPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDiagnosticPatchProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDiagnosticPatchProperties 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.WorkloadOrchestration.Models.EdgeDiagnosticPatchProperties 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 EdgeDynamicSchemaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeDynamicSchemaProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType? ConfigurationModel { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType? ConfigurationType { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties 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.WorkloadOrchestration.Models.EdgeDynamicSchemaProperties 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 EdgeExecutionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeExecutionProperties(string workflowVersionId) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus Status { get { throw null; } } + public string WorkflowVersionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionProperties 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.WorkloadOrchestration.Models.EdgeExecutionProperties 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 EdgeExecutionStageStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeExecutionStageStatus() { } + public string ErrorMessage { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Inputs { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState? IsActive { get { throw null; } } + public string Nextstage { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Outputs { get { throw null; } } + public string Stage { get { throw null; } } + public int? Status { get { throw null; } } + public string StatusMessage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStageStatus 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.WorkloadOrchestration.Models.EdgeExecutionStageStatus 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 EdgeExecutionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeExecutionStatus() { } + public System.Collections.Generic.IReadOnlyList StageHistory { get { throw null; } } + public int? Status { get { throw null; } } + public string StatusMessage { get { throw null; } } + public System.DateTimeOffset? UpdateOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeExecutionStatus 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.WorkloadOrchestration.Models.EdgeExecutionStatus 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 abstract partial class EdgeJobContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EdgeJobContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent 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.WorkloadOrchestration.Models.EdgeJobContent 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 EdgeJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeJobProperties() { } + public string CorrelationId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobContent JobParameter { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType JobType { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Steps { get { throw null; } } + public string TriggeredBy { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobProperties 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.WorkloadOrchestration.Models.EdgeJobProperties 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 EdgeJobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeJobStatus(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Failed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus InProgress { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus 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.WorkloadOrchestration.Models.EdgeJobStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EdgeJobStep : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeJobStep() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics Statistics { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Steps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStep 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.WorkloadOrchestration.Models.EdgeJobStep 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 abstract partial class EdgeJobStepStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EdgeJobStepStatistics() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobStepStatistics 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.WorkloadOrchestration.Models.EdgeJobStepStatistics 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 EdgeJobType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeJobType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType Deploy { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType ExternalValidation { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType Staging { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType 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.WorkloadOrchestration.Models.EdgeJobType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeResourceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeResourceState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState Active { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState 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.WorkloadOrchestration.Models.EdgeResourceState left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeSchemaConfigurationModelType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeSchemaConfigurationModelType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType Application { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType Common { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType 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.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationModelType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeSchemaConfigurationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeSchemaConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType Hierarchy { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType Shared { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType 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.WorkloadOrchestration.Models.EdgeSchemaConfigurationType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaConfigurationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EdgeSchemaPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatch 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.WorkloadOrchestration.Models.EdgeSchemaPatch 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 EdgeSchemaPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaPatchProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaPatchProperties 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.WorkloadOrchestration.Models.EdgeSchemaPatchProperties 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 EdgeSchemaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaProperties() { } + public string CurrentVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaProperties 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.WorkloadOrchestration.Models.EdgeSchemaProperties 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 EdgeSchemaReferenceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSchemaReferenceProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SchemaId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties 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.WorkloadOrchestration.Models.EdgeSchemaReferenceProperties 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 EdgeSchemaVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaVersionProperties(string value) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionProperties 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.WorkloadOrchestration.Models.EdgeSchemaVersionProperties 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 EdgeSchemaVersionWithUpdateType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSchemaVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData schemaVersion) { } + public Azure.ResourceManager.WorkloadOrchestration.EdgeSchemaVersionData SchemaVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? UpdateType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType 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.WorkloadOrchestration.Models.EdgeSchemaVersionWithUpdateType 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 EdgeSiteReferenceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSiteReferenceProperties(string siteId) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SiteId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSiteReferenceProperties 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.WorkloadOrchestration.Models.EdgeSiteReferenceProperties 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 EdgeSolutionDependency : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionDependency() { } + public System.Collections.Generic.IReadOnlyList Dependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } } + public Azure.Core.ResourceIdentifier SolutionTemplateVersionId { get { throw null; } } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionDependency 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.WorkloadOrchestration.Models.EdgeSolutionDependency 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 EdgeSolutionDependencyContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionDependencyContent() { } + public System.Collections.Generic.IList Dependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionTemplateId { get { throw null; } set { } } + public string SolutionTemplateVersion { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionDependencyContent 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.WorkloadOrchestration.Models.EdgeSolutionDependencyContent 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 EdgeSolutionPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatchProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatch 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.WorkloadOrchestration.Models.EdgeSolutionPatch 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 EdgeSolutionPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionPatchProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionPatchProperties 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.WorkloadOrchestration.Models.EdgeSolutionPatchProperties 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 EdgeSolutionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionProperties() { } + public System.Collections.Generic.IReadOnlyList AvailableSolutionTemplateVersions { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionProperties 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.WorkloadOrchestration.Models.EdgeSolutionProperties 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 EdgeSolutionTemplateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateContent(Azure.Core.ResourceIdentifier solutionTemplateVersionId) { } + public System.Collections.Generic.IList SolutionDependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionTemplateVersionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateContent 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.WorkloadOrchestration.Models.EdgeSolutionTemplateContent 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 EdgeSolutionTemplatePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplatePatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch 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.WorkloadOrchestration.Models.EdgeSolutionTemplatePatch 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 EdgeSolutionTemplatePatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplatePatchProperties() { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? IsExternalValidationEnabled { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplatePatchProperties 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.WorkloadOrchestration.Models.EdgeSolutionTemplatePatchProperties 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 EdgeSolutionTemplateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateProperties(string description, System.Collections.Generic.IEnumerable capabilities) { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? IsExternalValidationEnabled { get { throw null; } set { } } + public string LatestVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties 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.WorkloadOrchestration.Models.EdgeSolutionTemplateProperties 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 EdgeSolutionTemplateVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateVersionProperties(string configurations, System.Collections.Generic.IDictionary specification) { } + public string Configurations { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType? OrchestratorType { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties 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.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionProperties 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 EdgeSolutionTemplateVersionWithUpdateType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionTemplateVersionWithUpdateType(Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData solutionTemplateVersion) { } + public Azure.ResourceManager.WorkloadOrchestration.EdgeSolutionTemplateVersionData SolutionTemplateVersion { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType? UpdateType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType 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.WorkloadOrchestration.Models.EdgeSolutionTemplateVersionWithUpdateType 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 EdgeSolutionVersionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionVersionContent(Azure.Core.ResourceIdentifier solutionVersionId) { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionContent 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.WorkloadOrchestration.Models.EdgeSolutionVersionContent 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 EdgeSolutionVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeSolutionVersionProperties(System.Collections.Generic.IDictionary specification) { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeJobType? ActionType { get { throw null; } } + public string Configuration { get { throw null; } } + public Azure.ResponseError ErrorDetails { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string LatestActionTrackingUri { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string ReviewId { get { throw null; } } + public int? Revision { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SolutionDependencies { get { throw null; } } + public string SolutionInstanceName { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? State { get { throw null; } } + public string TargetDisplayName { get { throw null; } } + public string TargetLevelConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeSolutionVersionProperties 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.WorkloadOrchestration.Models.EdgeSolutionVersionProperties 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 EdgeTargetPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetPatch() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatchProperties Properties { 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) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatch 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.WorkloadOrchestration.Models.EdgeTargetPatch 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 EdgeTargetPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetPatchProperties() { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public Azure.Core.ResourceIdentifier ContextId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string HierarchyLevel { get { throw null; } set { } } + public string SolutionScope { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + public System.Collections.Generic.IDictionary TargetSpecification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetPatchProperties 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.WorkloadOrchestration.Models.EdgeTargetPatchProperties 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 EdgeTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeTargetProperties(string description, string displayName, Azure.Core.ResourceIdentifier contextId, System.Collections.Generic.IDictionary targetSpecification, System.Collections.Generic.IEnumerable capabilities, string hierarchyLevel) { } + public System.Collections.Generic.IList Capabilities { get { throw null; } } + public Azure.Core.ResourceIdentifier ContextId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string HierarchyLevel { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string SolutionScope { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeResourceState? State { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeDeploymentStatus Status { get { throw null; } } + public System.Collections.Generic.IDictionary TargetSpecification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetProperties 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.WorkloadOrchestration.Models.EdgeTargetProperties 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 EdgeTargetSnapshot : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeTargetSnapshot() { } + public string SolutionScope { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary TargetSpecification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetSnapshot 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.WorkloadOrchestration.Models.EdgeTargetSnapshot 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 EdgeTargetStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeTargetStatus() { } + public System.Collections.Generic.IReadOnlyList ComponentStatuses { get { throw null; } } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeTargetStatus 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.WorkloadOrchestration.Models.EdgeTargetStatus 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 EdgeUpdateType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeUpdateType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType Major { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType Minor { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType Patch { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType 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.WorkloadOrchestration.Models.EdgeUpdateType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType left, Azure.ResourceManager.WorkloadOrchestration.Models.EdgeUpdateType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EdgeVersionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeVersionContent(string version) { } + public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeVersionContent 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.WorkloadOrchestration.Models.EdgeVersionContent 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 EdgeWorkflowProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowProperties() { } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string WorkflowTemplateId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowProperties 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.WorkloadOrchestration.Models.EdgeWorkflowProperties 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 EdgeWorkflowStageSpec : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowStageSpec(string name) { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowTaskConfig TaskOption { get { throw null; } set { } } + public System.Collections.Generic.IList Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowStageSpec 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.WorkloadOrchestration.Models.EdgeWorkflowStageSpec 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 EdgeWorkflowTaskConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowTaskConfig() { } + public int? Concurrency { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorAction ErrorAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowTaskConfig 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.WorkloadOrchestration.Models.EdgeWorkflowTaskConfig 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 EdgeWorkflowTaskSpec : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowTaskSpec(string name, System.Collections.Generic.IDictionary specification) { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowTaskSpec 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.WorkloadOrchestration.Models.EdgeWorkflowTaskSpec 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 EdgeWorkflowVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeWorkflowVersionProperties(System.Collections.Generic.IEnumerable stageSpec) { } + public string Configuration { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState? ProvisioningState { get { throw null; } } + public string ReviewId { get { throw null; } } + public int? Revision { get { throw null; } } + public System.Collections.Generic.IDictionary Specification { get { throw null; } } + public System.Collections.Generic.IList StageSpec { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties 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.WorkloadOrchestration.Models.EdgeWorkflowVersionProperties 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 InstallSolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InstallSolutionContent(Azure.Core.ResourceIdentifier solutionVersionId) { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.InstallSolutionContent 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.WorkloadOrchestration.Models.InstallSolutionContent 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 InstanceActiveState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceActiveState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState Active { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState 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.WorkloadOrchestration.Models.InstanceActiveState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceActiveState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InstanceReconciliationPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InstanceReconciliationPolicy(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState state, string interval) { } + public string Interval { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationPolicy 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.WorkloadOrchestration.Models.InstanceReconciliationPolicy 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 InstanceReconciliationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceReconciliationState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState Active { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState 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.WorkloadOrchestration.Models.InstanceReconciliationState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState left, Azure.ResourceManager.WorkloadOrchestration.Models.InstanceReconciliationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RemoveRevisionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemoveRevisionContent(Azure.Core.ResourceIdentifier solutionTemplateId, string solutionVersion) { } + public Azure.Core.ResourceIdentifier SolutionTemplateId { get { throw null; } } + public string SolutionVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.RemoveRevisionContent 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.WorkloadOrchestration.Models.RemoveRevisionContent 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 RemoveVersionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RemoveVersionResult() { } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.RemoveVersionResult 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.WorkloadOrchestration.Models.RemoveVersionResult 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 ResolvedConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResolvedConfiguration() { } + public string Configuration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.ResolvedConfiguration 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.WorkloadOrchestration.Models.ResolvedConfiguration 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 SolutionInstanceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionInstanceState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Deployed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Deploying { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState ExternalValidationFailed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Failed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState InReview { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState PendingExternalValidation { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState ReadyToDeploy { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState ReadyToUpgrade { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Staging { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState Undeployed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState UpgradeInReview { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState 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.WorkloadOrchestration.Models.SolutionInstanceState left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SolutionInstanceValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionInstanceValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus Invalid { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus Valid { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus 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.WorkloadOrchestration.Models.SolutionInstanceValidationStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SolutionVersionOrchestratorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionVersionOrchestratorType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType TO { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType 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.WorkloadOrchestration.Models.SolutionVersionOrchestratorType left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType left, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionOrchestratorType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SolutionVersionSnapshot : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SolutionVersionSnapshot() { } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Specification { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.SolutionVersionSnapshot 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.WorkloadOrchestration.Models.SolutionVersionSnapshot 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 TargetComponentStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TargetComponentStatus() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.TargetComponentStatus 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.WorkloadOrchestration.Models.TargetComponentStatus 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 TaskErrorAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskErrorAction() { } + public int? MaxToleratedFailures { get { throw null; } set { } } + public Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorAction 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.WorkloadOrchestration.Models.TaskErrorAction 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 TaskErrorActionModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TaskErrorActionModeType(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType SilentlyContinue { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType StopOnAnyFailure { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType StopOnNFailures { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType 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.WorkloadOrchestration.Models.TaskErrorActionModeType left, Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType left, Azure.ResourceManager.WorkloadOrchestration.Models.TaskErrorActionModeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UninstallSolutionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UninstallSolutionContent(Azure.Core.ResourceIdentifier solutionTemplateId) { } + public string SolutionInstanceName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SolutionTemplateId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.UninstallSolutionContent 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.WorkloadOrchestration.Models.UninstallSolutionContent 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 UpdateExternalValidationStatusContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UpdateExternalValidationStatusContent(Azure.Core.ResourceIdentifier solutionVersionId, string externalValidationId, Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus validationStatus) { } + public Azure.ResponseError ErrorDetails { get { throw null; } set { } } + public string ExternalValidationId { get { throw null; } } + public Azure.Core.ResourceIdentifier SolutionVersionId { get { throw null; } } + public Azure.ResourceManager.WorkloadOrchestration.Models.SolutionInstanceValidationStatus ValidationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent 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.WorkloadOrchestration.Models.UpdateExternalValidationStatusContent 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 WorkloadOrchestrationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkloadOrchestrationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Initialized { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Inprogress { get { throw null; } } + public static Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState 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.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState left, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState left, Azure.ResourceManager.WorkloadOrchestration.Models.WorkloadOrchestrationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/assets.json b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/assets.json new file mode 100644 index 000000000000..75b5408f10f8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/storageactions/Azure.ResourceManager.WorkloadOrchestration", + "Tag": "net/storageactions/Azure.ResourceManager.WorkloadOrchestration_4597f97952" +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Azure.ResourceManager.WorkloadOrchestration.csproj b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Azure.ResourceManager.WorkloadOrchestration.csproj new file mode 100644 index 000000000000..d4260fabd970 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Azure.ResourceManager.WorkloadOrchestration.csproj @@ -0,0 +1,10 @@ + + + 1.1.0-beta.1 + + 1.0.0 + Azure.ResourceManager.WorkloadOrchestration + Azure Resource Manager client SDK for Azure resource provider InformaticaDataManagement. + azure;management;arm;resource manager;informaticadatamanagement + + diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeContextPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeContextPatchProperties.cs new file mode 100644 index 000000000000..e046ba605172 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeContextPatchProperties.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the Context. + [CodeGenModel("ContextUpdateProperties")] + public partial class EdgeContextPatchProperties + { + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeSolutionTemplatePatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeSolutionTemplatePatchProperties.cs new file mode 100644 index 000000000000..51965d13e1d6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeSolutionTemplatePatchProperties.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the SolutionTemplate. + [CodeGenModel("SolutionTemplateUpdateProperties")] + public partial class EdgeSolutionTemplatePatchProperties + { + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeTargetPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeTargetPatchProperties.cs new file mode 100644 index 000000000000..89cf317c38c4 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Custom/Models/EdgeTargetPatchProperties.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the Target. + [CodeGenModel("TargetUpdateProperties")] + public partial class EdgeTargetPatchProperties + { + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/ArmWorkloadOrchestrationModelFactory.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/ArmWorkloadOrchestrationModelFactory.cs new file mode 100644 index 000000000000..77bd531a73f4 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/ArmWorkloadOrchestrationModelFactory.cs @@ -0,0 +1,1089 @@ +// 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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Model factory for models. + public static partial class ArmWorkloadOrchestrationModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeDynamicSchemaData EdgeDynamicSchemaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeDynamicSchemaProperties properties = null, ETag? etag = null) + { + return new EdgeDynamicSchemaData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Type of configuration. + /// Type of configuration model. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeDynamicSchemaProperties EdgeDynamicSchemaProperties(EdgeSchemaConfigurationType? configurationType = null, EdgeSchemaConfigurationModelType? configurationModel = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeDynamicSchemaProperties(configurationType, configurationModel, provisioningState, serializedAdditionalRawData: 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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSchemaData EdgeSchemaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeSchemaProperties properties = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new EdgeSchemaData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Current Version of schema. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSchemaProperties EdgeSchemaProperties(string currentVersion = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeSchemaProperties(currentVersion, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Update type. + /// Version to create. + /// Schema Version. + /// A new instance for mocking. + public static EdgeSchemaVersionWithUpdateType EdgeSchemaVersionWithUpdateType(EdgeUpdateType? updateType = null, string version = null, EdgeSchemaVersionData schemaVersion = null) + { + return new EdgeSchemaVersionWithUpdateType(updateType, version, schemaVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSchemaVersionData EdgeSchemaVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSchemaVersionProperties properties = null, ETag? etag = null) + { + return new EdgeSchemaVersionData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Value of schema version. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSchemaVersionProperties EdgeSchemaVersionProperties(string value = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeSchemaVersionProperties(value, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Status for remove version response. + /// A new instance for mocking. + public static RemoveVersionResult RemoveVersionResult(string status = null) + { + return new RemoveVersionResult(status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSolutionVersionData EdgeSolutionVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSolutionVersionProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeSolutionVersionData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution Template Version Id. + /// Revision number of resolved config for this solution version. + /// Name of applicable target's display name. + /// Resolved configuration values. + /// Configuration on the line level across all solution template versions. + /// App components spec. + /// Review id of resolved config for this solution version. + /// External validation id. + /// State of solution instance. + /// Solution instance name. + /// Solution Dependency Context. + /// Error Details if any failure is there. + /// The URI for tracking the latest action performed on this solution version. + /// The type of the latest action performed on this solution version. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSolutionVersionProperties EdgeSolutionVersionProperties(string solutionTemplateVersionId = null, int? revision = null, string targetDisplayName = null, string configuration = null, string targetLevelConfiguration = null, IDictionary specification = null, string reviewId = null, string externalValidationId = null, SolutionInstanceState? state = null, string solutionInstanceName = null, IEnumerable solutionDependencies = null, ResponseError errorDetails = null, string latestActionTrackingUri = null, EdgeJobType? actionType = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + specification ??= new Dictionary(); + solutionDependencies ??= new List(); + + return new EdgeSolutionVersionProperties( + solutionTemplateVersionId, + revision, + targetDisplayName, + configuration, + targetLevelConfiguration, + specification, + reviewId, + externalValidationId, + state, + solutionInstanceName, + solutionDependencies?.ToList(), + errorDetails, + latestActionTrackingUri, + actionType, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution Version Id. + /// Solution Instance Name. + /// Solution Template Version Id. + /// Target Id. + /// Solution dependencies. + /// A new instance for mocking. + public static EdgeSolutionDependency EdgeSolutionDependency(ResourceIdentifier solutionVersionId = null, string solutionInstanceName = null, ResourceIdentifier solutionTemplateVersionId = null, ResourceIdentifier targetId = null, IEnumerable dependencies = null) + { + dependencies ??= new List(); + + return new EdgeSolutionDependency( + solutionVersionId, + solutionInstanceName, + solutionTemplateVersionId, + targetId, + dependencies?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeJobData EdgeJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeJobProperties properties = null, ETag? etag = null) + { + return new EdgeJobData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of job. + /// Start time of the job (ISO8601). + /// End time of the job (ISO8601). + /// Status of the job. + /// + /// Parameters for the job. + /// 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 . + /// + /// Correlation ID for tracking. + /// Steps and substatuses for the job. + /// The OID or identity that triggered the job. + /// Provisioning state of the resource. + /// Error Details if any failure is there. + /// A new instance for mocking. + public static EdgeJobProperties EdgeJobProperties(EdgeJobType jobType = default, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, EdgeJobStatus status = default, EdgeJobContent jobParameter = null, string correlationId = null, IEnumerable steps = null, string triggeredBy = null, WorkloadOrchestrationProvisioningState? provisioningState = null, ResponseError errorDetails = null) + { + steps ??= new List(); + + return new EdgeJobProperties( + jobType, + startOn, + endOn, + status, + jobParameter, + correlationId, + steps?.ToList(), + triggeredBy, + provisioningState, + errorDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// A new instance for mocking. + public static DeployJobContent DeployJobContent(ResourceIdentifier parameterSolutionVersionId = null) + { + return new DeployJobContent(EdgeJobType.Deploy, serializedAdditionalRawData: null, parameterSolutionVersionId != null ? new InstallSolutionContent(parameterSolutionVersionId, serializedAdditionalRawData: null) : null); + } + + /// Initializes a new instance of . + /// Name of the step. + /// Status of the step. + /// Start time of the step (ISO8601). + /// End time of the step (ISO8601). + /// Message for the step. + /// + /// Statistics for the step + /// 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 . + /// + /// Nested substeps for this step. + /// Error Details if any failure is there. + /// A new instance for mocking. + public static EdgeJobStep EdgeJobStep(string name = null, EdgeJobStatus status = default, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string message = null, EdgeJobStepStatistics statistics = null, IEnumerable steps = null, ResponseError errorDetails = null) + { + steps ??= new List(); + + return new EdgeJobStep( + name, + status, + startOn, + endOn, + message, + statistics, + steps?.ToList(), + errorDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Total count of items processed in this step. + /// Count of successful items in this step. + /// Count of failed items in this step. + /// A new instance for mocking. + public static DeployJobStepStatistics DeployJobStepStatistics(int? totalCount = null, int? successCount = null, int? failedCount = null) + { + return new DeployJobStepStatistics(EdgeJobType.Deploy, serializedAdditionalRawData: null, totalCount, successCount, failedCount); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// + /// A new instance for mocking. + public static EdgeTargetData EdgeTargetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeTargetProperties properties = null, ETag? etag = null, ExtendedLocation extendedLocation = null) + { + tags ??= new Dictionary(); + + return new EdgeTargetData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Description of target. + /// Display name of target. + /// ArmId of Context. + /// target spec. + /// List of capabilities. + /// Hierarchy Level. + /// Status of target. + /// Scope of the target resource. + /// State of resource. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeTargetProperties EdgeTargetProperties(string description = null, string displayName = null, ResourceIdentifier contextId = null, IDictionary targetSpecification = null, IEnumerable capabilities = null, string hierarchyLevel = null, EdgeDeploymentStatus status = null, string solutionScope = null, EdgeResourceState? state = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + targetSpecification ??= new Dictionary(); + capabilities ??= new List(); + + return new EdgeTargetProperties( + description, + displayName, + contextId, + targetSpecification, + capabilities?.ToList(), + hierarchyLevel, + status, + solutionScope, + state, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The lastModified of the Status. + /// Indicates if Instance is deployed. + /// The expected running job id. + /// The running job id. + /// Deployment status. + /// Status details. + /// Deployment Generation. + /// Target resource statuses. + /// A new instance for mocking. + public static EdgeDeploymentStatus EdgeDeploymentStatus(DateTimeOffset? lastModified = null, int? deployed = null, int? expectedRunningJobId = null, int? runningJobId = null, string status = null, string statusDetails = null, int? generation = null, IEnumerable targetStatuses = null) + { + targetStatuses ??= new List(); + + return new EdgeDeploymentStatus( + lastModified, + deployed, + expectedRunningJobId, + runningJobId, + status, + statusDetails, + generation, + targetStatuses?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Target name. + /// Target status. + /// Component statuses. + /// A new instance for mocking. + public static EdgeTargetStatus EdgeTargetStatus(string name = null, string status = null, IEnumerable componentStatuses = null) + { + componentStatuses ??= new List(); + + return new EdgeTargetStatus(name, status, componentStatuses?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Component name. + /// Component status. + /// A new instance for mocking. + public static TargetComponentStatus TargetComponentStatus(string name = null, string status = null) + { + return new TargetComponentStatus(name, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution Template ARM Id. + /// Solution Instance Name. + /// A new instance for mocking. + public static UninstallSolutionContent UninstallSolutionContent(ResourceIdentifier solutionTemplateId = null, string solutionInstanceName = null) + { + return new UninstallSolutionContent(solutionTemplateId, solutionInstanceName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution Template Version ARM Id. + /// Solution Instance Name. + /// Solution Dependencies. + /// A new instance for mocking. + public static EdgeSolutionTemplateContent EdgeSolutionTemplateContent(ResourceIdentifier solutionTemplateVersionId = null, string solutionInstanceName = null, IEnumerable solutionDependencies = null) + { + solutionDependencies ??= new List(); + + return new EdgeSolutionTemplateContent(solutionTemplateVersionId, solutionInstanceName, solutionDependencies?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resolved Configuration as string. + /// A new instance for mocking. + public static ResolvedConfiguration ResolvedConfiguration(string configuration = null) + { + return new ResolvedConfiguration(configuration, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution Version Id. + /// Error Details if any failure is there. + /// External validation id. + /// Validation Status of external validation. + /// A new instance for mocking. + public static UpdateExternalValidationStatusContent UpdateExternalValidationStatusContent(ResourceIdentifier solutionVersionId = null, ResponseError errorDetails = null, string externalValidationId = null, SolutionInstanceValidationStatus validationStatus = default) + { + return new UpdateExternalValidationStatusContent(solutionVersionId, errorDetails, externalValidationId, validationStatus, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeDynamicSchemaVersionData EdgeDynamicSchemaVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSchemaVersionProperties properties = null, ETag? etag = null) + { + return new EdgeDynamicSchemaVersionData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSchemaReferenceData EdgeSchemaReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSchemaReferenceProperties properties = null, ETag? etag = null) + { + return new EdgeSchemaReferenceData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Schema Id of schema reference. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSchemaReferenceProperties EdgeSchemaReferenceProperties(string schemaId = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeSchemaReferenceProperties(schemaId, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSolutionData EdgeSolutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSolutionProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeSolutionData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution template Id. + /// List of latest revisions for available solution template versions. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSolutionProperties EdgeSolutionProperties(string solutionTemplateId = null, IEnumerable availableSolutionTemplateVersions = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + availableSolutionTemplateVersions ??= new List(); + + return new EdgeSolutionProperties(solutionTemplateId, availableSolutionTemplateVersions?.ToList(), provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution template Version. + /// Latest Configuration Revision. + /// Has this solution template version been configured. + /// A new instance for mocking. + public static AvailableSolutionTemplateVersion AvailableSolutionTemplateVersion(string solutionTemplateVersion = null, string latestConfigRevision = null, bool isConfigured = default) + { + return new AvailableSolutionTemplateVersion(solutionTemplateVersion, latestConfigRevision, isConfigured, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSolutionTemplateVersionData EdgeSolutionTemplateVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSolutionTemplateVersionProperties properties = null, ETag? etag = null) + { + return new EdgeSolutionTemplateVersionData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Config expressions for this solution version. + /// App components spec. + /// Orchestrator type. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSolutionTemplateVersionProperties EdgeSolutionTemplateVersionProperties(string configurations = null, IDictionary specification = null, SolutionVersionOrchestratorType? orchestratorType = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + specification ??= new Dictionary(); + + return new EdgeSolutionTemplateVersionProperties(configurations, specification, orchestratorType, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ArmId of Target. + /// Name of the solution instance. + /// A new instance for mocking. + public static BulkPublishTargetDetails BulkPublishTargetDetails(ResourceIdentifier targetId = null, string solutionInstanceName = null) + { + return new BulkPublishTargetDetails(targetId, solutionInstanceName, serializedAdditionalRawData: 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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeSolutionTemplateData EdgeSolutionTemplateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeSolutionTemplateProperties properties = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new EdgeSolutionTemplateData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Description of Solution template. + /// List of capabilities. + /// Latest solution template version. + /// State of resource. + /// Flag to enable external validation. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeSolutionTemplateProperties EdgeSolutionTemplateProperties(string description = null, IEnumerable capabilities = null, string latestVersion = null, EdgeResourceState? state = null, bool? isExternalValidationEnabled = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + capabilities ??= new List(); + + return new EdgeSolutionTemplateProperties( + description, + capabilities?.ToList(), + latestVersion, + state, + isExternalValidationEnabled, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Update type. + /// Version to create. + /// Solution Template Version. + /// A new instance for mocking. + public static EdgeSolutionTemplateVersionWithUpdateType EdgeSolutionTemplateVersionWithUpdateType(EdgeUpdateType? updateType = null, string version = null, EdgeSolutionTemplateVersionData solutionTemplateVersion = null) + { + return new EdgeSolutionTemplateVersionWithUpdateType(updateType, version, solutionTemplateVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeDeploymentInstanceData EdgeDeploymentInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeDeploymentInstanceProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeDeploymentInstanceData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution version of instance. + /// Target of instance. + /// State of instance. + /// Reconciliation policy of instance. + /// Scope of instance. + /// Status of instance. + /// Deployment timestamp of instance. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeDeploymentInstanceProperties EdgeDeploymentInstanceProperties(string solutionVersionId = null, string targetId = null, InstanceActiveState? activeState = null, InstanceReconciliationPolicy reconciliationPolicy = null, string solutionScope = null, EdgeDeploymentStatus status = null, long? deploymentTimestampEpoch = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeDeploymentInstanceProperties( + solutionVersionId, + targetId, + activeState, + reconciliationPolicy, + solutionScope, + status, + deploymentTimestampEpoch, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeDeploymentInstanceHistoryData EdgeDeploymentInstanceHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeDeploymentInstanceHistoryProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeDeploymentInstanceHistoryData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution version of instance. + /// Target of instance. + /// Scope of instance. + /// State of instance. + /// Reconciliation policy of instance. + /// Deployment Status of instance. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeDeploymentInstanceHistoryProperties EdgeDeploymentInstanceHistoryProperties(SolutionVersionSnapshot solutionVersion = null, EdgeTargetSnapshot target = null, string solutionScope = null, InstanceActiveState? activeState = null, InstanceReconciliationPolicy reconciliationPolicy = null, EdgeDeploymentStatus status = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeDeploymentInstanceHistoryProperties( + solutionVersion, + target, + solutionScope, + activeState, + reconciliationPolicy, + status, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Solution version of instance. + /// App components spec. + /// A new instance for mocking. + public static SolutionVersionSnapshot SolutionVersionSnapshot(ResourceIdentifier solutionVersionId = null, IReadOnlyDictionary specification = null) + { + specification ??= new Dictionary(); + + return new SolutionVersionSnapshot(solutionVersionId, specification, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Target of instance. + /// target spec. + /// Scope of the target resource. + /// A new instance for mocking. + public static EdgeTargetSnapshot EdgeTargetSnapshot(ResourceIdentifier targetId = null, IReadOnlyDictionary targetSpecification = null, string solutionScope = null) + { + targetSpecification ??= new Dictionary(); + + return new EdgeTargetSnapshot(targetId, targetSpecification, solutionScope, serializedAdditionalRawData: 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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeConfigTemplateData EdgeConfigTemplateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeConfigTemplateProperties properties = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new EdgeConfigTemplateData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Description of config template. + /// Latest config template version. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeConfigTemplateProperties EdgeConfigTemplateProperties(string description = null, string latestVersion = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeConfigTemplateProperties(description, latestVersion, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Update type. + /// Version to create. + /// Config Template Version. + /// A new instance for mocking. + public static ConfigTemplateVersionWithUpdateType ConfigTemplateVersionWithUpdateType(EdgeUpdateType? updateType = null, string version = null, EdgeConfigTemplateVersionData configTemplateVersion = null) + { + return new ConfigTemplateVersionWithUpdateType(updateType, version, configTemplateVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeConfigTemplateVersionData EdgeConfigTemplateVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeConfigTemplateVersionProperties properties = null, ETag? etag = null) + { + return new EdgeConfigTemplateVersionData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Configuration values. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeConfigTemplateVersionProperties EdgeConfigTemplateVersionProperties(string configurations = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeConfigTemplateVersionProperties(configurations, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeWorkflowData EdgeWorkflowData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeWorkflowProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeWorkflowData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Workflow template Id. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeWorkflowProperties EdgeWorkflowProperties(string workflowTemplateId = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeWorkflowProperties(workflowTemplateId, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeWorkflowVersionData EdgeWorkflowVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeWorkflowVersionProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeWorkflowVersionData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Revision number of resolved config for this workflow version. + /// Resolved configuration values. + /// A list of stage specs. + /// Review id of resolved config for this workflow version. + /// State of workflow version. + /// Execution specification. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeWorkflowVersionProperties EdgeWorkflowVersionProperties(int? revision = null, string configuration = null, IEnumerable stageSpec = null, string reviewId = null, SolutionInstanceState? state = null, IDictionary specification = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + stageSpec ??= new List(); + specification ??= new Dictionary(); + + return new EdgeWorkflowVersionProperties( + revision, + configuration, + stageSpec?.ToList(), + reviewId, + state, + specification, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeExecutionData EdgeExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeExecutionProperties properties = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + return new EdgeExecutionData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Workflow version of execution. + /// Execution specification. + /// Status of Execution. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeExecutionProperties EdgeExecutionProperties(string workflowVersionId = null, IDictionary specification = null, EdgeExecutionStatus status = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + specification ??= new Dictionary(); + + return new EdgeExecutionProperties(workflowVersionId, specification, status, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The lastModified timestamp of the Status. + /// Deployment status. + /// status details. + /// target resource statuses. + /// A new instance for mocking. + public static EdgeExecutionStatus EdgeExecutionStatus(DateTimeOffset? updateOn = null, int? status = null, string statusMessage = null, IEnumerable stageHistory = null) + { + stageHistory ??= new List(); + + return new EdgeExecutionStatus(updateOn, status, statusMessage, stageHistory?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Deployment status. + /// Status message. + /// Current stage. + /// Next stage. + /// Error message. + /// whether this stage is active or inactive. + /// The inputs of the StageHistory, Inputs holds a key-value map of user-defined parameters for the initial stage. + /// The outputs of the StageHistory, it is different as the different input stages. + /// A new instance for mocking. + public static EdgeExecutionStageStatus EdgeExecutionStageStatus(int? status = null, string statusMessage = null, string stage = null, string nextstage = null, string errorMessage = null, InstanceActiveState? isActive = null, IReadOnlyDictionary inputs = null, IReadOnlyDictionary outputs = null) + { + inputs ??= new Dictionary(); + outputs ??= new Dictionary(); + + return new EdgeExecutionStageStatus( + status, + statusMessage, + stage, + nextstage, + errorMessage, + isActive, + inputs, + outputs, + serializedAdditionalRawData: 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. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// A new instance for mocking. + public static EdgeDiagnosticData EdgeDiagnosticData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WorkloadOrchestrationProvisioningState? edgeDiagnosticProvisioningState = null, ExtendedLocation extendedLocation = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new EdgeDiagnosticData( + id, + name, + resourceType, + systemData, + tags, + location, + edgeDiagnosticProvisioningState != null ? new EdgeDiagnosticProperties(edgeDiagnosticProvisioningState, serializedAdditionalRawData: null) : null, + extendedLocation, + etag, + serializedAdditionalRawData: 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. + /// A new instance for mocking. + public static EdgeContextData EdgeContextData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeContextProperties properties = null) + { + tags ??= new Dictionary(); + + return new EdgeContextData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// List of Capabilities. + /// List of Hierarchies. + /// Provisioning state of resource. + /// A new instance for mocking. + public static EdgeContextProperties EdgeContextProperties(IEnumerable capabilities = null, IEnumerable hierarchies = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + capabilities ??= new List(); + hierarchies ??= new List(); + + return new EdgeContextProperties(capabilities?.ToList(), hierarchies?.ToList(), provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static EdgeSiteReferenceData EdgeSiteReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EdgeSiteReferenceProperties properties = null) + { + return new EdgeSiteReferenceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure Resource ID for Site. + /// Provisioning State. + /// A new instance for mocking. + public static EdgeSiteReferenceProperties EdgeSiteReferenceProperties(string siteId = null, WorkloadOrchestrationProvisioningState? provisioningState = null) + { + return new EdgeSiteReferenceProperties(siteId, provisioningState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateCollection.cs new file mode 100644 index 000000000000..88c0ea5e11ff --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateCollection.cs @@ -0,0 +1,494 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeConfigTemplates method from an instance of . + /// + public partial class EdgeConfigTemplateCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeConfigTemplateConfigTemplatesClientDiagnostics; + private readonly ConfigTemplatesRestOperations _edgeConfigTemplateConfigTemplatesRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeConfigTemplateCollection() + { + } + + /// 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 EdgeConfigTemplateCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeConfigTemplateConfigTemplatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeConfigTemplateResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeConfigTemplateResource.ResourceType, out string edgeConfigTemplateConfigTemplatesApiVersion); + _edgeConfigTemplateConfigTemplatesRestClient = new ConfigTemplatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeConfigTemplateConfigTemplatesApiVersion); +#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 Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 ConfigTemplate. + /// 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 configTemplateName, EdgeConfigTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeConfigTemplateOperationSource(Client), _edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, _edgeConfigTemplateConfigTemplatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, 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 Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 ConfigTemplate. + /// 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 configTemplateName, EdgeConfigTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeConfigTemplateOperationSource(Client), _edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, _edgeConfigTemplateConfigTemplatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.Get"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.Get"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates + /// + /// + /// Operation Id + /// ConfigTemplate_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeConfigTemplateConfigTemplatesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeConfigTemplateConfigTemplatesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeConfigTemplateResource(Client, EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(e)), _edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, "EdgeConfigTemplateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates + /// + /// + /// Operation Id + /// ConfigTemplate_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeConfigTemplateConfigTemplatesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeConfigTemplateConfigTemplatesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeConfigTemplateResource(Client, EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(e)), _edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, "EdgeConfigTemplateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, 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.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.Exists"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, 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.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateResource(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.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, configTemplateName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateData.Serialization.cs new file mode 100644 index 000000000000..fc2505e8bdf6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateData.Serialization.cs @@ -0,0 +1,195 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeConfigTemplateData : 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(EdgeConfigTemplateData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeConfigTemplateData 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(EdgeConfigTemplateData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeConfigTemplateData(document.RootElement, options); + } + + internal static EdgeConfigTemplateData DeserializeEdgeConfigTemplateData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeConfigTemplateProperties properties = default; + ETag? etag = 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 = EdgeConfigTemplateProperties.DeserializeEdgeConfigTemplateProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeConfigTemplateData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateData)} does not support writing '{options.Format}' format."); + } + } + + EdgeConfigTemplateData 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 DeserializeEdgeConfigTemplateData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateData.cs new file mode 100644 index 000000000000..419a6bf19391 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateData.cs @@ -0,0 +1,87 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeConfigTemplate data model. + /// Config Template Resource. Contains configuration expressions using the predefined expression language. + /// + public partial class EdgeConfigTemplateData : 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 EdgeConfigTemplateData(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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeConfigTemplateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeConfigTemplateProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeConfigTemplateData() + { + } + + /// The resource-specific properties for this resource. + public EdgeConfigTemplateProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateResource.Serialization.cs new file mode 100644 index 000000000000..54f43bfa9b84 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeConfigTemplateResource : IJsonModel + { + private static EdgeConfigTemplateData s_dataDeserializationInstance; + private static EdgeConfigTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeConfigTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeConfigTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateResource.cs new file mode 100644 index 000000000000..78d219f828b9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateResource.cs @@ -0,0 +1,944 @@ +// 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.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeConfigTemplate along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeConfigTemplateResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeConfigTemplate method. + /// + public partial class EdgeConfigTemplateResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The configTemplateName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string configTemplateName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeConfigTemplateConfigTemplatesClientDiagnostics; + private readonly ConfigTemplatesRestOperations _edgeConfigTemplateConfigTemplatesRestClient; + private readonly EdgeConfigTemplateData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/configTemplates"; + + /// Initializes a new instance of the class for mocking. + protected EdgeConfigTemplateResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeConfigTemplateResource(ArmClient client, EdgeConfigTemplateData 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 EdgeConfigTemplateResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeConfigTemplateConfigTemplatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeConfigTemplateConfigTemplatesApiVersion); + _edgeConfigTemplateConfigTemplatesRestClient = new ConfigTemplatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeConfigTemplateConfigTemplatesApiVersion); +#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 EdgeConfigTemplateData 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 EdgeConfigTemplateVersionResources in the EdgeConfigTemplate. + /// An object representing collection of EdgeConfigTemplateVersionResources and their operations over a EdgeConfigTemplateVersionResource. + public virtual EdgeConfigTemplateVersionCollection GetEdgeConfigTemplateVersions() + { + return GetCachedClient(client => new EdgeConfigTemplateVersionCollection(client, Id)); + } + + /// + /// Get a Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeConfigTemplateVersionAsync(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + return await GetEdgeConfigTemplateVersions().GetAsync(configTemplateVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeConfigTemplateVersion(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + return GetEdgeConfigTemplateVersions().Get(configTemplateVersionName, cancellationToken); + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.Get"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.Get"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.Delete"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, _edgeConfigTemplateConfigTemplatesRestClient.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 Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.Delete"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, _edgeConfigTemplateConfigTemplatesRestClient.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 Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EdgeConfigTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.Update"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeConfigTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EdgeConfigTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.Update"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new EdgeConfigTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a Config Template Version Resource with the specified UpdateType + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/createVersion + /// + /// + /// Operation Id + /// ConfigTemplates_CreateVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateVersionAsync(WaitUntil waitUntil, ConfigTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.CreateVersion"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.CreateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeConfigTemplateVersionOperationSource(Client), _edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, _edgeConfigTemplateConfigTemplatesRestClient.CreateCreateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a Config Template Version Resource with the specified UpdateType + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/createVersion + /// + /// + /// Operation Id + /// ConfigTemplates_CreateVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateVersion(WaitUntil waitUntil, ConfigTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.CreateVersion"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.CreateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeConfigTemplateVersionOperationSource(Client), _edgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, _edgeConfigTemplateConfigTemplatesRestClient.CreateCreateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/removeVersion + /// + /// + /// Operation Id + /// ConfigTemplates_RemoveVersion + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveVersionAsync(EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.RemoveVersion"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateConfigTemplatesRestClient.RemoveVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/removeVersion + /// + /// + /// Operation Id + /// ConfigTemplates_RemoveVersion + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveVersion(EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.RemoveVersion"); + scope.Start(); + try + { + var response = _edgeConfigTemplateConfigTemplatesRestClient.RemoveVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.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 _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeConfigTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeConfigTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.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 = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeConfigTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeConfigTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.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 _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeConfigTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeConfigTemplatePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.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 = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeConfigTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeConfigTemplatePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.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 _edgeConfigTemplateConfigTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeConfigTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeConfigTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeConfigTemplateConfigTemplatesClientDiagnostics.CreateScope("EdgeConfigTemplateResource.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 = _edgeConfigTemplateConfigTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeConfigTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeConfigTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionCollection.cs new file mode 100644 index 000000000000..144cdb1df95e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionCollection.cs @@ -0,0 +1,395 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeConfigTemplateVersions method from an instance of . + /// + public partial class EdgeConfigTemplateVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics; + private readonly ConfigTemplateVersionsRestOperations _edgeConfigTemplateVersionConfigTemplateVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeConfigTemplateVersionCollection() + { + } + + /// 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 EdgeConfigTemplateVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeConfigTemplateVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeConfigTemplateVersionResource.ResourceType, out string edgeConfigTemplateVersionConfigTemplateVersionsApiVersion); + _edgeConfigTemplateVersionConfigTemplateVersionsRestClient = new ConfigTemplateVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeConfigTemplateVersionConfigTemplateVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeConfigTemplateResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeConfigTemplateResource.ResourceType), nameof(id)); + } + + /// + /// Get a Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configTemplateVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionCollection.Get"); + scope.Start(); + try + { + var response = _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configTemplateVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Config Template Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions + /// + /// + /// Operation Id + /// ConfigTemplateVersion_ListByConfigTemplate + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.CreateListByConfigTemplateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.CreateListByConfigTemplateNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeConfigTemplateVersionResource(Client, EdgeConfigTemplateVersionData.DeserializeEdgeConfigTemplateVersionData(e)), _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics, Pipeline, "EdgeConfigTemplateVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Config Template Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions + /// + /// + /// Operation Id + /// ConfigTemplateVersion_ListByConfigTemplate + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.CreateListByConfigTemplateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.CreateListByConfigTemplateNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeConfigTemplateVersionResource(Client, EdgeConfigTemplateVersionData.DeserializeEdgeConfigTemplateVersionData(e)), _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics, Pipeline, "EdgeConfigTemplateVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configTemplateVersionName, 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.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configTemplateVersionName, 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.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configTemplateVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateVersionResource(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.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configTemplateVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateVersionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionData.Serialization.cs new file mode 100644 index 000000000000..caf5d04ec355 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeConfigTemplateVersionData : 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(EdgeConfigTemplateVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeConfigTemplateVersionData 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(EdgeConfigTemplateVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeConfigTemplateVersionData(document.RootElement, options); + } + + internal static EdgeConfigTemplateVersionData DeserializeEdgeConfigTemplateVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeConfigTemplateVersionProperties properties = default; + ETag? etag = 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 = EdgeConfigTemplateVersionProperties.DeserializeEdgeConfigTemplateVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeConfigTemplateVersionData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateVersionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeConfigTemplateVersionData 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 DeserializeEdgeConfigTemplateVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionData.cs new file mode 100644 index 000000000000..a70a90669004 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeConfigTemplateVersion data model. + /// Config Template Version Resource + /// + public partial class EdgeConfigTemplateVersionData : 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 EdgeConfigTemplateVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeConfigTemplateVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeConfigTemplateVersionProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeConfigTemplateVersionProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionResource.Serialization.cs new file mode 100644 index 000000000000..eae21818a6cd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeConfigTemplateVersionResource : IJsonModel + { + private static EdgeConfigTemplateVersionData s_dataDeserializationInstance; + private static EdgeConfigTemplateVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeConfigTemplateVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeConfigTemplateVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionResource.cs new file mode 100644 index 000000000000..c1cb5b7d1dac --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeConfigTemplateVersionResource.cs @@ -0,0 +1,171 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeConfigTemplateVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeConfigTemplateVersionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeConfigTemplateVersion method. + /// + public partial class EdgeConfigTemplateVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The configTemplateName. + /// The configTemplateVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string configTemplateName, string configTemplateVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics; + private readonly ConfigTemplateVersionsRestOperations _edgeConfigTemplateVersionConfigTemplateVersionsRestClient; + private readonly EdgeConfigTemplateVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/configTemplates/versions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeConfigTemplateVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeConfigTemplateVersionResource(ArmClient client, EdgeConfigTemplateVersionData 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 EdgeConfigTemplateVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeConfigTemplateVersionConfigTemplateVersionsApiVersion); + _edgeConfigTemplateVersionConfigTemplateVersionsRestClient = new ConfigTemplateVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeConfigTemplateVersionConfigTemplateVersionsApiVersion); +#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 EdgeConfigTemplateVersionData 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 Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionResource.Get"); + scope.Start(); + try + { + var response = await _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.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 EdgeConfigTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Config Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName}/versions/{configTemplateVersionName} + /// + /// + /// Operation Id + /// ConfigTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeConfigTemplateVersionConfigTemplateVersionsClientDiagnostics.CreateScope("EdgeConfigTemplateVersionResource.Get"); + scope.Start(); + try + { + var response = _edgeConfigTemplateVersionConfigTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeConfigTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextCollection.cs new file mode 100644 index 000000000000..c98796d0ee2f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextCollection.cs @@ -0,0 +1,494 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeContexts method from an instance of . + /// + public partial class EdgeContextCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeContextContextsClientDiagnostics; + private readonly ContextsRestOperations _edgeContextContextsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeContextCollection() + { + } + + /// 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 EdgeContextCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeContextContextsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeContextResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeContextResource.ResourceType, out string edgeContextContextsApiVersion); + _edgeContextContextsRestClient = new ContextsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeContextContextsApiVersion); +#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 Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 Context. + /// 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 contextName, EdgeContextData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, contextName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeContextOperationSource(Client), _edgeContextContextsClientDiagnostics, Pipeline, _edgeContextContextsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, contextName, 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 Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 Context. + /// 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 contextName, EdgeContextData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, contextName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeContextOperationSource(Client), _edgeContextContextsClientDiagnostics, Pipeline, _edgeContextContextsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, contextName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.Get"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, contextName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeContextResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.Get"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, contextName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeContextResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts + /// + /// + /// Operation Id + /// Context_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeContextContextsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeContextContextsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeContextResource(Client, EdgeContextData.DeserializeEdgeContextData(e)), _edgeContextContextsClientDiagnostics, Pipeline, "EdgeContextCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts + /// + /// + /// Operation Id + /// Context_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeContextContextsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeContextContextsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeContextResource(Client, EdgeContextData.DeserializeEdgeContextData(e)), _edgeContextContextsClientDiagnostics, Pipeline, "EdgeContextCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, contextName, 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.Exists"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, contextName, 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, contextName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeContextResource(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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, contextName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeContextResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextData.Serialization.cs new file mode 100644 index 000000000000..40686e93ebe1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextData.Serialization.cs @@ -0,0 +1,179 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeContextData : 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(EdgeContextData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EdgeContextData 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(EdgeContextData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeContextData(document.RootElement, options); + } + + internal static EdgeContextData DeserializeEdgeContextData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeContextProperties 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 = EdgeContextProperties.DeserializeEdgeContextProperties(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeContextData( + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeContextData)} does not support writing '{options.Format}' format."); + } + } + + EdgeContextData 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 DeserializeEdgeContextData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeContextData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextData.cs new file mode 100644 index 000000000000..113355d9bbda --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextData.cs @@ -0,0 +1,83 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeContext data model. + /// Context Resource + /// + public partial class EdgeContextData : 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 EdgeContextData(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 EdgeContextData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeContextProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeContextData() + { + } + + /// The resource-specific properties for this resource. + public EdgeContextProperties Properties { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextResource.Serialization.cs new file mode 100644 index 000000000000..851e4e41d2cb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeContextResource : IJsonModel + { + private static EdgeContextData s_dataDeserializationInstance; + private static EdgeContextData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeContextData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeContextData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextResource.cs new file mode 100644 index 000000000000..8b07eff96323 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeContextResource.cs @@ -0,0 +1,845 @@ +// 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.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeContext along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeContextResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeContext method. + /// + public partial class EdgeContextResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The contextName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeContextContextsClientDiagnostics; + private readonly ContextsRestOperations _edgeContextContextsRestClient; + private readonly EdgeContextData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/contexts"; + + /// Initializes a new instance of the class for mocking. + protected EdgeContextResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeContextResource(ArmClient client, EdgeContextData 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 EdgeContextResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeContextContextsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeContextContextsApiVersion); + _edgeContextContextsRestClient = new ContextsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeContextContextsApiVersion); +#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 EdgeContextData 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 EdgeWorkflowResources in the EdgeContext. + /// An object representing collection of EdgeWorkflowResources and their operations over a EdgeWorkflowResource. + public virtual EdgeWorkflowCollection GetEdgeWorkflows() + { + return GetCachedClient(client => new EdgeWorkflowCollection(client, Id)); + } + + /// + /// Get a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeWorkflowAsync(string workflowName, CancellationToken cancellationToken = default) + { + return await GetEdgeWorkflows().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeWorkflow(string workflowName, CancellationToken cancellationToken = default) + { + return GetEdgeWorkflows().Get(workflowName, cancellationToken); + } + + /// Gets a collection of EdgeSiteReferenceResources in the EdgeContext. + /// An object representing collection of EdgeSiteReferenceResources and their operations over a EdgeSiteReferenceResource. + public virtual EdgeSiteReferenceCollection GetEdgeSiteReferences() + { + return GetCachedClient(client => new EdgeSiteReferenceCollection(client, Id)); + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSiteReferenceAsync(string siteReferenceName, CancellationToken cancellationToken = default) + { + return await GetEdgeSiteReferences().GetAsync(siteReferenceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSiteReference(string siteReferenceName, CancellationToken cancellationToken = default) + { + return GetEdgeSiteReferences().Get(siteReferenceName, cancellationToken); + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.Get"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeContextResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.Get"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeContextResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.Delete"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeContextContextsClientDiagnostics, Pipeline, _edgeContextContextsRestClient.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 Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.Delete"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeContextContextsClientDiagnostics, Pipeline, _edgeContextContextsRestClient.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 an Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeContextPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.Update"); + scope.Start(); + try + { + var response = await _edgeContextContextsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeContextOperationSource(Client), _edgeContextContextsClientDiagnostics, Pipeline, _edgeContextContextsRestClient.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 an Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeContextPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.Update"); + scope.Start(); + try + { + var response = _edgeContextContextsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeContextOperationSource(Client), _edgeContextContextsClientDiagnostics, Pipeline, _edgeContextContextsRestClient.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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.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 _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeContextResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeContextPatch(); + 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.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 = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeContextResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeContextPatch(); + 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.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 _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeContextResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeContextPatch(); + 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.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 = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeContextResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeContextPatch(); + 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.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 _edgeContextContextsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeContextResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeContextPatch(); + 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.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeContextContextsClientDiagnostics.CreateScope("EdgeContextResource.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 = _edgeContextContextsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeContextResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeContextPatch(); + 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceCollection.cs new file mode 100644 index 000000000000..e1cc2b66c7ad --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeDeploymentInstances method from an instance of . + /// + public partial class EdgeDeploymentInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeDeploymentInstanceInstancesClientDiagnostics; + private readonly InstancesRestOperations _edgeDeploymentInstanceInstancesRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeDeploymentInstanceCollection() + { + } + + /// 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 EdgeDeploymentInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDeploymentInstanceInstancesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeDeploymentInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeDeploymentInstanceResource.ResourceType, out string edgeDeploymentInstanceInstancesApiVersion); + _edgeDeploymentInstanceInstancesRestClient = new InstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDeploymentInstanceInstancesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeSolutionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeSolutionResource.ResourceType), nameof(id)); + } + + /// + /// Create or update Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the instance. + /// 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 instanceName, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDeploymentInstanceOperationSource(Client), _edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, _edgeDeploymentInstanceInstancesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, 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 Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the instance. + /// 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 instanceName, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDeploymentInstanceOperationSource(Client), _edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, _edgeDeploymentInstanceInstancesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.Get"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Instance Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances + /// + /// + /// Operation Id + /// Instance_ListBySolution + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDeploymentInstanceInstancesRestClient.CreateListBySolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDeploymentInstanceInstancesRestClient.CreateListBySolutionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeDeploymentInstanceResource(Client, EdgeDeploymentInstanceData.DeserializeEdgeDeploymentInstanceData(e)), _edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, "EdgeDeploymentInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Instance Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances + /// + /// + /// Operation Id + /// Instance_ListBySolution + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDeploymentInstanceInstancesRestClient.CreateListBySolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDeploymentInstanceInstancesRestClient.CreateListBySolutionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeDeploymentInstanceResource(Client, EdgeDeploymentInstanceData.DeserializeEdgeDeploymentInstanceData(e)), _edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, "EdgeDeploymentInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, 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.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, 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.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceResource(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.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, instanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceData.Serialization.cs new file mode 100644 index 000000000000..3d55be124c5a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeDeploymentInstanceData : 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(EdgeDeploymentInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeDeploymentInstanceData 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(EdgeDeploymentInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDeploymentInstanceData(document.RootElement, options); + } + + internal static EdgeDeploymentInstanceData DeserializeEdgeDeploymentInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeDeploymentInstanceProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeDeploymentInstanceProperties.DeserializeEdgeDeploymentInstanceProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDeploymentInstanceData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceData)} does not support writing '{options.Format}' format."); + } + } + + EdgeDeploymentInstanceData 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 DeserializeEdgeDeploymentInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceData.cs new file mode 100644 index 000000000000..8521abdbb4cc --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeDeploymentInstance data model. + /// Instance Resource. Represents a deployment object. + /// + public partial class EdgeDeploymentInstanceData : 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 EdgeDeploymentInstanceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeDeploymentInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeDeploymentInstanceProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeDeploymentInstanceProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryCollection.cs new file mode 100644 index 000000000000..0c10bd7c720f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryCollection.cs @@ -0,0 +1,395 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeDeploymentInstanceHistories method from an instance of . + /// + public partial class EdgeDeploymentInstanceHistoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics; + private readonly InstanceHistoriesRestOperations _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeDeploymentInstanceHistoryCollection() + { + } + + /// 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 EdgeDeploymentInstanceHistoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeDeploymentInstanceHistoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeDeploymentInstanceHistoryResource.ResourceType, out string edgeDeploymentInstanceHistoryInstanceHistoriesApiVersion); + _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient = new InstanceHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDeploymentInstanceHistoryInstanceHistoriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeDeploymentInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeDeploymentInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Get InstanceHistory Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryCollection.Get"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, instanceHistoryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get InstanceHistory Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryCollection.Get"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, instanceHistoryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List InstanceHistory Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories + /// + /// + /// Operation Id + /// InstanceHistory_ListByInstance + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.CreateListByInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.CreateListByInstanceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeDeploymentInstanceHistoryResource(Client, EdgeDeploymentInstanceHistoryData.DeserializeEdgeDeploymentInstanceHistoryData(e)), _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics, Pipeline, "EdgeDeploymentInstanceHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List InstanceHistory Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories + /// + /// + /// Operation Id + /// InstanceHistory_ListByInstance + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.CreateListByInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.CreateListByInstanceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeDeploymentInstanceHistoryResource(Client, EdgeDeploymentInstanceHistoryData.DeserializeEdgeDeploymentInstanceHistoryData(e)), _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics, Pipeline, "EdgeDeploymentInstanceHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, instanceHistoryName, 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.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryCollection.Exists"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, instanceHistoryName, 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.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, instanceHistoryName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceHistoryResource(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.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, instanceHistoryName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceHistoryResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryData.Serialization.cs new file mode 100644 index 000000000000..3665df045baf --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeDeploymentInstanceHistoryData : 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(EdgeDeploymentInstanceHistoryData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeDeploymentInstanceHistoryData 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(EdgeDeploymentInstanceHistoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDeploymentInstanceHistoryData(document.RootElement, options); + } + + internal static EdgeDeploymentInstanceHistoryData DeserializeEdgeDeploymentInstanceHistoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeDeploymentInstanceHistoryProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeDeploymentInstanceHistoryProperties.DeserializeEdgeDeploymentInstanceHistoryProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDeploymentInstanceHistoryData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceHistoryData)} does not support writing '{options.Format}' format."); + } + } + + EdgeDeploymentInstanceHistoryData 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 DeserializeEdgeDeploymentInstanceHistoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceHistoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryData.cs new file mode 100644 index 000000000000..a76aef04e3fd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeDeploymentInstanceHistory data model. + /// InstanceHistory Resource + /// + public partial class EdgeDeploymentInstanceHistoryData : 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 . + internal EdgeDeploymentInstanceHistoryData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeDeploymentInstanceHistoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeDeploymentInstanceHistoryProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeDeploymentInstanceHistoryProperties Properties { get; } + /// Gets the extended location. + public ExtendedLocation ExtendedLocation { get; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryResource.Serialization.cs new file mode 100644 index 000000000000..1caada7743f9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeDeploymentInstanceHistoryResource : IJsonModel + { + private static EdgeDeploymentInstanceHistoryData s_dataDeserializationInstance; + private static EdgeDeploymentInstanceHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeDeploymentInstanceHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeDeploymentInstanceHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryResource.cs new file mode 100644 index 000000000000..29c6b493e8f6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceHistoryResource.cs @@ -0,0 +1,173 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeDeploymentInstanceHistory along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeDeploymentInstanceHistoryResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeDeploymentInstanceHistory method. + /// + public partial class EdgeDeploymentInstanceHistoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The targetName. + /// The solutionName. + /// The instanceName. + /// The instanceHistoryName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, string instanceHistoryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics; + private readonly InstanceHistoriesRestOperations _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient; + private readonly EdgeDeploymentInstanceHistoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/targets/solutions/instances/histories"; + + /// Initializes a new instance of the class for mocking. + protected EdgeDeploymentInstanceHistoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeDeploymentInstanceHistoryResource(ArmClient client, EdgeDeploymentInstanceHistoryData 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 EdgeDeploymentInstanceHistoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeDeploymentInstanceHistoryInstanceHistoriesApiVersion); + _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient = new InstanceHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDeploymentInstanceHistoryInstanceHistoriesApiVersion); +#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 EdgeDeploymentInstanceHistoryData 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 InstanceHistory Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryResource.Get"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get InstanceHistory Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeDeploymentInstanceHistoryInstanceHistoriesClientDiagnostics.CreateScope("EdgeDeploymentInstanceHistoryResource.Get"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceHistoryInstanceHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceResource.Serialization.cs new file mode 100644 index 000000000000..62962885452c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeDeploymentInstanceResource : IJsonModel + { + private static EdgeDeploymentInstanceData s_dataDeserializationInstance; + private static EdgeDeploymentInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeDeploymentInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeDeploymentInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceResource.cs new file mode 100644 index 000000000000..f11fb825235a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDeploymentInstanceResource.cs @@ -0,0 +1,417 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeDeploymentInstance along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeDeploymentInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeDeploymentInstance method. + /// + public partial class EdgeDeploymentInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The targetName. + /// The solutionName. + /// The instanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeDeploymentInstanceInstancesClientDiagnostics; + private readonly InstancesRestOperations _edgeDeploymentInstanceInstancesRestClient; + private readonly EdgeDeploymentInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/targets/solutions/instances"; + + /// Initializes a new instance of the class for mocking. + protected EdgeDeploymentInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeDeploymentInstanceResource(ArmClient client, EdgeDeploymentInstanceData 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 EdgeDeploymentInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDeploymentInstanceInstancesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeDeploymentInstanceInstancesApiVersion); + _edgeDeploymentInstanceInstancesRestClient = new InstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDeploymentInstanceInstancesApiVersion); +#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 EdgeDeploymentInstanceData 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 EdgeDeploymentInstanceHistoryResources in the EdgeDeploymentInstance. + /// An object representing collection of EdgeDeploymentInstanceHistoryResources and their operations over a EdgeDeploymentInstanceHistoryResource. + public virtual EdgeDeploymentInstanceHistoryCollection GetEdgeDeploymentInstanceHistories() + { + return GetCachedClient(client => new EdgeDeploymentInstanceHistoryCollection(client, Id)); + } + + /// + /// Get InstanceHistory Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeDeploymentInstanceHistoryAsync(string instanceHistoryName, CancellationToken cancellationToken = default) + { + return await GetEdgeDeploymentInstanceHistories().GetAsync(instanceHistoryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get InstanceHistory Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName}/histories/{instanceHistoryName} + /// + /// + /// Operation Id + /// InstanceHistory_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance history. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeDeploymentInstanceHistory(string instanceHistoryName, CancellationToken cancellationToken = default) + { + return GetEdgeDeploymentInstanceHistories().Get(instanceHistoryName, cancellationToken); + } + + /// + /// Get Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceResource.Get"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceResource.Get"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDeploymentInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, _edgeDeploymentInstanceInstancesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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 Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceResource.Delete"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, _edgeDeploymentInstanceInstancesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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; + } + } + + /// + /// Update an Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceResource.Update"); + scope.Start(); + try + { + var response = await _edgeDeploymentInstanceInstancesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDeploymentInstanceOperationSource(Client), _edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, _edgeDeploymentInstanceInstancesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.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 an Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDeploymentInstanceInstancesClientDiagnostics.CreateScope("EdgeDeploymentInstanceResource.Update"); + scope.Start(); + try + { + var response = _edgeDeploymentInstanceInstancesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDeploymentInstanceOperationSource(Client), _edgeDeploymentInstanceInstancesClientDiagnostics, Pipeline, _edgeDeploymentInstanceInstancesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticCollection.cs new file mode 100644 index 000000000000..5170a1dae391 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticCollection.cs @@ -0,0 +1,494 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeDiagnostics method from an instance of . + /// + public partial class EdgeDiagnosticCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeDiagnosticDiagnosticsClientDiagnostics; + private readonly DiagnosticsRestOperations _edgeDiagnosticDiagnosticsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeDiagnosticCollection() + { + } + + /// 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 EdgeDiagnosticCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDiagnosticDiagnosticsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeDiagnosticResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeDiagnosticResource.ResourceType, out string edgeDiagnosticDiagnosticsApiVersion); + _edgeDiagnosticDiagnosticsRestClient = new DiagnosticsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDiagnosticDiagnosticsApiVersion); +#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)); + } + + /// + /// Creates new or updates existing Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of Diagnostic. + /// 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 diagnosticName, EdgeDiagnosticData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDiagnosticOperationSource(Client), _edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, _edgeDiagnosticDiagnosticsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates new or updates existing Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of Diagnostic. + /// 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 diagnosticName, EdgeDiagnosticData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDiagnosticOperationSource(Client), _edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, _edgeDiagnosticDiagnosticsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.Get"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.Get"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns a collection of Diagnostic resources within the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics + /// + /// + /// Operation Id + /// Diagnostic_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDiagnosticDiagnosticsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDiagnosticDiagnosticsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeDiagnosticResource(Client, EdgeDiagnosticData.DeserializeEdgeDiagnosticData(e)), _edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, "EdgeDiagnosticCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns a collection of Diagnostic resources within the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics + /// + /// + /// Operation Id + /// Diagnostic_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDiagnosticDiagnosticsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDiagnosticDiagnosticsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeDiagnosticResource(Client, EdgeDiagnosticData.DeserializeEdgeDiagnosticData(e)), _edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, "EdgeDiagnosticCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.Exists"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDiagnosticResource(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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, diagnosticName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDiagnosticResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticData.Serialization.cs new file mode 100644 index 000000000000..0938bcb232e2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticData.Serialization.cs @@ -0,0 +1,212 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeDiagnosticData : 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(EdgeDiagnosticData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeDiagnosticData 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(EdgeDiagnosticData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDiagnosticData(document.RootElement, options); + } + + internal static EdgeDiagnosticData DeserializeEdgeDiagnosticData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeDiagnosticProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeDiagnosticProperties.DeserializeEdgeDiagnosticProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDiagnosticData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticData)} does not support writing '{options.Format}' format."); + } + } + + EdgeDiagnosticData 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 DeserializeEdgeDiagnosticData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticData.cs new file mode 100644 index 000000000000..9262fc48e790 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticData.cs @@ -0,0 +1,98 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeDiagnostic data model. + /// A Diagnostic resource. + /// + public partial class EdgeDiagnosticData : 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 EdgeDiagnosticData(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. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeDiagnosticData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeDiagnosticProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeDiagnosticData() + { + } + + /// The resource-specific properties for this resource. + internal EdgeDiagnosticProperties Properties { get; set; } + /// The status of the last operation. + public WorkloadOrchestrationProvisioningState? EdgeDiagnosticProvisioningState + { + get => Properties is null ? default : Properties.ProvisioningState; + } + + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticResource.Serialization.cs new file mode 100644 index 000000000000..f506dcfefa55 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeDiagnosticResource : IJsonModel + { + private static EdgeDiagnosticData s_dataDeserializationInstance; + private static EdgeDiagnosticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticResource.cs new file mode 100644 index 000000000000..af7691a89d6f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDiagnosticResource.cs @@ -0,0 +1,707 @@ +// 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.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeDiagnostic along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeDiagnosticResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeDiagnostic method. + /// + public partial class EdgeDiagnosticResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The diagnosticName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string diagnosticName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeDiagnosticDiagnosticsClientDiagnostics; + private readonly DiagnosticsRestOperations _edgeDiagnosticDiagnosticsRestClient; + private readonly EdgeDiagnosticData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/diagnostics"; + + /// Initializes a new instance of the class for mocking. + protected EdgeDiagnosticResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeDiagnosticResource(ArmClient client, EdgeDiagnosticData 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 EdgeDiagnosticResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDiagnosticDiagnosticsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeDiagnosticDiagnosticsApiVersion); + _edgeDiagnosticDiagnosticsRestClient = new DiagnosticsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDiagnosticDiagnosticsApiVersion); +#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 EdgeDiagnosticData 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)); + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.Get"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.Get"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.Delete"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, _edgeDiagnosticDiagnosticsRestClient.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; + } + } + + /// + /// Deletes specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.Delete"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, _edgeDiagnosticDiagnosticsRestClient.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; + } + } + + /// + /// Updates existing Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeDiagnosticPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.Update"); + scope.Start(); + try + { + var response = await _edgeDiagnosticDiagnosticsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDiagnosticOperationSource(Client), _edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, _edgeDiagnosticDiagnosticsRestClient.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; + } + } + + /// + /// Updates existing Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeDiagnosticPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.Update"); + scope.Start(); + try + { + var response = _edgeDiagnosticDiagnosticsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDiagnosticOperationSource(Client), _edgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, _edgeDiagnosticDiagnosticsRestClient.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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.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 _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeDiagnosticResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeDiagnosticPatch(); + 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.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 = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeDiagnosticResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeDiagnosticPatch(); + 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.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 _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeDiagnosticResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeDiagnosticPatch(); + 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.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 = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeDiagnosticResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeDiagnosticPatch(); + 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.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 _edgeDiagnosticDiagnosticsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeDiagnosticResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeDiagnosticPatch(); + 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.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDiagnosticDiagnosticsClientDiagnostics.CreateScope("EdgeDiagnosticResource.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 = _edgeDiagnosticDiagnosticsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeDiagnosticResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeDiagnosticPatch(); + 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaCollection.cs new file mode 100644 index 000000000000..2f96da1e705c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeDynamicSchemas method from an instance of . + /// + public partial class EdgeDynamicSchemaCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeDynamicSchemaDynamicSchemasClientDiagnostics; + private readonly DynamicSchemasRestOperations _edgeDynamicSchemaDynamicSchemasRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeDynamicSchemaCollection() + { + } + + /// 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 EdgeDynamicSchemaCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDynamicSchemaDynamicSchemasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeDynamicSchemaResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeDynamicSchemaResource.ResourceType, out string edgeDynamicSchemaDynamicSchemasApiVersion); + _edgeDynamicSchemaDynamicSchemasRestClient = new DynamicSchemasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDynamicSchemaDynamicSchemasApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeSchemaResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeSchemaResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 DynamicSchema. + /// 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 dynamicSchemaName, EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDynamicSchemaOperationSource(Client), _edgeDynamicSchemaDynamicSchemasClientDiagnostics, Pipeline, _edgeDynamicSchemaDynamicSchemasRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, 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 DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 DynamicSchema. + /// 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 dynamicSchemaName, EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDynamicSchemaOperationSource(Client), _edgeDynamicSchemaDynamicSchemasClientDiagnostics, Pipeline, _edgeDynamicSchemaDynamicSchemasRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.Get"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.Get"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by Schema + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas + /// + /// + /// Operation Id + /// DynamicSchema_ListBySchema + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDynamicSchemaDynamicSchemasRestClient.CreateListBySchemaRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDynamicSchemaDynamicSchemasRestClient.CreateListBySchemaNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeDynamicSchemaResource(Client, EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(e)), _edgeDynamicSchemaDynamicSchemasClientDiagnostics, Pipeline, "EdgeDynamicSchemaCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by Schema + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas + /// + /// + /// Operation Id + /// DynamicSchema_ListBySchema + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDynamicSchemaDynamicSchemasRestClient.CreateListBySchemaRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDynamicSchemaDynamicSchemasRestClient.CreateListBySchemaNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeDynamicSchemaResource(Client, EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(e)), _edgeDynamicSchemaDynamicSchemasClientDiagnostics, Pipeline, "EdgeDynamicSchemaCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, 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.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.Exists"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, 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.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaResource(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.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dynamicSchemaName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaData.Serialization.cs new file mode 100644 index 000000000000..1904a3712ee4 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeDynamicSchemaData : 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(EdgeDynamicSchemaData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeDynamicSchemaData 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(EdgeDynamicSchemaData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDynamicSchemaData(document.RootElement, options); + } + + internal static EdgeDynamicSchemaData DeserializeEdgeDynamicSchemaData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeDynamicSchemaProperties properties = default; + ETag? etag = 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 = EdgeDynamicSchemaProperties.DeserializeEdgeDynamicSchemaProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDynamicSchemaData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDynamicSchemaData)} does not support writing '{options.Format}' format."); + } + } + + EdgeDynamicSchemaData 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 DeserializeEdgeDynamicSchemaData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDynamicSchemaData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaData.cs new file mode 100644 index 000000000000..a5513a5799d6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeDynamicSchema data model. + /// DynamicSchema Resource + /// + public partial class EdgeDynamicSchemaData : 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 EdgeDynamicSchemaData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeDynamicSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeDynamicSchemaProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeDynamicSchemaProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaResource.Serialization.cs new file mode 100644 index 000000000000..1e9792ac7912 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeDynamicSchemaResource : IJsonModel + { + private static EdgeDynamicSchemaData s_dataDeserializationInstance; + private static EdgeDynamicSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeDynamicSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeDynamicSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaResource.cs new file mode 100644 index 000000000000..0d6fa2357da7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaResource.cs @@ -0,0 +1,408 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeDynamicSchema along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeDynamicSchemaResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeDynamicSchema method. + /// + public partial class EdgeDynamicSchemaResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schemaName. + /// The dynamicSchemaName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeDynamicSchemaDynamicSchemasClientDiagnostics; + private readonly DynamicSchemasRestOperations _edgeDynamicSchemaDynamicSchemasRestClient; + private readonly EdgeDynamicSchemaData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/schemas/dynamicSchemas"; + + /// Initializes a new instance of the class for mocking. + protected EdgeDynamicSchemaResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeDynamicSchemaResource(ArmClient client, EdgeDynamicSchemaData 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 EdgeDynamicSchemaResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDynamicSchemaDynamicSchemasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeDynamicSchemaDynamicSchemasApiVersion); + _edgeDynamicSchemaDynamicSchemasRestClient = new DynamicSchemasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDynamicSchemaDynamicSchemasApiVersion); +#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 EdgeDynamicSchemaData 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 EdgeDynamicSchemaVersionResources in the EdgeDynamicSchema. + /// An object representing collection of EdgeDynamicSchemaVersionResources and their operations over a EdgeDynamicSchemaVersionResource. + public virtual EdgeDynamicSchemaVersionCollection GetEdgeDynamicSchemaVersions() + { + return GetCachedClient(client => new EdgeDynamicSchemaVersionCollection(client, Id)); + } + + /// + /// Get a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeDynamicSchemaVersionAsync(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + return await GetEdgeDynamicSchemaVersions().GetAsync(dynamicSchemaVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeDynamicSchemaVersion(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + return GetEdgeDynamicSchemaVersions().Get(dynamicSchemaVersionName, cancellationToken); + } + + /// + /// Get a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaResource.Get"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.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 EdgeDynamicSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaResource.Get"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaResource.Delete"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeDynamicSchemaDynamicSchemasClientDiagnostics, Pipeline, _edgeDynamicSchemaDynamicSchemasRestClient.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 DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaResource.Delete"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeDynamicSchemaDynamicSchemasClientDiagnostics, Pipeline, _edgeDynamicSchemaDynamicSchemasRestClient.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; + } + } + + /// + /// update a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaResource.Update"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaDynamicSchemasRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeDynamicSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaDynamicSchemasClientDiagnostics.CreateScope("EdgeDynamicSchemaResource.Update"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaDynamicSchemasRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + return Response.FromValue(new EdgeDynamicSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionCollection.cs new file mode 100644 index 000000000000..053ac7703b3b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeDynamicSchemaVersions method from an instance of . + /// + public partial class EdgeDynamicSchemaVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics; + private readonly DynamicSchemaVersionsRestOperations _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeDynamicSchemaVersionCollection() + { + } + + /// 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 EdgeDynamicSchemaVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeDynamicSchemaVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeDynamicSchemaVersionResource.ResourceType, out string edgeDynamicSchemaVersionDynamicSchemaVersionsApiVersion); + _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient = new DynamicSchemaVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDynamicSchemaVersionDynamicSchemaVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeDynamicSchemaResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeDynamicSchemaResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 DynamicSchemaVersion. + /// 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 dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDynamicSchemaVersionOperationSource(Client), _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics, Pipeline, _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, 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 Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 DynamicSchemaVersion. + /// 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 dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeDynamicSchemaVersionOperationSource(Client), _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics, Pipeline, _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.Get"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by Dynamic Schema + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions + /// + /// + /// Operation Id + /// DynamicSchemaVersion_ListByDynamicSchema + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateListByDynamicSchemaRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateListByDynamicSchemaNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeDynamicSchemaVersionResource(Client, EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(e)), _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics, Pipeline, "EdgeDynamicSchemaVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by Dynamic Schema + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions + /// + /// + /// Operation Id + /// DynamicSchemaVersion_ListByDynamicSchema + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateListByDynamicSchemaRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateListByDynamicSchemaNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeDynamicSchemaVersionResource(Client, EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(e)), _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics, Pipeline, "EdgeDynamicSchemaVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, 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.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, 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.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(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.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dynamicSchemaVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionData.Serialization.cs new file mode 100644 index 000000000000..637aa321a332 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeDynamicSchemaVersionData : 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(EdgeDynamicSchemaVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeDynamicSchemaVersionData 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(EdgeDynamicSchemaVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDynamicSchemaVersionData(document.RootElement, options); + } + + internal static EdgeDynamicSchemaVersionData DeserializeEdgeDynamicSchemaVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSchemaVersionProperties properties = default; + ETag? etag = 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 = EdgeSchemaVersionProperties.DeserializeEdgeSchemaVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDynamicSchemaVersionData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDynamicSchemaVersionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeDynamicSchemaVersionData 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 DeserializeEdgeDynamicSchemaVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDynamicSchemaVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionData.cs new file mode 100644 index 000000000000..c0b6d1d76055 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeDynamicSchemaVersion data model. + /// Dynamic Schema Version Resource + /// + public partial class EdgeDynamicSchemaVersionData : 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 EdgeDynamicSchemaVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeDynamicSchemaVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSchemaVersionProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSchemaVersionProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionResource.Serialization.cs new file mode 100644 index 000000000000..ac7d827f8206 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeDynamicSchemaVersionResource : IJsonModel + { + private static EdgeDynamicSchemaVersionData s_dataDeserializationInstance; + private static EdgeDynamicSchemaVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeDynamicSchemaVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeDynamicSchemaVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionResource.cs new file mode 100644 index 000000000000..c4a0c998b740 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeDynamicSchemaVersionResource.cs @@ -0,0 +1,340 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeDynamicSchemaVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeDynamicSchemaVersionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeDynamicSchemaVersion method. + /// + public partial class EdgeDynamicSchemaVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schemaName. + /// The dynamicSchemaName. + /// The dynamicSchemaVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics; + private readonly DynamicSchemaVersionsRestOperations _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient; + private readonly EdgeDynamicSchemaVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/schemas/dynamicSchemas/versions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeDynamicSchemaVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeDynamicSchemaVersionResource(ArmClient client, EdgeDynamicSchemaVersionData 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 EdgeDynamicSchemaVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeDynamicSchemaVersionDynamicSchemaVersionsApiVersion); + _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient = new DynamicSchemaVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeDynamicSchemaVersionDynamicSchemaVersionsApiVersion); +#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 EdgeDynamicSchemaVersionData 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 Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionResource.Get"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionResource.Get"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionResource.Delete"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics, Pipeline, _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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 Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionResource.Delete"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics, Pipeline, _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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; + } + } + + /// + /// update a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionResource.Update"); + scope.Start(); + try + { + var response = await _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a Dynamic Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName}/versions/{dynamicSchemaVersionName} + /// + /// + /// Operation Id + /// DynamicSchemaVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeDynamicSchemaVersionDynamicSchemaVersionsClientDiagnostics.CreateScope("EdgeDynamicSchemaVersionResource.Update"); + scope.Start(); + try + { + var response = _edgeDynamicSchemaVersionDynamicSchemaVersionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + return Response.FromValue(new EdgeDynamicSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionCollection.cs new file mode 100644 index 000000000000..19851971b542 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeExecutions method from an instance of . + /// + public partial class EdgeExecutionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeExecutionExecutionsClientDiagnostics; + private readonly ExecutionsRestOperations _edgeExecutionExecutionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeExecutionCollection() + { + } + + /// 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 EdgeExecutionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeExecutionExecutionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeExecutionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeExecutionResource.ResourceType, out string edgeExecutionExecutionsApiVersion); + _edgeExecutionExecutionsRestClient = new ExecutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeExecutionExecutionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeWorkflowVersionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeWorkflowVersionResource.ResourceType), nameof(id)); + } + + /// + /// Create or update Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 Execution. + /// 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 executionName, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeExecutionOperationSource(Client), _edgeExecutionExecutionsClientDiagnostics, Pipeline, _edgeExecutionExecutionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, 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 Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 Execution. + /// 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 executionName, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeExecutionOperationSource(Client), _edgeExecutionExecutionsClientDiagnostics, Pipeline, _edgeExecutionExecutionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.Get"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Execution Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions + /// + /// + /// Operation Id + /// Execution_ListByWorkflowVersion + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeExecutionExecutionsRestClient.CreateListByWorkflowVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeExecutionExecutionsRestClient.CreateListByWorkflowVersionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeExecutionResource(Client, EdgeExecutionData.DeserializeEdgeExecutionData(e)), _edgeExecutionExecutionsClientDiagnostics, Pipeline, "EdgeExecutionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Execution Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions + /// + /// + /// Operation Id + /// Execution_ListByWorkflowVersion + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeExecutionExecutionsRestClient.CreateListByWorkflowVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeExecutionExecutionsRestClient.CreateListByWorkflowVersionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeExecutionResource(Client, EdgeExecutionData.DeserializeEdgeExecutionData(e)), _edgeExecutionExecutionsClientDiagnostics, Pipeline, "EdgeExecutionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, 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.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, 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.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeExecutionResource(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.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, executionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeExecutionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionData.Serialization.cs new file mode 100644 index 000000000000..0df09668400c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeExecutionData : 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(EdgeExecutionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeExecutionData 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(EdgeExecutionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeExecutionData(document.RootElement, options); + } + + internal static EdgeExecutionData DeserializeEdgeExecutionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeExecutionProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeExecutionProperties.DeserializeEdgeExecutionProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeExecutionData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeExecutionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeExecutionData 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 DeserializeEdgeExecutionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeExecutionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionData.cs new file mode 100644 index 000000000000..18bd144da43b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeExecution data model. + /// Execution Resource + /// + public partial class EdgeExecutionData : 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 EdgeExecutionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeExecutionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeExecutionProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeExecutionProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionResource.Serialization.cs new file mode 100644 index 000000000000..65d634570180 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeExecutionResource : IJsonModel + { + private static EdgeExecutionData s_dataDeserializationInstance; + private static EdgeExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionResource.cs new file mode 100644 index 000000000000..cf92382abc3d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeExecutionResource.cs @@ -0,0 +1,349 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeExecution along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeExecutionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeExecution method. + /// + public partial class EdgeExecutionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The contextName. + /// The workflowName. + /// The versionName. + /// The executionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeExecutionExecutionsClientDiagnostics; + private readonly ExecutionsRestOperations _edgeExecutionExecutionsRestClient; + private readonly EdgeExecutionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/contexts/workflows/versions/executions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeExecutionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeExecutionResource(ArmClient client, EdgeExecutionData 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 EdgeExecutionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeExecutionExecutionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeExecutionExecutionsApiVersion); + _edgeExecutionExecutionsRestClient = new ExecutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeExecutionExecutionsApiVersion); +#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 EdgeExecutionData 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 Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionResource.Get"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionResource.Get"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionResource.Delete"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeExecutionExecutionsClientDiagnostics, Pipeline, _edgeExecutionExecutionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, 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 Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionResource.Delete"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeExecutionExecutionsClientDiagnostics, Pipeline, _edgeExecutionExecutionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, 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; + } + } + + /// + /// update an Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionResource.Update"); + scope.Start(); + try + { + var response = await _edgeExecutionExecutionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeExecutionOperationSource(Client), _edgeExecutionExecutionsClientDiagnostics, Pipeline, _edgeExecutionExecutionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.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 an Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeExecutionExecutionsClientDiagnostics.CreateScope("EdgeExecutionResource.Update"); + scope.Start(); + try + { + var response = _edgeExecutionExecutionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeExecutionOperationSource(Client), _edgeExecutionExecutionsClientDiagnostics, Pipeline, _edgeExecutionExecutionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobCollection.cs new file mode 100644 index 000000000000..c6b2a511fc07 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobCollection.cs @@ -0,0 +1,385 @@ +// 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.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeJobs method from an instance of . + /// + public partial class EdgeJobCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeJobJobsClientDiagnostics; + private readonly JobsRestOperations _edgeJobJobsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeJobCollection() + { + } + + /// 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 EdgeJobCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeJobJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeJobResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeJobResource.ResourceType, out string edgeJobJobsApiVersion); + _edgeJobJobsRestClient = new JobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeJobJobsApiVersion); + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobCollection.Get"); + scope.Start(); + try + { + var response = await _edgeJobJobsRestClient.GetAsync(Id, jobName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobCollection.Get"); + scope.Start(); + try + { + var response = _edgeJobJobsRestClient.Get(Id, jobName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Jobs by parent resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs + /// + /// + /// Operation Id + /// Job_ListByTarget + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeJobJobsRestClient.CreateListByTargetRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeJobJobsRestClient.CreateListByTargetNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeJobResource(Client, EdgeJobData.DeserializeEdgeJobData(e)), _edgeJobJobsClientDiagnostics, Pipeline, "EdgeJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Jobs by parent resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs + /// + /// + /// Operation Id + /// Job_ListByTarget + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeJobJobsRestClient.CreateListByTargetRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeJobJobsRestClient.CreateListByTargetNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeJobResource(Client, EdgeJobData.DeserializeEdgeJobData(e)), _edgeJobJobsClientDiagnostics, Pipeline, "EdgeJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeJobJobsRestClient.GetAsync(Id, jobName, 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 + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobCollection.Exists"); + scope.Start(); + try + { + var response = _edgeJobJobsRestClient.Get(Id, jobName, 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 + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeJobJobsRestClient.GetAsync(Id, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeJobJobsRestClient.Get(Id, jobName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeJobResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobData.Serialization.cs new file mode 100644 index 000000000000..351ec27b975b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeJobData : 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(EdgeJobData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeJobData 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(EdgeJobData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobData(document.RootElement, options); + } + + internal static EdgeJobData DeserializeEdgeJobData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeJobProperties properties = default; + ETag? etag = 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 = EdgeJobProperties.DeserializeEdgeJobProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeJobData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobData)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobData 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 DeserializeEdgeJobData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobData.cs new file mode 100644 index 000000000000..3f41fe8abccd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeJob data model. + /// Job extension resource for tracking job execution and substatuses. + /// + public partial class EdgeJobData : 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 . + internal EdgeJobData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeJobProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeJobProperties Properties { get; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobResource.Serialization.cs new file mode 100644 index 000000000000..b6f850c43919 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeJobResource : IJsonModel + { + private static EdgeJobData s_dataDeserializationInstance; + private static EdgeJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobResource.cs new file mode 100644 index 000000000000..0b5856ebe2b6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeJobResource.cs @@ -0,0 +1,169 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeJob along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeJobResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeJob method. + /// + public partial class EdgeJobResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The resourceUri. + /// The jobName. + public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string jobName) + { + var resourceId = $"{resourceUri}/providers/Microsoft.Edge/jobs/{jobName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeJobJobsClientDiagnostics; + private readonly JobsRestOperations _edgeJobJobsRestClient; + private readonly EdgeJobData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/jobs"; + + /// Initializes a new instance of the class for mocking. + protected EdgeJobResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeJobResource(ArmClient client, EdgeJobData 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 EdgeJobResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeJobJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeJobJobsApiVersion); + _edgeJobJobsRestClient = new JobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeJobJobsApiVersion); +#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 EdgeJobData 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 Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobResource.Get"); + scope.Start(); + try + { + var response = await _edgeJobJobsRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeJobJobsClientDiagnostics.CreateScope("EdgeJobResource.Get"); + scope.Start(); + try + { + var response = _edgeJobJobsRestClient.Get(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaCollection.cs new file mode 100644 index 000000000000..e4978c3a4e21 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaCollection.cs @@ -0,0 +1,494 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSchemas method from an instance of . + /// + public partial class EdgeSchemaCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSchemaSchemasClientDiagnostics; + private readonly SchemasRestOperations _edgeSchemaSchemasRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSchemaCollection() + { + } + + /// 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 EdgeSchemaCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSchemaSchemasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSchemaResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSchemaResource.ResourceType, out string edgeSchemaSchemasApiVersion); + _edgeSchemaSchemasRestClient = new SchemasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSchemaSchemasApiVersion); +#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 Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 Schema. + /// 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 schemaName, EdgeSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schemaName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSchemaOperationSource(Client), _edgeSchemaSchemasClientDiagnostics, Pipeline, _edgeSchemaSchemasRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schemaName, 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 Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 Schema. + /// 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 schemaName, EdgeSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schemaName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSchemaOperationSource(Client), _edgeSchemaSchemasClientDiagnostics, Pipeline, _edgeSchemaSchemasRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schemaName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schemaName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.Get"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schemaName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas + /// + /// + /// Operation Id + /// Schema_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSchemaSchemasRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSchemaSchemasRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaResource(Client, EdgeSchemaData.DeserializeEdgeSchemaData(e)), _edgeSchemaSchemasClientDiagnostics, Pipeline, "EdgeSchemaCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas + /// + /// + /// Operation Id + /// Schema_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSchemaSchemasRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSchemaSchemasRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaResource(Client, EdgeSchemaData.DeserializeEdgeSchemaData(e)), _edgeSchemaSchemasClientDiagnostics, Pipeline, "EdgeSchemaCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schemaName, 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.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schemaName, 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.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schemaName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaResource(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.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schemaName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaData.Serialization.cs new file mode 100644 index 000000000000..85dd3ab45ee1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaData.Serialization.cs @@ -0,0 +1,195 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSchemaData : 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(EdgeSchemaData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSchemaData 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(EdgeSchemaData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaData(document.RootElement, options); + } + + internal static EdgeSchemaData DeserializeEdgeSchemaData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSchemaProperties properties = default; + ETag? etag = 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 = EdgeSchemaProperties.DeserializeEdgeSchemaProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaData 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 DeserializeEdgeSchemaData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaData.cs new file mode 100644 index 000000000000..b8b62072b7fe --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaData.cs @@ -0,0 +1,87 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSchema data model. + /// Schema Resource + /// + public partial class EdgeSchemaData : 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 EdgeSchemaData(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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeSchemaProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSchemaData() + { + } + + /// The resource-specific properties for this resource. + public EdgeSchemaProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceCollection.cs new file mode 100644 index 000000000000..39452f94db73 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceCollection.cs @@ -0,0 +1,385 @@ +// 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.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSchemaReferences method from an instance of . + /// + public partial class EdgeSchemaReferenceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSchemaReferenceSchemaReferencesClientDiagnostics; + private readonly SchemaReferencesRestOperations _edgeSchemaReferenceSchemaReferencesRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSchemaReferenceCollection() + { + } + + /// 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 EdgeSchemaReferenceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSchemaReferenceSchemaReferencesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSchemaReferenceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSchemaReferenceResource.ResourceType, out string edgeSchemaReferenceSchemaReferencesApiVersion); + _edgeSchemaReferenceSchemaReferencesRestClient = new SchemaReferencesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSchemaReferenceSchemaReferencesApiVersion); + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSchemaReferenceSchemaReferencesRestClient.GetAsync(Id, schemaReferenceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceCollection.Get"); + scope.Start(); + try + { + var response = _edgeSchemaReferenceSchemaReferencesRestClient.Get(Id, schemaReferenceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences + /// + /// + /// Operation Id + /// SchemaReference_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSchemaReferenceSchemaReferencesRestClient.CreateListByResourceGroupRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSchemaReferenceSchemaReferencesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaReferenceResource(Client, EdgeSchemaReferenceData.DeserializeEdgeSchemaReferenceData(e)), _edgeSchemaReferenceSchemaReferencesClientDiagnostics, Pipeline, "EdgeSchemaReferenceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences + /// + /// + /// Operation Id + /// SchemaReference_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSchemaReferenceSchemaReferencesRestClient.CreateListByResourceGroupRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSchemaReferenceSchemaReferencesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaReferenceResource(Client, EdgeSchemaReferenceData.DeserializeEdgeSchemaReferenceData(e)), _edgeSchemaReferenceSchemaReferencesClientDiagnostics, Pipeline, "EdgeSchemaReferenceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSchemaReferenceSchemaReferencesRestClient.GetAsync(Id, schemaReferenceName, 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 + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSchemaReferenceSchemaReferencesRestClient.Get(Id, schemaReferenceName, 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 + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSchemaReferenceSchemaReferencesRestClient.GetAsync(Id, schemaReferenceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSchemaReferenceSchemaReferencesRestClient.Get(Id, schemaReferenceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaReferenceResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceData.Serialization.cs new file mode 100644 index 000000000000..b2998005f911 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSchemaReferenceData : 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(EdgeSchemaReferenceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSchemaReferenceData 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(EdgeSchemaReferenceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaReferenceData(document.RootElement, options); + } + + internal static EdgeSchemaReferenceData DeserializeEdgeSchemaReferenceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSchemaReferenceProperties properties = default; + ETag? etag = 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 = EdgeSchemaReferenceProperties.DeserializeEdgeSchemaReferenceProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaReferenceData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaReferenceData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaReferenceData 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 DeserializeEdgeSchemaReferenceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaReferenceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceData.cs new file mode 100644 index 000000000000..10619e46d14e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSchemaReference data model. + /// Schema Reference Resource + /// + public partial class EdgeSchemaReferenceData : 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 . + internal EdgeSchemaReferenceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaReferenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSchemaReferenceProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSchemaReferenceProperties Properties { get; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceResource.Serialization.cs new file mode 100644 index 000000000000..d80eea590b70 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSchemaReferenceResource : IJsonModel + { + private static EdgeSchemaReferenceData s_dataDeserializationInstance; + private static EdgeSchemaReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSchemaReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSchemaReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceResource.cs new file mode 100644 index 000000000000..ca153fb0a41f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaReferenceResource.cs @@ -0,0 +1,169 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSchemaReference along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSchemaReferenceResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSchemaReference method. + /// + public partial class EdgeSchemaReferenceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The resourceUri. + /// The schemaReferenceName. + public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string schemaReferenceName) + { + var resourceId = $"{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSchemaReferenceSchemaReferencesClientDiagnostics; + private readonly SchemaReferencesRestOperations _edgeSchemaReferenceSchemaReferencesRestClient; + private readonly EdgeSchemaReferenceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/schemaReferences"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSchemaReferenceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSchemaReferenceResource(ArmClient client, EdgeSchemaReferenceData 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 EdgeSchemaReferenceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSchemaReferenceSchemaReferencesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSchemaReferenceSchemaReferencesApiVersion); + _edgeSchemaReferenceSchemaReferencesRestClient = new SchemaReferencesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSchemaReferenceSchemaReferencesApiVersion); +#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 EdgeSchemaReferenceData 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 Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceResource.Get"); + scope.Start(); + try + { + var response = await _edgeSchemaReferenceSchemaReferencesRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSchemaReferenceSchemaReferencesClientDiagnostics.CreateScope("EdgeSchemaReferenceResource.Get"); + scope.Start(); + try + { + var response = _edgeSchemaReferenceSchemaReferencesRestClient.Get(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaResource.Serialization.cs new file mode 100644 index 000000000000..fa57c7e72887 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSchemaResource : IJsonModel + { + private static EdgeSchemaData s_dataDeserializationInstance; + private static EdgeSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaResource.cs new file mode 100644 index 000000000000..9595f224028e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaResource.cs @@ -0,0 +1,1013 @@ +// 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.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSchema along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSchemaResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSchema method. + /// + public partial class EdgeSchemaResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schemaName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSchemaSchemasClientDiagnostics; + private readonly SchemasRestOperations _edgeSchemaSchemasRestClient; + private readonly EdgeSchemaData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/schemas"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSchemaResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSchemaResource(ArmClient client, EdgeSchemaData 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 EdgeSchemaResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSchemaSchemasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSchemaSchemasApiVersion); + _edgeSchemaSchemasRestClient = new SchemasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSchemaSchemasApiVersion); +#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 EdgeSchemaData 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 EdgeDynamicSchemaResources in the EdgeSchema. + /// An object representing collection of EdgeDynamicSchemaResources and their operations over a EdgeDynamicSchemaResource. + public virtual EdgeDynamicSchemaCollection GetEdgeDynamicSchemas() + { + return GetCachedClient(client => new EdgeDynamicSchemaCollection(client, Id)); + } + + /// + /// Get a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeDynamicSchemaAsync(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + return await GetEdgeDynamicSchemas().GetAsync(dynamicSchemaName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DynamicSchema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/dynamicSchemas/{dynamicSchemaName} + /// + /// + /// Operation Id + /// DynamicSchema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeDynamicSchema(string dynamicSchemaName, CancellationToken cancellationToken = default) + { + return GetEdgeDynamicSchemas().Get(dynamicSchemaName, cancellationToken); + } + + /// Gets a collection of EdgeSchemaVersionResources in the EdgeSchema. + /// An object representing collection of EdgeSchemaVersionResources and their operations over a EdgeSchemaVersionResource. + public virtual EdgeSchemaVersionCollection GetEdgeSchemaVersions() + { + return GetCachedClient(client => new EdgeSchemaVersionCollection(client, Id)); + } + + /// + /// Get a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSchemaVersionAsync(string schemaVersionName, CancellationToken cancellationToken = default) + { + return await GetEdgeSchemaVersions().GetAsync(schemaVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSchemaVersion(string schemaVersionName, CancellationToken cancellationToken = default) + { + return GetEdgeSchemaVersions().Get(schemaVersionName, cancellationToken); + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.Get"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.Get"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.Delete"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSchemaSchemasClientDiagnostics, Pipeline, _edgeSchemaSchemasRestClient.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 Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.Delete"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSchemaSchemasClientDiagnostics, Pipeline, _edgeSchemaSchemasRestClient.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 Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EdgeSchemaPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.Update"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EdgeSchemaPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.Update"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new EdgeSchemaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/createVersion + /// + /// + /// Operation Id + /// Schemas_CreateVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateVersionAsync(WaitUntil waitUntil, EdgeSchemaVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.CreateVersion"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.CreateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSchemaVersionOperationSource(Client), _edgeSchemaSchemasClientDiagnostics, Pipeline, _edgeSchemaSchemasRestClient.CreateCreateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/createVersion + /// + /// + /// Operation Id + /// Schemas_CreateVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateVersion(WaitUntil waitUntil, EdgeSchemaVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.CreateVersion"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.CreateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSchemaVersionOperationSource(Client), _edgeSchemaSchemasClientDiagnostics, Pipeline, _edgeSchemaSchemasRestClient.CreateCreateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/removeVersion + /// + /// + /// Operation Id + /// Schemas_RemoveVersion + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveVersionAsync(EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.RemoveVersion"); + scope.Start(); + try + { + var response = await _edgeSchemaSchemasRestClient.RemoveVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/removeVersion + /// + /// + /// Operation Id + /// Schemas_RemoveVersion + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveVersion(EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.RemoveVersion"); + scope.Start(); + try + { + var response = _edgeSchemaSchemasRestClient.RemoveVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.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 _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSchemaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeSchemaPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.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 = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeSchemaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeSchemaPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.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 _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSchemaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeSchemaPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.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 = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeSchemaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeSchemaPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.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 _edgeSchemaSchemasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSchemaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeSchemaPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaSchemasClientDiagnostics.CreateScope("EdgeSchemaResource.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 = _edgeSchemaSchemasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeSchemaResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeSchemaPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionCollection.cs new file mode 100644 index 000000000000..baa9366229cb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSchemaVersions method from an instance of . + /// + public partial class EdgeSchemaVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSchemaVersionSchemaVersionsClientDiagnostics; + private readonly SchemaVersionsRestOperations _edgeSchemaVersionSchemaVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSchemaVersionCollection() + { + } + + /// 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 EdgeSchemaVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSchemaVersionSchemaVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSchemaVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSchemaVersionResource.ResourceType, out string edgeSchemaVersionSchemaVersionsApiVersion); + _edgeSchemaVersionSchemaVersionsRestClient = new SchemaVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSchemaVersionSchemaVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeSchemaResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeSchemaResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 SchemaVersion. + /// 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 schemaVersionName, EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSchemaVersionOperationSource(Client), _edgeSchemaVersionSchemaVersionsClientDiagnostics, Pipeline, _edgeSchemaVersionSchemaVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, 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 Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 SchemaVersion. + /// 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 schemaVersionName, EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSchemaVersionOperationSource(Client), _edgeSchemaVersionSchemaVersionsClientDiagnostics, Pipeline, _edgeSchemaVersionSchemaVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.Get"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions + /// + /// + /// Operation Id + /// SchemaVersion_ListBySchema + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSchemaVersionSchemaVersionsRestClient.CreateListBySchemaRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSchemaVersionSchemaVersionsRestClient.CreateListBySchemaNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaVersionResource(Client, EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(e)), _edgeSchemaVersionSchemaVersionsClientDiagnostics, Pipeline, "EdgeSchemaVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions + /// + /// + /// Operation Id + /// SchemaVersion_ListBySchema + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSchemaVersionSchemaVersionsRestClient.CreateListBySchemaRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSchemaVersionSchemaVersionsRestClient.CreateListBySchemaNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaVersionResource(Client, EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(e)), _edgeSchemaVersionSchemaVersionsClientDiagnostics, Pipeline, "EdgeSchemaVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, 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.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, 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.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaVersionResource(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.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SchemaVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, schemaVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaVersionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionData.Serialization.cs new file mode 100644 index 000000000000..c85773902a31 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSchemaVersionData : 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(EdgeSchemaVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSchemaVersionData 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(EdgeSchemaVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaVersionData(document.RootElement, options); + } + + internal static EdgeSchemaVersionData DeserializeEdgeSchemaVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSchemaVersionProperties properties = default; + ETag? etag = 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 = EdgeSchemaVersionProperties.DeserializeEdgeSchemaVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaVersionData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaVersionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaVersionData 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 DeserializeEdgeSchemaVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionData.cs new file mode 100644 index 000000000000..1e1222f8f7c9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSchemaVersion data model. + /// Schema Version Resource + /// + public partial class EdgeSchemaVersionData : 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 EdgeSchemaVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSchemaVersionProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSchemaVersionProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionResource.Serialization.cs new file mode 100644 index 000000000000..50c2433c8120 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSchemaVersionResource : IJsonModel + { + private static EdgeSchemaVersionData s_dataDeserializationInstance; + private static EdgeSchemaVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSchemaVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSchemaVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionResource.cs new file mode 100644 index 000000000000..152e88ca6c79 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSchemaVersionResource.cs @@ -0,0 +1,339 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSchemaVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSchemaVersionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSchemaVersion method. + /// + public partial class EdgeSchemaVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schemaName. + /// The schemaVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSchemaVersionSchemaVersionsClientDiagnostics; + private readonly SchemaVersionsRestOperations _edgeSchemaVersionSchemaVersionsRestClient; + private readonly EdgeSchemaVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/schemas/versions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSchemaVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSchemaVersionResource(ArmClient client, EdgeSchemaVersionData 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 EdgeSchemaVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSchemaVersionSchemaVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSchemaVersionSchemaVersionsApiVersion); + _edgeSchemaVersionSchemaVersionsRestClient = new SchemaVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSchemaVersionSchemaVersionsApiVersion); +#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 EdgeSchemaVersionData 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 Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionResource.Get"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.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 EdgeSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionResource.Get"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionResource.Delete"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSchemaVersionSchemaVersionsClientDiagnostics, Pipeline, _edgeSchemaVersionSchemaVersionsRestClient.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 Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionResource.Delete"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSchemaVersionSchemaVersionsClientDiagnostics, Pipeline, _edgeSchemaVersionSchemaVersionsRestClient.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; + } + } + + /// + /// update a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionResource.Update"); + scope.Start(); + try + { + var response = await _edgeSchemaVersionSchemaVersionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a Schema Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName}/versions/{schemaVersionName} + /// + /// + /// Operation Id + /// SchemaVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSchemaVersionSchemaVersionsClientDiagnostics.CreateScope("EdgeSchemaVersionResource.Update"); + scope.Start(); + try + { + var response = _edgeSchemaVersionSchemaVersionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + return Response.FromValue(new EdgeSchemaVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceCollection.cs new file mode 100644 index 000000000000..01519aa6d83c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSiteReferences method from an instance of . + /// + public partial class EdgeSiteReferenceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSiteReferenceSiteReferencesClientDiagnostics; + private readonly SiteReferencesRestOperations _edgeSiteReferenceSiteReferencesRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSiteReferenceCollection() + { + } + + /// 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 EdgeSiteReferenceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSiteReferenceSiteReferencesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSiteReferenceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSiteReferenceResource.ResourceType, out string edgeSiteReferenceSiteReferencesApiVersion); + _edgeSiteReferenceSiteReferencesRestClient = new SiteReferencesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSiteReferenceSiteReferencesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeContextResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeContextResource.ResourceType), nameof(id)); + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 SiteReference. + /// 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 siteReferenceName, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSiteReferenceOperationSource(Client), _edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, _edgeSiteReferenceSiteReferencesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 SiteReference. + /// 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 siteReferenceName, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSiteReferenceOperationSource(Client), _edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, _edgeSiteReferenceSiteReferencesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSiteReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.Get"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSiteReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Site Reference Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences + /// + /// + /// Operation Id + /// SiteReference_ListByContext + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSiteReferenceSiteReferencesRestClient.CreateListByContextRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSiteReferenceSiteReferencesRestClient.CreateListByContextNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSiteReferenceResource(Client, EdgeSiteReferenceData.DeserializeEdgeSiteReferenceData(e)), _edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, "EdgeSiteReferenceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Site Reference Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences + /// + /// + /// Operation Id + /// SiteReference_ListByContext + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSiteReferenceSiteReferencesRestClient.CreateListByContextRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSiteReferenceSiteReferencesRestClient.CreateListByContextNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSiteReferenceResource(Client, EdgeSiteReferenceData.DeserializeEdgeSiteReferenceData(e)), _edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, "EdgeSiteReferenceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, 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.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, 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.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSiteReferenceResource(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.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SiteReference. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteReferenceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSiteReferenceResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceData.Serialization.cs new file mode 100644 index 000000000000..b28572fde163 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceData.Serialization.cs @@ -0,0 +1,156 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSiteReferenceData : 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(EdgeSiteReferenceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EdgeSiteReferenceData 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(EdgeSiteReferenceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSiteReferenceData(document.RootElement, options); + } + + internal static EdgeSiteReferenceData DeserializeEdgeSiteReferenceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSiteReferenceProperties 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 = EdgeSiteReferenceProperties.DeserializeEdgeSiteReferenceProperties(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSiteReferenceData( + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSiteReferenceData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSiteReferenceData 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 DeserializeEdgeSiteReferenceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSiteReferenceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceData.cs new file mode 100644 index 000000000000..34e13e6fbaba --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceData.cs @@ -0,0 +1,75 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSiteReference data model. + /// Site Reference Resource + /// + public partial class EdgeSiteReferenceData : 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 EdgeSiteReferenceData() + { + } + + /// 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 EdgeSiteReferenceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSiteReferenceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSiteReferenceProperties Properties { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceResource.Serialization.cs new file mode 100644 index 000000000000..ec82c9f13f84 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSiteReferenceResource : IJsonModel + { + private static EdgeSiteReferenceData s_dataDeserializationInstance; + private static EdgeSiteReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSiteReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSiteReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceResource.cs new file mode 100644 index 000000000000..7757aaf6d1cf --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSiteReferenceResource.cs @@ -0,0 +1,347 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSiteReference along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSiteReferenceResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSiteReference method. + /// + public partial class EdgeSiteReferenceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The contextName. + /// The siteReferenceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSiteReferenceSiteReferencesClientDiagnostics; + private readonly SiteReferencesRestOperations _edgeSiteReferenceSiteReferencesRestClient; + private readonly EdgeSiteReferenceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/contexts/siteReferences"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSiteReferenceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSiteReferenceResource(ArmClient client, EdgeSiteReferenceData 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 EdgeSiteReferenceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSiteReferenceSiteReferencesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSiteReferenceSiteReferencesApiVersion); + _edgeSiteReferenceSiteReferencesRestClient = new SiteReferencesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSiteReferenceSiteReferencesApiVersion); +#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 EdgeSiteReferenceData 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 Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceResource.Get"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.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 EdgeSiteReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceResource.Get"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSiteReferenceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceResource.Delete"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, _edgeSiteReferenceSiteReferencesRestClient.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; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceResource.Delete"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, _edgeSiteReferenceSiteReferencesRestClient.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; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceResource.Update"); + scope.Start(); + try + { + var response = await _edgeSiteReferenceSiteReferencesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSiteReferenceOperationSource(Client), _edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, _edgeSiteReferenceSiteReferencesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.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; + } + } + + /// + /// Get Site Reference Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/siteReferences/{siteReferenceName} + /// + /// + /// Operation Id + /// SiteReference_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSiteReferenceSiteReferencesClientDiagnostics.CreateScope("EdgeSiteReferenceResource.Update"); + scope.Start(); + try + { + var response = _edgeSiteReferenceSiteReferencesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSiteReferenceOperationSource(Client), _edgeSiteReferenceSiteReferencesClientDiagnostics, Pipeline, _edgeSiteReferenceSiteReferencesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionCollection.cs new file mode 100644 index 000000000000..445024b71fa5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSolutions method from an instance of . + /// + public partial class EdgeSolutionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSolutionSolutionsClientDiagnostics; + private readonly SolutionsRestOperations _edgeSolutionSolutionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionCollection() + { + } + + /// 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 EdgeSolutionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionSolutionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSolutionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSolutionResource.ResourceType, out string edgeSolutionSolutionsApiVersion); + _edgeSolutionSolutionsRestClient = new SolutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionSolutionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeTargetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeTargetResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Solution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the solution. + /// 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 solutionName, EdgeSolutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionOperationSource(Client), _edgeSolutionSolutionsClientDiagnostics, Pipeline, _edgeSolutionSolutionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, 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 Solution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the solution. + /// 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 solutionName, EdgeSolutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionOperationSource(Client), _edgeSolutionSolutionsClientDiagnostics, Pipeline, _edgeSolutionSolutionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.Get"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Solution resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions + /// + /// + /// Operation Id + /// Solution_ListByTarget + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionSolutionsRestClient.CreateListByTargetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionSolutionsRestClient.CreateListByTargetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionResource(Client, EdgeSolutionData.DeserializeEdgeSolutionData(e)), _edgeSolutionSolutionsClientDiagnostics, Pipeline, "EdgeSolutionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Solution resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions + /// + /// + /// Operation Id + /// Solution_ListByTarget + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionSolutionsRestClient.CreateListByTargetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionSolutionsRestClient.CreateListByTargetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionResource(Client, EdgeSolutionData.DeserializeEdgeSolutionData(e)), _edgeSolutionSolutionsClientDiagnostics, Pipeline, "EdgeSolutionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, 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.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, 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.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionResource(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.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionData.Serialization.cs new file mode 100644 index 000000000000..cd31b5963c4a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSolutionData : 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(EdgeSolutionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSolutionData 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(EdgeSolutionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionData(document.RootElement, options); + } + + internal static EdgeSolutionData DeserializeEdgeSolutionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSolutionProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeSolutionProperties.DeserializeEdgeSolutionProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionData 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 DeserializeEdgeSolutionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionData.cs new file mode 100644 index 000000000000..324bdfb21c2a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSolution data model. + /// Solution Resource attached to a Target + /// + public partial class EdgeSolutionData : 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 EdgeSolutionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSolutionProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSolutionProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionResource.Serialization.cs new file mode 100644 index 000000000000..14adbaf412a6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSolutionResource : IJsonModel + { + private static EdgeSolutionData s_dataDeserializationInstance; + private static EdgeSolutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSolutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionResource.cs new file mode 100644 index 000000000000..382ed1890abe --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionResource.cs @@ -0,0 +1,486 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSolution along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSolutionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSolution method. + /// + public partial class EdgeSolutionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The targetName. + /// The solutionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSolutionSolutionsClientDiagnostics; + private readonly SolutionsRestOperations _edgeSolutionSolutionsRestClient; + private readonly EdgeSolutionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/targets/solutions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSolutionResource(ArmClient client, EdgeSolutionData 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 EdgeSolutionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionSolutionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSolutionSolutionsApiVersion); + _edgeSolutionSolutionsRestClient = new SolutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionSolutionsApiVersion); +#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 EdgeSolutionData 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 EdgeSolutionVersionResources in the EdgeSolution. + /// An object representing collection of EdgeSolutionVersionResources and their operations over a EdgeSolutionVersionResource. + public virtual EdgeSolutionVersionCollection GetEdgeSolutionVersions() + { + return GetCachedClient(client => new EdgeSolutionVersionCollection(client, Id)); + } + + /// + /// Get a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSolutionVersionAsync(string solutionVersionName, CancellationToken cancellationToken = default) + { + return await GetEdgeSolutionVersions().GetAsync(solutionVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSolutionVersion(string solutionVersionName, CancellationToken cancellationToken = default) + { + return GetEdgeSolutionVersions().Get(solutionVersionName, cancellationToken); + } + + /// Gets a collection of EdgeDeploymentInstanceResources in the EdgeSolution. + /// An object representing collection of EdgeDeploymentInstanceResources and their operations over a EdgeDeploymentInstanceResource. + public virtual EdgeDeploymentInstanceCollection GetEdgeDeploymentInstances() + { + return GetCachedClient(client => new EdgeDeploymentInstanceCollection(client, Id)); + } + + /// + /// Get Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeDeploymentInstanceAsync(string instanceName, CancellationToken cancellationToken = default) + { + return await GetEdgeDeploymentInstances().GetAsync(instanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Instance Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/instances/{instanceName} + /// + /// + /// Operation Id + /// Instance_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeDeploymentInstance(string instanceName, CancellationToken cancellationToken = default) + { + return GetEdgeDeploymentInstances().Get(instanceName, cancellationToken); + } + + /// + /// Get a Solution resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionResource.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.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 EdgeSolutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionResource.Get"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Solution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionResource.Delete"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionSolutionsClientDiagnostics, Pipeline, _edgeSolutionSolutionsRestClient.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 Solution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionResource.Delete"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionSolutionsClientDiagnostics, Pipeline, _edgeSolutionSolutionsRestClient.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; + } + } + + /// + /// Update a Solution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeSolutionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionResource.Update"); + scope.Start(); + try + { + var response = await _edgeSolutionSolutionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionOperationSource(Client), _edgeSolutionSolutionsClientDiagnostics, Pipeline, _edgeSolutionSolutionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 Solution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeSolutionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeSolutionSolutionsClientDiagnostics.CreateScope("EdgeSolutionResource.Update"); + scope.Start(); + try + { + var response = _edgeSolutionSolutionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionOperationSource(Client), _edgeSolutionSolutionsClientDiagnostics, Pipeline, _edgeSolutionSolutionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateCollection.cs new file mode 100644 index 000000000000..b753bcd0e512 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateCollection.cs @@ -0,0 +1,494 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSolutionTemplates method from an instance of . + /// + public partial class EdgeSolutionTemplateCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSolutionTemplateSolutionTemplatesClientDiagnostics; + private readonly SolutionTemplatesRestOperations _edgeSolutionTemplateSolutionTemplatesRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionTemplateCollection() + { + } + + /// 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 EdgeSolutionTemplateCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionTemplateSolutionTemplatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSolutionTemplateResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSolutionTemplateResource.ResourceType, out string edgeSolutionTemplateSolutionTemplatesApiVersion); + _edgeSolutionTemplateSolutionTemplatesRestClient = new SolutionTemplatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionTemplateSolutionTemplatesApiVersion); +#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 Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 SolutionTemplate. + /// 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 solutionTemplateName, EdgeSolutionTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionTemplateOperationSource(Client), _edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, 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 Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 SolutionTemplate. + /// 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 solutionTemplateName, EdgeSolutionTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionTemplateOperationSource(Client), _edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.Get"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates + /// + /// + /// Operation Id + /// SolutionTemplate_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionTemplateSolutionTemplatesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionTemplateSolutionTemplatesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionTemplateResource(Client, EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(e)), _edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, "EdgeSolutionTemplateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates + /// + /// + /// Operation Id + /// SolutionTemplate_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionTemplateSolutionTemplatesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionTemplateSolutionTemplatesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionTemplateResource(Client, EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(e)), _edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, "EdgeSolutionTemplateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, 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.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, 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.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateResource(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.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, solutionTemplateName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateData.Serialization.cs new file mode 100644 index 000000000000..2706c5e5fb54 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateData.Serialization.cs @@ -0,0 +1,195 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSolutionTemplateData : 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(EdgeSolutionTemplateData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSolutionTemplateData 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(EdgeSolutionTemplateData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplateData(document.RootElement, options); + } + + internal static EdgeSolutionTemplateData DeserializeEdgeSolutionTemplateData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSolutionTemplateProperties properties = default; + ETag? etag = 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 = EdgeSolutionTemplateProperties.DeserializeEdgeSolutionTemplateProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplateData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplateData 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 DeserializeEdgeSolutionTemplateData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateData.cs new file mode 100644 index 000000000000..44680c2cb8d7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateData.cs @@ -0,0 +1,87 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSolutionTemplate data model. + /// Solution Template Resource. Contains capabilities and operations for creating versions. + /// + public partial class EdgeSolutionTemplateData : 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 EdgeSolutionTemplateData(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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeSolutionTemplateProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionTemplateData() + { + } + + /// The resource-specific properties for this resource. + public EdgeSolutionTemplateProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateResource.Serialization.cs new file mode 100644 index 000000000000..9e89a9f286ac --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSolutionTemplateResource : IJsonModel + { + private static EdgeSolutionTemplateData s_dataDeserializationInstance; + private static EdgeSolutionTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSolutionTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSolutionTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateResource.cs new file mode 100644 index 000000000000..878f9da762d5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateResource.cs @@ -0,0 +1,952 @@ +// 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.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSolutionTemplate along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSolutionTemplateResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSolutionTemplate method. + /// + public partial class EdgeSolutionTemplateResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The solutionTemplateName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSolutionTemplateSolutionTemplatesClientDiagnostics; + private readonly SolutionTemplatesRestOperations _edgeSolutionTemplateSolutionTemplatesRestClient; + private readonly EdgeSolutionTemplateData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/solutionTemplates"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionTemplateResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSolutionTemplateResource(ArmClient client, EdgeSolutionTemplateData 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 EdgeSolutionTemplateResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionTemplateSolutionTemplatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSolutionTemplateSolutionTemplatesApiVersion); + _edgeSolutionTemplateSolutionTemplatesRestClient = new SolutionTemplatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionTemplateSolutionTemplatesApiVersion); +#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 EdgeSolutionTemplateData 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 EdgeSolutionTemplateVersionResources in the EdgeSolutionTemplate. + /// An object representing collection of EdgeSolutionTemplateVersionResources and their operations over a EdgeSolutionTemplateVersionResource. + public virtual EdgeSolutionTemplateVersionCollection GetEdgeSolutionTemplateVersions() + { + return GetCachedClient(client => new EdgeSolutionTemplateVersionCollection(client, Id)); + } + + /// + /// Get a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSolutionTemplateVersionAsync(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + return await GetEdgeSolutionTemplateVersions().GetAsync(solutionTemplateVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSolutionTemplateVersion(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + return GetEdgeSolutionTemplateVersions().Get(solutionTemplateVersionName, cancellationToken); + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.Get"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.Delete"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.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 Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.Delete"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.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 Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EdgeSolutionTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.Update"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Update + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EdgeSolutionTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.Update"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/createVersion + /// + /// + /// Operation Id + /// SolutionTemplates_CreateVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateVersionAsync(WaitUntil waitUntil, EdgeSolutionTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.CreateVersion"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.CreateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionTemplateVersionOperationSource(Client), _edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.CreateCreateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/createVersion + /// + /// + /// Operation Id + /// SolutionTemplates_CreateVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateVersion(WaitUntil waitUntil, EdgeSolutionTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.CreateVersion"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.CreateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionTemplateVersionOperationSource(Client), _edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.CreateCreateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/removeVersion + /// + /// + /// Operation Id + /// SolutionTemplates_RemoveVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task RemoveVersionAsync(WaitUntil waitUntil, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.RemoveVersion"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateSolutionTemplatesRestClient.RemoveVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.CreateRemoveVersionRequest(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; + } + } + + /// + /// Remove Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/removeVersion + /// + /// + /// Operation Id + /// SolutionTemplates_RemoveVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RemoveVersion(WaitUntil waitUntil, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.RemoveVersion"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateSolutionTemplatesRestClient.RemoveVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, _edgeSolutionTemplateSolutionTemplatesRestClient.CreateRemoveVersionRequest(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; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.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 _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeSolutionTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.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 = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeSolutionTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.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 _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeSolutionTemplatePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.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 = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeSolutionTemplatePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.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 _edgeSolutionTemplateSolutionTemplatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeSolutionTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionTemplateSolutionTemplatesClientDiagnostics.CreateScope("EdgeSolutionTemplateResource.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 = _edgeSolutionTemplateSolutionTemplatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeSolutionTemplateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeSolutionTemplatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionCollection.cs new file mode 100644 index 000000000000..f32a909fa6fd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionCollection.cs @@ -0,0 +1,395 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSolutionTemplateVersions method from an instance of . + /// + public partial class EdgeSolutionTemplateVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics; + private readonly SolutionTemplateVersionsRestOperations _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionTemplateVersionCollection() + { + } + + /// 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 EdgeSolutionTemplateVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSolutionTemplateVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSolutionTemplateVersionResource.ResourceType, out string edgeSolutionTemplateVersionSolutionTemplateVersionsApiVersion); + _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient = new SolutionTemplateVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionTemplateVersionSolutionTemplateVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeSolutionTemplateResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeSolutionTemplateResource.ResourceType), nameof(id)); + } + + /// + /// Get a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionTemplateVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionCollection.Get"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionTemplateVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Solution Template Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions + /// + /// + /// Operation Id + /// SolutionTemplateVersion_ListBySolutionTemplate + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateListBySolutionTemplateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateListBySolutionTemplateNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionTemplateVersionResource(Client, EdgeSolutionTemplateVersionData.DeserializeEdgeSolutionTemplateVersionData(e)), _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics, Pipeline, "EdgeSolutionTemplateVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Solution Template Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions + /// + /// + /// Operation Id + /// SolutionTemplateVersion_ListBySolutionTemplate + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateListBySolutionTemplateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateListBySolutionTemplateNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionTemplateVersionResource(Client, EdgeSolutionTemplateVersionData.DeserializeEdgeSolutionTemplateVersionData(e)), _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics, Pipeline, "EdgeSolutionTemplateVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionTemplateVersionName, 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.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionTemplateVersionName, 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.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionTemplateVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateVersionResource(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.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplateVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, solutionTemplateVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateVersionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionData.Serialization.cs new file mode 100644 index 000000000000..9358df3521ca --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionData.Serialization.cs @@ -0,0 +1,172 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSolutionTemplateVersionData : 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(EdgeSolutionTemplateVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSolutionTemplateVersionData 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(EdgeSolutionTemplateVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplateVersionData(document.RootElement, options); + } + + internal static EdgeSolutionTemplateVersionData DeserializeEdgeSolutionTemplateVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSolutionTemplateVersionProperties properties = default; + ETag? etag = 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 = EdgeSolutionTemplateVersionProperties.DeserializeEdgeSolutionTemplateVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplateVersionData( + id, + name, + type, + systemData, + properties, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateVersionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplateVersionData 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 DeserializeEdgeSolutionTemplateVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionData.cs new file mode 100644 index 000000000000..221b55c5c0b3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionData.cs @@ -0,0 +1,79 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSolutionTemplateVersion data model. + /// Solution Template Version Resource. Contains configurations that use expressions which can be resolved hierarchically along with edge specifications. + /// + public partial class EdgeSolutionTemplateVersionData : 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 EdgeSolutionTemplateVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplateVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSolutionTemplateVersionProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSolutionTemplateVersionProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionResource.Serialization.cs new file mode 100644 index 000000000000..8e04d5b999fd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSolutionTemplateVersionResource : IJsonModel + { + private static EdgeSolutionTemplateVersionData s_dataDeserializationInstance; + private static EdgeSolutionTemplateVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSolutionTemplateVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSolutionTemplateVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionResource.cs new file mode 100644 index 000000000000..d9110342061f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionTemplateVersionResource.cs @@ -0,0 +1,356 @@ +// 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; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSolutionTemplateVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSolutionTemplateVersionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSolutionTemplateVersion method. + /// + public partial class EdgeSolutionTemplateVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The solutionTemplateName. + /// The solutionTemplateVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics; + private readonly SolutionTemplateVersionsRestOperations _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient; + private readonly EdgeSolutionTemplateVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/solutionTemplates/versions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionTemplateVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSolutionTemplateVersionResource(ArmClient client, EdgeSolutionTemplateVersionData 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 EdgeSolutionTemplateVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSolutionTemplateVersionSolutionTemplateVersionsApiVersion); + _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient = new SolutionTemplateVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionTemplateVersionSolutionTemplateVersionsApiVersion); +#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 EdgeSolutionTemplateVersionData 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 Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionResource.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.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 EdgeSolutionTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Template Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName} + /// + /// + /// Operation Id + /// SolutionTemplateVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionResource.Get"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionTemplateVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request for bulk deploy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName}/bulkDeploySolution + /// + /// + /// Operation Id + /// SolutionTemplateVersions_BulkDeploySolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task BulkDeploySolutionAsync(WaitUntil waitUntil, BulkDeploySolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionResource.BulkDeploySolution"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.BulkDeploySolutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics, Pipeline, _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateBulkDeploySolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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; + } + } + + /// + /// Post request for bulk deploy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName}/bulkDeploySolution + /// + /// + /// Operation Id + /// SolutionTemplateVersions_BulkDeploySolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation BulkDeploySolution(WaitUntil waitUntil, BulkDeploySolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionResource.BulkDeploySolution"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.BulkDeploySolution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics, Pipeline, _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateBulkDeploySolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request for bulk publish + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName}/bulkPublishSolution + /// + /// + /// Operation Id + /// SolutionTemplateVersions_BulkPublishSolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task BulkPublishSolutionAsync(WaitUntil waitUntil, BulkPublishSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionResource.BulkPublishSolution"); + scope.Start(); + try + { + var response = await _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.BulkPublishSolutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics, Pipeline, _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateBulkPublishSolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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; + } + } + + /// + /// Post request for bulk publish + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName}/versions/{solutionTemplateVersionName}/bulkPublishSolution + /// + /// + /// Operation Id + /// SolutionTemplateVersions_BulkPublishSolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation BulkPublishSolution(WaitUntil waitUntil, BulkPublishSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics.CreateScope("EdgeSolutionTemplateVersionResource.BulkPublishSolution"); + scope.Start(); + try + { + var response = _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.BulkPublishSolution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionTemplateVersionSolutionTemplateVersionsClientDiagnostics, Pipeline, _edgeSolutionTemplateVersionSolutionTemplateVersionsRestClient.CreateBulkPublishSolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionCollection.cs new file mode 100644 index 000000000000..84982e3f0273 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeSolutionVersions method from an instance of . + /// + public partial class EdgeSolutionVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeSolutionVersionSolutionVersionsClientDiagnostics; + private readonly SolutionVersionsRestOperations _edgeSolutionVersionSolutionVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionVersionCollection() + { + } + + /// 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 EdgeSolutionVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionVersionSolutionVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSolutionVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeSolutionVersionResource.ResourceType, out string edgeSolutionVersionSolutionVersionsApiVersion); + _edgeSolutionVersionSolutionVersionsRestClient = new SolutionVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionVersionSolutionVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeSolutionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeSolutionResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the solution version. + /// 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 solutionVersionName, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, _edgeSolutionVersionSolutionVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, 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 Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the solution version. + /// 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 solutionVersionName, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, _edgeSolutionVersionSolutionVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.Get"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Solution Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions + /// + /// + /// Operation Id + /// SolutionVersion_ListBySolution + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionVersionSolutionVersionsRestClient.CreateListBySolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionVersionSolutionVersionsRestClient.CreateListBySolutionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionVersionResource(Client, EdgeSolutionVersionData.DeserializeEdgeSolutionVersionData(e)), _edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, "EdgeSolutionVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Solution Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions + /// + /// + /// Operation Id + /// SolutionVersion_ListBySolution + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeSolutionVersionSolutionVersionsRestClient.CreateListBySolutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeSolutionVersionSolutionVersionsRestClient.CreateListBySolutionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionVersionResource(Client, EdgeSolutionVersionData.DeserializeEdgeSolutionVersionData(e)), _edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, "EdgeSolutionVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, 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.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, 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.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionVersionResource(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.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution version. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, solutionVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionVersionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionData.Serialization.cs new file mode 100644 index 000000000000..1fb96f2d36ed --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeSolutionVersionData : 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(EdgeSolutionVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeSolutionVersionData 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(EdgeSolutionVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionData(document.RootElement, options); + } + + internal static EdgeSolutionVersionData DeserializeEdgeSolutionVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSolutionVersionProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeSolutionVersionProperties.DeserializeEdgeSolutionVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionData 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 DeserializeEdgeSolutionVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionData.cs new file mode 100644 index 000000000000..4c105159a0d7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeSolutionVersion data model. + /// Solution Version Resource. It has the resolved configuration along with edge specification. + /// + public partial class EdgeSolutionVersionData : 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 EdgeSolutionVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeSolutionVersionProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSolutionVersionProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionResource.Serialization.cs new file mode 100644 index 000000000000..b80532241b74 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeSolutionVersionResource : IJsonModel + { + private static EdgeSolutionVersionData s_dataDeserializationInstance; + private static EdgeSolutionVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeSolutionVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeSolutionVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionResource.cs new file mode 100644 index 000000000000..15bf2e58f9d7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeSolutionVersionResource.cs @@ -0,0 +1,348 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeSolutionVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeSolutionVersionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeSolutionVersion method. + /// + public partial class EdgeSolutionVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The targetName. + /// The solutionName. + /// The solutionVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeSolutionVersionSolutionVersionsClientDiagnostics; + private readonly SolutionVersionsRestOperations _edgeSolutionVersionSolutionVersionsRestClient; + private readonly EdgeSolutionVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/targets/solutions/versions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeSolutionVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeSolutionVersionResource(ArmClient client, EdgeSolutionVersionData 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 EdgeSolutionVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeSolutionVersionSolutionVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeSolutionVersionSolutionVersionsApiVersion); + _edgeSolutionVersionSolutionVersionsRestClient = new SolutionVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeSolutionVersionSolutionVersionsApiVersion); +#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 EdgeSolutionVersionData 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 Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionResource.Get"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionResource.Get"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeSolutionVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionResource.Delete"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, _edgeSolutionVersionSolutionVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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 Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionResource.Delete"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, _edgeSolutionVersionSolutionVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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; + } + } + + /// + /// Update a Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionResource.Update"); + scope.Start(); + try + { + var response = await _edgeSolutionVersionSolutionVersionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, _edgeSolutionVersionSolutionVersionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.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 Solution Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName}/versions/{solutionVersionName} + /// + /// + /// Operation Id + /// SolutionVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeSolutionVersionSolutionVersionsClientDiagnostics.CreateScope("EdgeSolutionVersionResource.Update"); + scope.Start(); + try + { + var response = _edgeSolutionVersionSolutionVersionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeSolutionVersionSolutionVersionsClientDiagnostics, Pipeline, _edgeSolutionVersionSolutionVersionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetCollection.cs new file mode 100644 index 000000000000..59d57fade0c9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetCollection.cs @@ -0,0 +1,494 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeTargets method from an instance of . + /// + public partial class EdgeTargetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeTargetTargetsClientDiagnostics; + private readonly TargetsRestOperations _edgeTargetTargetsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeTargetCollection() + { + } + + /// 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 EdgeTargetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeTargetTargetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeTargetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeTargetResource.ResourceType, out string edgeTargetTargetsApiVersion); + _edgeTargetTargetsRestClient = new TargetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeTargetTargetsApiVersion); +#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 Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the target. + /// 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 targetName, EdgeTargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, targetName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeTargetOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, targetName, 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 Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the target. + /// 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 targetName, EdgeTargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, targetName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeTargetOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, targetName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.Get"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, targetName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeTargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.Get"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, targetName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeTargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets + /// + /// + /// Operation Id + /// Target_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeTargetTargetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeTargetTargetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeTargetResource(Client, EdgeTargetData.DeserializeEdgeTargetData(e)), _edgeTargetTargetsClientDiagnostics, Pipeline, "EdgeTargetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List by specified resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets + /// + /// + /// Operation Id + /// Target_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeTargetTargetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeTargetTargetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeTargetResource(Client, EdgeTargetData.DeserializeEdgeTargetData(e)), _edgeTargetTargetsClientDiagnostics, Pipeline, "EdgeTargetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, targetName, 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.Exists"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, targetName, 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, targetName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeTargetResource(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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, targetName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeTargetResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetData.Serialization.cs new file mode 100644 index 000000000000..9e5f1e1ca794 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetData.Serialization.cs @@ -0,0 +1,212 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeTargetData : 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(EdgeTargetData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + } + + EdgeTargetData 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(EdgeTargetData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeTargetData(document.RootElement, options); + } + + internal static EdgeTargetData DeserializeEdgeTargetData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeTargetProperties properties = default; + ETag? etag = default; + ExtendedLocation extendedLocation = 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 = EdgeTargetProperties.DeserializeEdgeTargetProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeTargetData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + extendedLocation, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeTargetData)} does not support writing '{options.Format}' format."); + } + } + + EdgeTargetData 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 DeserializeEdgeTargetData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeTargetData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetData.cs new file mode 100644 index 000000000000..3f2d7925182b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetData.cs @@ -0,0 +1,92 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeTarget data model. + /// Target Resource. Represents a resource to be deployed on the edge. + /// + public partial class EdgeTargetData : 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 EdgeTargetData(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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// + /// Keeps track of any properties unknown to the library. + internal EdgeTargetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeTargetProperties properties, ETag? etag, ExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeTargetData() + { + } + + /// The resource-specific properties for this resource. + public EdgeTargetProperties Properties { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetResource.Serialization.cs new file mode 100644 index 000000000000..8744cbe89ab5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeTargetResource : IJsonModel + { + private static EdgeTargetData s_dataDeserializationInstance; + private static EdgeTargetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeTargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetResource.cs new file mode 100644 index 000000000000..7e07e0d0fa35 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeTargetResource.cs @@ -0,0 +1,1422 @@ +// 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.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeTarget along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeTargetResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeTarget method. + /// + public partial class EdgeTargetResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The targetName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string targetName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeTargetTargetsClientDiagnostics; + private readonly TargetsRestOperations _edgeTargetTargetsRestClient; + private readonly EdgeTargetData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/targets"; + + /// Initializes a new instance of the class for mocking. + protected EdgeTargetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeTargetResource(ArmClient client, EdgeTargetData 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 EdgeTargetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeTargetTargetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeTargetTargetsApiVersion); + _edgeTargetTargetsRestClient = new TargetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeTargetTargetsApiVersion); +#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 EdgeTargetData 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 EdgeSolutionResources in the EdgeTarget. + /// An object representing collection of EdgeSolutionResources and their operations over a EdgeSolutionResource. + public virtual EdgeSolutionCollection GetEdgeSolutions() + { + return GetCachedClient(client => new EdgeSolutionCollection(client, Id)); + } + + /// + /// Get a Solution resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSolutionAsync(string solutionName, CancellationToken cancellationToken = default) + { + return await GetEdgeSolutions().GetAsync(solutionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Solution resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/solutions/{solutionName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the solution. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSolution(string solutionName, CancellationToken cancellationToken = default) + { + return GetEdgeSolutions().Get(solutionName, cancellationToken); + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.Get"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeTargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.Get"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeTargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Delete + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Force delete. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.Delete"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceDelete, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceDelete).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 Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Delete + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Force delete. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.Delete"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceDelete, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// update a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeTargetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.Update"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeTargetOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.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 Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeTargetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.Update"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeTargetOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.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; + } + } + + /// + /// Post request to deploy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/installSolution + /// + /// + /// Operation Id + /// Targets_InstallSolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task InstallSolutionAsync(WaitUntil waitUntil, InstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.InstallSolution"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.InstallSolutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateInstallSolutionRequest(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; + } + } + + /// + /// Post request to deploy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/installSolution + /// + /// + /// Operation Id + /// Targets_InstallSolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation InstallSolution(WaitUntil waitUntil, InstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.InstallSolution"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.InstallSolution(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateInstallSolutionRequest(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; + } + } + + /// + /// Post request to uninstall + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/uninstallSolution + /// + /// + /// Operation Id + /// Targets_UninstallSolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task UninstallSolutionAsync(WaitUntil waitUntil, UninstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.UninstallSolution"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.UninstallSolutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateUninstallSolutionRequest(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; + } + } + + /// + /// Post request to uninstall + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/uninstallSolution + /// + /// + /// Operation Id + /// Targets_UninstallSolution + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UninstallSolution(WaitUntil waitUntil, UninstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.UninstallSolution"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.UninstallSolution(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateUninstallSolutionRequest(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; + } + } + + /// + /// Post request to remove solution version revision + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/removeRevision + /// + /// + /// Operation Id + /// Targets_RemoveRevision + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task RemoveRevisionAsync(WaitUntil waitUntil, RemoveRevisionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.RemoveRevision"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.RemoveRevisionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateRemoveRevisionRequest(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; + } + } + + /// + /// Post request to remove solution version revision + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/removeRevision + /// + /// + /// Operation Id + /// Targets_RemoveRevision + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RemoveRevision(WaitUntil waitUntil, RemoveRevisionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.RemoveRevision"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.RemoveRevision(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateRemoveRevisionRequest(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; + } + } + + /// + /// Post request to resolve configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/resolveConfiguration + /// + /// + /// Operation Id + /// Targets_ResolveConfiguration + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ResolveConfigurationAsync(WaitUntil waitUntil, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.ResolveConfiguration"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.ResolveConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new ResolvedConfigurationOperationSource(), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateResolveConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to resolve configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/resolveConfiguration + /// + /// + /// Operation Id + /// Targets_ResolveConfiguration + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ResolveConfiguration(WaitUntil waitUntil, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.ResolveConfiguration"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.ResolveConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new ResolvedConfigurationOperationSource(), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateResolveConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to review configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/reviewSolutionVersion + /// + /// + /// Operation Id + /// Targets_ReviewSolutionVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ReviewSolutionVersionAsync(WaitUntil waitUntil, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.ReviewSolutionVersion"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.ReviewSolutionVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateReviewSolutionVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to review configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/reviewSolutionVersion + /// + /// + /// Operation Id + /// Targets_ReviewSolutionVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ReviewSolutionVersion(WaitUntil waitUntil, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.ReviewSolutionVersion"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.ReviewSolutionVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateReviewSolutionVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to publish + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/publishSolutionVersion + /// + /// + /// Operation Id + /// Targets_PublishSolutionVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> PublishSolutionVersionAsync(WaitUntil waitUntil, EdgeSolutionVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.PublishSolutionVersion"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.PublishSolutionVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreatePublishSolutionVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to publish + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/publishSolutionVersion + /// + /// + /// Operation Id + /// Targets_PublishSolutionVersion + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PublishSolutionVersion(WaitUntil waitUntil, EdgeSolutionVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.PublishSolutionVersion"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.PublishSolutionVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreatePublishSolutionVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to update external validation status + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/updateExternalValidationStatus + /// + /// + /// Operation Id + /// Targets_UpdateExternalValidationStatus + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateExternalValidationStatusAsync(WaitUntil waitUntil, UpdateExternalValidationStatusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.UpdateExternalValidationStatus"); + scope.Start(); + try + { + var response = await _edgeTargetTargetsRestClient.UpdateExternalValidationStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateUpdateExternalValidationStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Post request to update external validation status + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName}/updateExternalValidationStatus + /// + /// + /// Operation Id + /// Targets_UpdateExternalValidationStatus + /// + /// + /// Default Api Version + /// 2025-06-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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateExternalValidationStatus(WaitUntil waitUntil, UpdateExternalValidationStatusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.UpdateExternalValidationStatus"); + scope.Start(); + try + { + var response = _edgeTargetTargetsRestClient.UpdateExternalValidationStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeSolutionVersionOperationSource(Client), _edgeTargetTargetsClientDiagnostics, Pipeline, _edgeTargetTargetsRestClient.CreateUpdateExternalValidationStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.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 _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeTargetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeTargetPatch(); + 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.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 = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeTargetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeTargetPatch(); + 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.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 _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeTargetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeTargetPatch(); + 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.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 = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeTargetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeTargetPatch(); + 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.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 _edgeTargetTargetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EdgeTargetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EdgeTargetPatch(); + 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.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeTargetTargetsClientDiagnostics.CreateScope("EdgeTargetResource.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 = _edgeTargetTargetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EdgeTargetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EdgeTargetPatch(); + 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowCollection.cs new file mode 100644 index 000000000000..7a2ad9d461a8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeWorkflows method from an instance of . + /// + public partial class EdgeWorkflowCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeWorkflowWorkflowsClientDiagnostics; + private readonly WorkflowsRestOperations _edgeWorkflowWorkflowsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeWorkflowCollection() + { + } + + /// 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 EdgeWorkflowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeWorkflowWorkflowsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeWorkflowResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeWorkflowResource.ResourceType, out string edgeWorkflowWorkflowsApiVersion); + _edgeWorkflowWorkflowsRestClient = new WorkflowsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeWorkflowWorkflowsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeContextResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeContextResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the workflow. + /// 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 workflowName, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowOperationSource(Client), _edgeWorkflowWorkflowsClientDiagnostics, Pipeline, _edgeWorkflowWorkflowsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, 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 Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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. + /// Name of the workflow. + /// 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 workflowName, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowOperationSource(Client), _edgeWorkflowWorkflowsClientDiagnostics, Pipeline, _edgeWorkflowWorkflowsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.Get"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.Get"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Workflow resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows + /// + /// + /// Operation Id + /// Workflow_ListByContext + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeWorkflowWorkflowsRestClient.CreateListByContextRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeWorkflowWorkflowsRestClient.CreateListByContextNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeWorkflowResource(Client, EdgeWorkflowData.DeserializeEdgeWorkflowData(e)), _edgeWorkflowWorkflowsClientDiagnostics, Pipeline, "EdgeWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Workflow resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows + /// + /// + /// Operation Id + /// Workflow_ListByContext + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeWorkflowWorkflowsRestClient.CreateListByContextRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeWorkflowWorkflowsRestClient.CreateListByContextNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeWorkflowResource(Client, EdgeWorkflowData.DeserializeEdgeWorkflowData(e)), _edgeWorkflowWorkflowsClientDiagnostics, Pipeline, "EdgeWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, 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.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, 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.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowResource(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.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowData.Serialization.cs new file mode 100644 index 000000000000..c3d579617896 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeWorkflowData : 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(EdgeWorkflowData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeWorkflowData 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(EdgeWorkflowData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowData(document.RootElement, options); + } + + internal static EdgeWorkflowData DeserializeEdgeWorkflowData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeWorkflowProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeWorkflowProperties.DeserializeEdgeWorkflowProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowData)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowData 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 DeserializeEdgeWorkflowData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowData.cs new file mode 100644 index 000000000000..ef40197839dd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeWorkflow data model. + /// Workflow Resource + /// + public partial class EdgeWorkflowData : 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 EdgeWorkflowData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeWorkflowProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeWorkflowProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowResource.Serialization.cs new file mode 100644 index 000000000000..ea27144fe772 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeWorkflowResource : IJsonModel + { + private static EdgeWorkflowData s_dataDeserializationInstance; + private static EdgeWorkflowData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeWorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeWorkflowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowResource.cs new file mode 100644 index 000000000000..03db6804d726 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowResource.cs @@ -0,0 +1,416 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeWorkflow along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeWorkflowResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeWorkflow method. + /// + public partial class EdgeWorkflowResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The contextName. + /// The workflowName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeWorkflowWorkflowsClientDiagnostics; + private readonly WorkflowsRestOperations _edgeWorkflowWorkflowsRestClient; + private readonly EdgeWorkflowData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/contexts/workflows"; + + /// Initializes a new instance of the class for mocking. + protected EdgeWorkflowResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeWorkflowResource(ArmClient client, EdgeWorkflowData 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 EdgeWorkflowResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeWorkflowWorkflowsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeWorkflowWorkflowsApiVersion); + _edgeWorkflowWorkflowsRestClient = new WorkflowsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeWorkflowWorkflowsApiVersion); +#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 EdgeWorkflowData 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 EdgeWorkflowVersionResources in the EdgeWorkflow. + /// An object representing collection of EdgeWorkflowVersionResources and their operations over a EdgeWorkflowVersionResource. + public virtual EdgeWorkflowVersionCollection GetEdgeWorkflowVersions() + { + return GetCachedClient(client => new EdgeWorkflowVersionCollection(client, Id)); + } + + /// + /// Get a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeWorkflowVersionAsync(string versionName, CancellationToken cancellationToken = default) + { + return await GetEdgeWorkflowVersions().GetAsync(versionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeWorkflowVersion(string versionName, CancellationToken cancellationToken = default) + { + return GetEdgeWorkflowVersions().Get(versionName, cancellationToken); + } + + /// + /// Get a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowResource.Get"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.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 EdgeWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowResource.Get"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowResource.Delete"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeWorkflowWorkflowsClientDiagnostics, Pipeline, _edgeWorkflowWorkflowsRestClient.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 Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowResource.Delete"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeWorkflowWorkflowsClientDiagnostics, Pipeline, _edgeWorkflowWorkflowsRestClient.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; + } + } + + /// + /// update a Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowResource.Update"); + scope.Start(); + try + { + var response = await _edgeWorkflowWorkflowsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowOperationSource(Client), _edgeWorkflowWorkflowsClientDiagnostics, Pipeline, _edgeWorkflowWorkflowsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.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 Workflow resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowWorkflowsClientDiagnostics.CreateScope("EdgeWorkflowResource.Update"); + scope.Start(); + try + { + var response = _edgeWorkflowWorkflowsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowOperationSource(Client), _edgeWorkflowWorkflowsClientDiagnostics, Pipeline, _edgeWorkflowWorkflowsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionCollection.cs new file mode 100644 index 000000000000..ecf68128684e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionCollection.cs @@ -0,0 +1,493 @@ +// 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.WorkloadOrchestration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEdgeWorkflowVersions method from an instance of . + /// + public partial class EdgeWorkflowVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _edgeWorkflowVersionWorkflowVersionsClientDiagnostics; + private readonly WorkflowVersionsRestOperations _edgeWorkflowVersionWorkflowVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected EdgeWorkflowVersionCollection() + { + } + + /// 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 EdgeWorkflowVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeWorkflowVersionWorkflowVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeWorkflowVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeWorkflowVersionResource.ResourceType, out string edgeWorkflowVersionWorkflowVersionsApiVersion); + _edgeWorkflowVersionWorkflowVersionsRestClient = new WorkflowVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeWorkflowVersionWorkflowVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != EdgeWorkflowResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EdgeWorkflowResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 workflowVersion. + /// 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 versionName, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowVersionOperationSource(Client), _edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, _edgeWorkflowVersionWorkflowVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, 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 Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-06-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 workflowVersion. + /// 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 versionName, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowVersionOperationSource(Client), _edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, _edgeWorkflowVersionWorkflowVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.Get"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.Get"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Workflow Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions + /// + /// + /// Operation Id + /// WorkflowVersion_ListByWorkflow + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeWorkflowVersionWorkflowVersionsRestClient.CreateListByWorkflowRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeWorkflowVersionWorkflowVersionsRestClient.CreateListByWorkflowNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeWorkflowVersionResource(Client, EdgeWorkflowVersionData.DeserializeEdgeWorkflowVersionData(e)), _edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, "EdgeWorkflowVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Workflow Version Resources + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions + /// + /// + /// Operation Id + /// WorkflowVersion_ListByWorkflow + /// + /// + /// Default Api Version + /// 2025-06-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) => _edgeWorkflowVersionWorkflowVersionsRestClient.CreateListByWorkflowRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeWorkflowVersionWorkflowVersionsRestClient.CreateListByWorkflowNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeWorkflowVersionResource(Client, EdgeWorkflowVersionData.DeserializeEdgeWorkflowVersionData(e)), _edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, "EdgeWorkflowVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, 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.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.Exists"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, 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.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowVersionResource(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.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the workflowVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, versionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowVersionResource(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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionData.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionData.Serialization.cs new file mode 100644 index 000000000000..4b5d11079884 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionData.Serialization.cs @@ -0,0 +1,189 @@ +// 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; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + public partial class EdgeWorkflowVersionData : 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(EdgeWorkflowVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + ((IJsonModel)ExtendedLocation).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + EdgeWorkflowVersionData 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(EdgeWorkflowVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowVersionData(document.RootElement, options); + } + + internal static EdgeWorkflowVersionData DeserializeEdgeWorkflowVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeWorkflowVersionProperties properties = default; + ExtendedLocation extendedLocation = default; + ETag? etag = 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 = EdgeWorkflowVersionProperties.DeserializeEdgeWorkflowVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowVersionData( + id, + name, + type, + systemData, + properties, + extendedLocation, + etag, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowVersionData)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowVersionData 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 DeserializeEdgeWorkflowVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionData.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionData.cs new file mode 100644 index 000000000000..453e966de6f2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionData.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.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// A class representing the EdgeWorkflowVersion data model. + /// Workflow Version Resource + /// + public partial class EdgeWorkflowVersionData : 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 EdgeWorkflowVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EdgeWorkflowVersionProperties properties, ExtendedLocation extendedLocation, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeWorkflowVersionProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionResource.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionResource.Serialization.cs new file mode 100644 index 000000000000..dcf47fe474db --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionResource.Serialization.cs @@ -0,0 +1,29 @@ +// 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.WorkloadOrchestration +{ + public partial class EdgeWorkflowVersionResource : IJsonModel + { + private static EdgeWorkflowVersionData s_dataDeserializationInstance; + private static EdgeWorkflowVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EdgeWorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + EdgeWorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadOrchestrationContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionResource.cs new file mode 100644 index 000000000000..886f3b9543fc --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/EdgeWorkflowVersionResource.cs @@ -0,0 +1,417 @@ +// 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.WorkloadOrchestration +{ + /// + /// A Class representing an EdgeWorkflowVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEdgeWorkflowVersionResource method. + /// Otherwise you can get one from its parent resource using the GetEdgeWorkflowVersion method. + /// + public partial class EdgeWorkflowVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The contextName. + /// The workflowName. + /// The versionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _edgeWorkflowVersionWorkflowVersionsClientDiagnostics; + private readonly WorkflowVersionsRestOperations _edgeWorkflowVersionWorkflowVersionsRestClient; + private readonly EdgeWorkflowVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/contexts/workflows/versions"; + + /// Initializes a new instance of the class for mocking. + protected EdgeWorkflowVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EdgeWorkflowVersionResource(ArmClient client, EdgeWorkflowVersionData 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 EdgeWorkflowVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _edgeWorkflowVersionWorkflowVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeWorkflowVersionWorkflowVersionsApiVersion); + _edgeWorkflowVersionWorkflowVersionsRestClient = new WorkflowVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeWorkflowVersionWorkflowVersionsApiVersion); +#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 EdgeWorkflowVersionData 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 EdgeExecutionResources in the EdgeWorkflowVersion. + /// An object representing collection of EdgeExecutionResources and their operations over a EdgeExecutionResource. + public virtual EdgeExecutionCollection GetEdgeExecutions() + { + return GetCachedClient(client => new EdgeExecutionCollection(client, Id)); + } + + /// + /// Get Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeExecutionAsync(string executionName, CancellationToken cancellationToken = default) + { + return await GetEdgeExecutions().GetAsync(executionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Execution Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName}/executions/{executionName} + /// + /// + /// Operation Id + /// Execution_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Execution. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeExecution(string executionName, CancellationToken cancellationToken = default) + { + return GetEdgeExecutions().Get(executionName, cancellationToken); + } + + /// + /// Get a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionResource.Get"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionResource.Get"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EdgeWorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionResource.Delete"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(_edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, _edgeWorkflowVersionWorkflowVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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 Workflow Version Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Delete + /// + /// + /// Default Api Version + /// 2025-06-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 = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionResource.Delete"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(_edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, _edgeWorkflowVersionWorkflowVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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; + } + } + + /// + /// update an WorkflowVersion Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionResource.Update"); + scope.Start(); + try + { + var response = await _edgeWorkflowVersionWorkflowVersionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowVersionOperationSource(Client), _edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, _edgeWorkflowVersionWorkflowVersionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.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 an WorkflowVersion Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName}/workflows/{workflowName}/versions/{versionName} + /// + /// + /// Operation Id + /// WorkflowVersion_Update + /// + /// + /// Default Api Version + /// 2025-06-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, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _edgeWorkflowVersionWorkflowVersionsClientDiagnostics.CreateScope("EdgeWorkflowVersionResource.Update"); + scope.Start(); + try + { + var response = _edgeWorkflowVersionWorkflowVersionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new WorkloadOrchestrationArmOperation(new EdgeWorkflowVersionOperationSource(Client), _edgeWorkflowVersionWorkflowVersionsClientDiagnostics, Pipeline, _edgeWorkflowVersionWorkflowVersionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationArmClient.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationArmClient.cs new file mode 100644 index 000000000000..406874b913f0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationArmClient.cs @@ -0,0 +1,436 @@ +// 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.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableWorkloadOrchestrationArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableWorkloadOrchestrationArmClient() + { + } + + /// 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 MockableWorkloadOrchestrationArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableWorkloadOrchestrationArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of EdgeJobResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of EdgeJobResources and their operations over a EdgeJobResource. + public virtual EdgeJobCollection GetEdgeJobs(ResourceIdentifier scope) + { + return new EdgeJobCollection(Client, scope); + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the Job. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeJobAsync(ResourceIdentifier scope, string jobName, CancellationToken cancellationToken = default) + { + return await GetEdgeJobs(scope).GetAsync(jobName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the Job. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeJob(ResourceIdentifier scope, string jobName, CancellationToken cancellationToken = default) + { + return GetEdgeJobs(scope).Get(jobName, cancellationToken); + } + + /// Gets a collection of EdgeSchemaReferenceResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of EdgeSchemaReferenceResources and their operations over a EdgeSchemaReferenceResource. + public virtual EdgeSchemaReferenceCollection GetEdgeSchemaReferences(ResourceIdentifier scope) + { + return new EdgeSchemaReferenceCollection(Client, scope); + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSchemaReferenceAsync(ResourceIdentifier scope, string schemaReferenceName, CancellationToken cancellationToken = default) + { + return await GetEdgeSchemaReferences(scope).GetAsync(schemaReferenceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The name of the SchemaReference. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSchemaReference(ResourceIdentifier scope, string schemaReferenceName, CancellationToken cancellationToken = default) + { + return GetEdgeSchemaReferences(scope).Get(schemaReferenceName, cancellationToken); + } + + /// + /// 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 EdgeDynamicSchemaResource GetEdgeDynamicSchemaResource(ResourceIdentifier id) + { + EdgeDynamicSchemaResource.ValidateResourceId(id); + return new EdgeDynamicSchemaResource(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 EdgeSchemaResource GetEdgeSchemaResource(ResourceIdentifier id) + { + EdgeSchemaResource.ValidateResourceId(id); + return new EdgeSchemaResource(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 EdgeSchemaVersionResource GetEdgeSchemaVersionResource(ResourceIdentifier id) + { + EdgeSchemaVersionResource.ValidateResourceId(id); + return new EdgeSchemaVersionResource(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 EdgeSolutionVersionResource GetEdgeSolutionVersionResource(ResourceIdentifier id) + { + EdgeSolutionVersionResource.ValidateResourceId(id); + return new EdgeSolutionVersionResource(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 EdgeJobResource GetEdgeJobResource(ResourceIdentifier id) + { + EdgeJobResource.ValidateResourceId(id); + return new EdgeJobResource(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 EdgeTargetResource GetEdgeTargetResource(ResourceIdentifier id) + { + EdgeTargetResource.ValidateResourceId(id); + return new EdgeTargetResource(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 EdgeDynamicSchemaVersionResource GetEdgeDynamicSchemaVersionResource(ResourceIdentifier id) + { + EdgeDynamicSchemaVersionResource.ValidateResourceId(id); + return new EdgeDynamicSchemaVersionResource(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 EdgeSchemaReferenceResource GetEdgeSchemaReferenceResource(ResourceIdentifier id) + { + EdgeSchemaReferenceResource.ValidateResourceId(id); + return new EdgeSchemaReferenceResource(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 EdgeSolutionResource GetEdgeSolutionResource(ResourceIdentifier id) + { + EdgeSolutionResource.ValidateResourceId(id); + return new EdgeSolutionResource(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 EdgeSolutionTemplateVersionResource GetEdgeSolutionTemplateVersionResource(ResourceIdentifier id) + { + EdgeSolutionTemplateVersionResource.ValidateResourceId(id); + return new EdgeSolutionTemplateVersionResource(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 EdgeSolutionTemplateResource GetEdgeSolutionTemplateResource(ResourceIdentifier id) + { + EdgeSolutionTemplateResource.ValidateResourceId(id); + return new EdgeSolutionTemplateResource(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 EdgeDeploymentInstanceResource GetEdgeDeploymentInstanceResource(ResourceIdentifier id) + { + EdgeDeploymentInstanceResource.ValidateResourceId(id); + return new EdgeDeploymentInstanceResource(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 EdgeDeploymentInstanceHistoryResource GetEdgeDeploymentInstanceHistoryResource(ResourceIdentifier id) + { + EdgeDeploymentInstanceHistoryResource.ValidateResourceId(id); + return new EdgeDeploymentInstanceHistoryResource(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 EdgeConfigTemplateResource GetEdgeConfigTemplateResource(ResourceIdentifier id) + { + EdgeConfigTemplateResource.ValidateResourceId(id); + return new EdgeConfigTemplateResource(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 EdgeConfigTemplateVersionResource GetEdgeConfigTemplateVersionResource(ResourceIdentifier id) + { + EdgeConfigTemplateVersionResource.ValidateResourceId(id); + return new EdgeConfigTemplateVersionResource(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 EdgeWorkflowResource GetEdgeWorkflowResource(ResourceIdentifier id) + { + EdgeWorkflowResource.ValidateResourceId(id); + return new EdgeWorkflowResource(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 EdgeWorkflowVersionResource GetEdgeWorkflowVersionResource(ResourceIdentifier id) + { + EdgeWorkflowVersionResource.ValidateResourceId(id); + return new EdgeWorkflowVersionResource(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 EdgeExecutionResource GetEdgeExecutionResource(ResourceIdentifier id) + { + EdgeExecutionResource.ValidateResourceId(id); + return new EdgeExecutionResource(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 EdgeDiagnosticResource GetEdgeDiagnosticResource(ResourceIdentifier id) + { + EdgeDiagnosticResource.ValidateResourceId(id); + return new EdgeDiagnosticResource(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 EdgeContextResource GetEdgeContextResource(ResourceIdentifier id) + { + EdgeContextResource.ValidateResourceId(id); + return new EdgeContextResource(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 EdgeSiteReferenceResource GetEdgeSiteReferenceResource(ResourceIdentifier id) + { + EdgeSiteReferenceResource.ValidateResourceId(id); + return new EdgeSiteReferenceResource(Client, id); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationResourceGroupResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationResourceGroupResource.cs new file mode 100644 index 000000000000..1f9adef5fe8c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationResourceGroupResource.cs @@ -0,0 +1,450 @@ +// 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.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableWorkloadOrchestrationResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableWorkloadOrchestrationResourceGroupResource() + { + } + + /// 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 MockableWorkloadOrchestrationResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of EdgeSchemaResources in the ResourceGroupResource. + /// An object representing collection of EdgeSchemaResources and their operations over a EdgeSchemaResource. + public virtual EdgeSchemaCollection GetEdgeSchemas() + { + return GetCachedClient(client => new EdgeSchemaCollection(client, Id)); + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSchemaAsync(string schemaName, CancellationToken cancellationToken = default) + { + return await GetEdgeSchemas().GetAsync(schemaName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Schema. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSchema(string schemaName, CancellationToken cancellationToken = default) + { + return GetEdgeSchemas().Get(schemaName, cancellationToken); + } + + /// Gets a collection of EdgeTargetResources in the ResourceGroupResource. + /// An object representing collection of EdgeTargetResources and their operations over a EdgeTargetResource. + public virtual EdgeTargetCollection GetEdgeTargets() + { + return GetCachedClient(client => new EdgeTargetCollection(client, Id)); + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeTargetAsync(string targetName, CancellationToken cancellationToken = default) + { + return await GetEdgeTargets().GetAsync(targetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the target. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeTarget(string targetName, CancellationToken cancellationToken = default) + { + return GetEdgeTargets().Get(targetName, cancellationToken); + } + + /// Gets a collection of EdgeSolutionTemplateResources in the ResourceGroupResource. + /// An object representing collection of EdgeSolutionTemplateResources and their operations over a EdgeSolutionTemplateResource. + public virtual EdgeSolutionTemplateCollection GetEdgeSolutionTemplates() + { + return GetCachedClient(client => new EdgeSolutionTemplateCollection(client, Id)); + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeSolutionTemplateAsync(string solutionTemplateName, CancellationToken cancellationToken = default) + { + return await GetEdgeSolutionTemplates().GetAsync(solutionTemplateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeSolutionTemplate(string solutionTemplateName, CancellationToken cancellationToken = default) + { + return GetEdgeSolutionTemplates().Get(solutionTemplateName, cancellationToken); + } + + /// Gets a collection of EdgeConfigTemplateResources in the ResourceGroupResource. + /// An object representing collection of EdgeConfigTemplateResources and their operations over a EdgeConfigTemplateResource. + public virtual EdgeConfigTemplateCollection GetEdgeConfigTemplates() + { + return GetCachedClient(client => new EdgeConfigTemplateCollection(client, Id)); + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeConfigTemplateAsync(string configTemplateName, CancellationToken cancellationToken = default) + { + return await GetEdgeConfigTemplates().GetAsync(configTemplateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeConfigTemplate(string configTemplateName, CancellationToken cancellationToken = default) + { + return GetEdgeConfigTemplates().Get(configTemplateName, cancellationToken); + } + + /// Gets a collection of EdgeDiagnosticResources in the ResourceGroupResource. + /// An object representing collection of EdgeDiagnosticResources and their operations over a EdgeDiagnosticResource. + public virtual EdgeDiagnosticCollection GetEdgeDiagnostics() + { + return GetCachedClient(client => new EdgeDiagnosticCollection(client, Id)); + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeDiagnosticAsync(string diagnosticName, CancellationToken cancellationToken = default) + { + return await GetEdgeDiagnostics().GetAsync(diagnosticName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Diagnostic. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeDiagnostic(string diagnosticName, CancellationToken cancellationToken = default) + { + return GetEdgeDiagnostics().Get(diagnosticName, cancellationToken); + } + + /// Gets a collection of EdgeContextResources in the ResourceGroupResource. + /// An object representing collection of EdgeContextResources and their operations over a EdgeContextResource. + public virtual EdgeContextCollection GetEdgeContexts() + { + return GetCachedClient(client => new EdgeContextCollection(client, Id)); + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEdgeContextAsync(string contextName, CancellationToken cancellationToken = default) + { + return await GetEdgeContexts().GetAsync(contextName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Context. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEdgeContext(string contextName, CancellationToken cancellationToken = default) + { + return GetEdgeContexts().Get(contextName, cancellationToken); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationSubscriptionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationSubscriptionResource.cs new file mode 100644 index 000000000000..68b68b1c774d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/MockableWorkloadOrchestrationSubscriptionResource.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.WorkloadOrchestration.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableWorkloadOrchestrationSubscriptionResource : ArmResource + { + private ClientDiagnostics _edgeSchemaSchemasClientDiagnostics; + private SchemasRestOperations _edgeSchemaSchemasRestClient; + private ClientDiagnostics _edgeTargetTargetsClientDiagnostics; + private TargetsRestOperations _edgeTargetTargetsRestClient; + private ClientDiagnostics _edgeSolutionTemplateSolutionTemplatesClientDiagnostics; + private SolutionTemplatesRestOperations _edgeSolutionTemplateSolutionTemplatesRestClient; + private ClientDiagnostics _edgeConfigTemplateConfigTemplatesClientDiagnostics; + private ConfigTemplatesRestOperations _edgeConfigTemplateConfigTemplatesRestClient; + private ClientDiagnostics _edgeDiagnosticDiagnosticsClientDiagnostics; + private DiagnosticsRestOperations _edgeDiagnosticDiagnosticsRestClient; + private ClientDiagnostics _edgeContextContextsClientDiagnostics; + private ContextsRestOperations _edgeContextContextsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableWorkloadOrchestrationSubscriptionResource() + { + } + + /// 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 MockableWorkloadOrchestrationSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics EdgeSchemaSchemasClientDiagnostics => _edgeSchemaSchemasClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSchemaResource.ResourceType.Namespace, Diagnostics); + private SchemasRestOperations EdgeSchemaSchemasRestClient => _edgeSchemaSchemasRestClient ??= new SchemasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeSchemaResource.ResourceType)); + private ClientDiagnostics EdgeTargetTargetsClientDiagnostics => _edgeTargetTargetsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeTargetResource.ResourceType.Namespace, Diagnostics); + private TargetsRestOperations EdgeTargetTargetsRestClient => _edgeTargetTargetsRestClient ??= new TargetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeTargetResource.ResourceType)); + private ClientDiagnostics EdgeSolutionTemplateSolutionTemplatesClientDiagnostics => _edgeSolutionTemplateSolutionTemplatesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeSolutionTemplateResource.ResourceType.Namespace, Diagnostics); + private SolutionTemplatesRestOperations EdgeSolutionTemplateSolutionTemplatesRestClient => _edgeSolutionTemplateSolutionTemplatesRestClient ??= new SolutionTemplatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeSolutionTemplateResource.ResourceType)); + private ClientDiagnostics EdgeConfigTemplateConfigTemplatesClientDiagnostics => _edgeConfigTemplateConfigTemplatesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeConfigTemplateResource.ResourceType.Namespace, Diagnostics); + private ConfigTemplatesRestOperations EdgeConfigTemplateConfigTemplatesRestClient => _edgeConfigTemplateConfigTemplatesRestClient ??= new ConfigTemplatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeConfigTemplateResource.ResourceType)); + private ClientDiagnostics EdgeDiagnosticDiagnosticsClientDiagnostics => _edgeDiagnosticDiagnosticsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeDiagnosticResource.ResourceType.Namespace, Diagnostics); + private DiagnosticsRestOperations EdgeDiagnosticDiagnosticsRestClient => _edgeDiagnosticDiagnosticsRestClient ??= new DiagnosticsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeDiagnosticResource.ResourceType)); + private ClientDiagnostics EdgeContextContextsClientDiagnostics => _edgeContextContextsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadOrchestration", EdgeContextResource.ResourceType.Namespace, Diagnostics); + private ContextsRestOperations EdgeContextContextsRestClient => _edgeContextContextsRestClient ??= new ContextsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeContextResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/schemas + /// + /// + /// Operation Id + /// Schema_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeSchemasAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeSchemaSchemasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeSchemaSchemasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaResource(Client, EdgeSchemaData.DeserializeEdgeSchemaData(e)), EdgeSchemaSchemasClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeSchemas", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/schemas + /// + /// + /// Operation Id + /// Schema_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeSchemas(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeSchemaSchemasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeSchemaSchemasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSchemaResource(Client, EdgeSchemaData.DeserializeEdgeSchemaData(e)), EdgeSchemaSchemasClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeSchemas", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/targets + /// + /// + /// Operation Id + /// Target_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeTargetsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeTargetTargetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeTargetTargetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeTargetResource(Client, EdgeTargetData.DeserializeEdgeTargetData(e)), EdgeTargetTargetsClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeTargets", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/targets + /// + /// + /// Operation Id + /// Target_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeTargets(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeTargetTargetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeTargetTargetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeTargetResource(Client, EdgeTargetData.DeserializeEdgeTargetData(e)), EdgeTargetTargetsClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeTargets", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/solutionTemplates + /// + /// + /// Operation Id + /// SolutionTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeSolutionTemplatesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeSolutionTemplateSolutionTemplatesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeSolutionTemplateSolutionTemplatesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionTemplateResource(Client, EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(e)), EdgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeSolutionTemplates", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/solutionTemplates + /// + /// + /// Operation Id + /// SolutionTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeSolutionTemplates(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeSolutionTemplateSolutionTemplatesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeSolutionTemplateSolutionTemplatesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeSolutionTemplateResource(Client, EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(e)), EdgeSolutionTemplateSolutionTemplatesClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeSolutionTemplates", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/configTemplates + /// + /// + /// Operation Id + /// ConfigTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeConfigTemplatesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeConfigTemplateConfigTemplatesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeConfigTemplateConfigTemplatesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeConfigTemplateResource(Client, EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(e)), EdgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeConfigTemplates", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/configTemplates + /// + /// + /// Operation Id + /// ConfigTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeConfigTemplates(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeConfigTemplateConfigTemplatesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeConfigTemplateConfigTemplatesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeConfigTemplateResource(Client, EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(e)), EdgeConfigTemplateConfigTemplatesClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeConfigTemplates", "value", "nextLink", cancellationToken); + } + + /// + /// Lists Diagnostics resources within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/diagnostics + /// + /// + /// Operation Id + /// Diagnostic_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeDiagnosticsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeDiagnosticDiagnosticsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeDiagnosticDiagnosticsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeDiagnosticResource(Client, EdgeDiagnosticData.DeserializeEdgeDiagnosticData(e)), EdgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeDiagnostics", "value", "nextLink", cancellationToken); + } + + /// + /// Lists Diagnostics resources within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/diagnostics + /// + /// + /// Operation Id + /// Diagnostic_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeDiagnostics(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeDiagnosticDiagnosticsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeDiagnosticDiagnosticsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeDiagnosticResource(Client, EdgeDiagnosticData.DeserializeEdgeDiagnosticData(e)), EdgeDiagnosticDiagnosticsClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeDiagnostics", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/contexts + /// + /// + /// Operation Id + /// Context_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeContextsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeContextContextsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeContextContextsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeContextResource(Client, EdgeContextData.DeserializeEdgeContextData(e)), EdgeContextContextsClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeContexts", "value", "nextLink", cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/contexts + /// + /// + /// Operation Id + /// Context_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeContexts(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeContextContextsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeContextContextsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeContextResource(Client, EdgeContextData.DeserializeEdgeContextData(e)), EdgeContextContextsClientDiagnostics, Pipeline, "MockableWorkloadOrchestrationSubscriptionResource.GetEdgeContexts", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/WorkloadOrchestrationExtensions.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/WorkloadOrchestrationExtensions.cs new file mode 100644 index 000000000000..efd634dcf5c2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Extensions/WorkloadOrchestrationExtensions.cs @@ -0,0 +1,1616 @@ +// 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.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Mocking; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// A class to add extension methods to Azure.ResourceManager.WorkloadOrchestration. + public static partial class WorkloadOrchestrationExtensions + { + private static MockableWorkloadOrchestrationArmClient GetMockableWorkloadOrchestrationArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableWorkloadOrchestrationArmClient(client0)); + } + + private static MockableWorkloadOrchestrationResourceGroupResource GetMockableWorkloadOrchestrationResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableWorkloadOrchestrationResourceGroupResource(client, resource.Id)); + } + + private static MockableWorkloadOrchestrationSubscriptionResource GetMockableWorkloadOrchestrationSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableWorkloadOrchestrationSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets a collection of EdgeJobResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// is null. + /// An object representing collection of EdgeJobResources and their operations over a EdgeJobResource. + public static EdgeJobCollection GetEdgeJobs(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeJobs(scope); + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the Job. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeJobAsync(this ArmClient client, ResourceIdentifier scope, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableWorkloadOrchestrationArmClient(client).GetEdgeJobAsync(scope, jobName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Job resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/jobs/{jobName} + /// + /// + /// Operation Id + /// Job_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the Job. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeJob(this ArmClient client, ResourceIdentifier scope, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeJob(scope, jobName, cancellationToken); + } + + /// + /// Gets a collection of EdgeSchemaReferenceResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// is null. + /// An object representing collection of EdgeSchemaReferenceResources and their operations over a EdgeSchemaReferenceResource. + public static EdgeSchemaReferenceCollection GetEdgeSchemaReferences(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSchemaReferences(scope); + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the SchemaReference. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeSchemaReferenceAsync(this ArmClient client, ResourceIdentifier scope, string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSchemaReferenceAsync(scope, schemaReferenceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Schema Reference Resource + /// + /// + /// Request Path + /// /{resourceUri}/providers/Microsoft.Edge/schemaReferences/{schemaReferenceName} + /// + /// + /// Operation Id + /// SchemaReference_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// The name of the SchemaReference. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeSchemaReference(this ArmClient client, ResourceIdentifier scope, string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSchemaReference(scope, schemaReferenceName, cancellationToken); + } + + /// + /// 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. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static EdgeDynamicSchemaResource GetEdgeDynamicSchemaResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeDynamicSchemaResource(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. + /// + /// 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 EdgeSchemaResource GetEdgeSchemaResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSchemaResource(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. + /// + /// 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 EdgeSchemaVersionResource GetEdgeSchemaVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSchemaVersionResource(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. + /// + /// 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 EdgeSolutionVersionResource GetEdgeSolutionVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSolutionVersionResource(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. + /// + /// 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 EdgeJobResource GetEdgeJobResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeJobResource(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. + /// + /// 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 EdgeTargetResource GetEdgeTargetResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeTargetResource(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. + /// + /// 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 EdgeDynamicSchemaVersionResource GetEdgeDynamicSchemaVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeDynamicSchemaVersionResource(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. + /// + /// 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 EdgeSchemaReferenceResource GetEdgeSchemaReferenceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSchemaReferenceResource(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. + /// + /// 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 EdgeSolutionResource GetEdgeSolutionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSolutionResource(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. + /// + /// 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 EdgeSolutionTemplateVersionResource GetEdgeSolutionTemplateVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSolutionTemplateVersionResource(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. + /// + /// 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 EdgeSolutionTemplateResource GetEdgeSolutionTemplateResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSolutionTemplateResource(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. + /// + /// 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 EdgeDeploymentInstanceResource GetEdgeDeploymentInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeDeploymentInstanceResource(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. + /// + /// 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 EdgeDeploymentInstanceHistoryResource GetEdgeDeploymentInstanceHistoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeDeploymentInstanceHistoryResource(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. + /// + /// 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 EdgeConfigTemplateResource GetEdgeConfigTemplateResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeConfigTemplateResource(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. + /// + /// 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 EdgeConfigTemplateVersionResource GetEdgeConfigTemplateVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeConfigTemplateVersionResource(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. + /// + /// 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 EdgeWorkflowResource GetEdgeWorkflowResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeWorkflowResource(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. + /// + /// 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 EdgeWorkflowVersionResource GetEdgeWorkflowVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeWorkflowVersionResource(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. + /// + /// 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 EdgeExecutionResource GetEdgeExecutionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeExecutionResource(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. + /// + /// 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 EdgeDiagnosticResource GetEdgeDiagnosticResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeDiagnosticResource(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. + /// + /// 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 EdgeContextResource GetEdgeContextResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeContextResource(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. + /// + /// 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 EdgeSiteReferenceResource GetEdgeSiteReferenceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableWorkloadOrchestrationArmClient(client).GetEdgeSiteReferenceResource(id); + } + + /// + /// Gets a collection of EdgeSchemaResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EdgeSchemaResources and their operations over a EdgeSchemaResource. + public static EdgeSchemaCollection GetEdgeSchemas(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeSchemas(); + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Schema. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeSchemaAsync(this ResourceGroupResource resourceGroupResource, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeSchemaAsync(schemaName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Schema Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/schemas/{schemaName} + /// + /// + /// Operation Id + /// Schema_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Schema. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeSchema(this ResourceGroupResource resourceGroupResource, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeSchema(schemaName, cancellationToken); + } + + /// + /// Gets a collection of EdgeTargetResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EdgeTargetResources and their operations over a EdgeTargetResource. + public static EdgeTargetCollection GetEdgeTargets(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeTargets(); + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the target. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeTargetAsync(this ResourceGroupResource resourceGroupResource, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeTargetAsync(targetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Target Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the target. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeTarget(this ResourceGroupResource resourceGroupResource, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeTarget(targetName, cancellationToken); + } + + /// + /// Gets a collection of EdgeSolutionTemplateResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EdgeSolutionTemplateResources and their operations over a EdgeSolutionTemplateResource. + public static EdgeSolutionTemplateCollection GetEdgeSolutionTemplates(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeSolutionTemplates(); + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeSolutionTemplateAsync(this ResourceGroupResource resourceGroupResource, string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeSolutionTemplateAsync(solutionTemplateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Solution Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/solutionTemplates/{solutionTemplateName} + /// + /// + /// Operation Id + /// SolutionTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the SolutionTemplate. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeSolutionTemplate(this ResourceGroupResource resourceGroupResource, string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeSolutionTemplate(solutionTemplateName, cancellationToken); + } + + /// + /// Gets a collection of EdgeConfigTemplateResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EdgeConfigTemplateResources and their operations over a EdgeConfigTemplateResource. + public static EdgeConfigTemplateCollection GetEdgeConfigTemplates(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeConfigTemplates(); + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeConfigTemplateAsync(this ResourceGroupResource resourceGroupResource, string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeConfigTemplateAsync(configTemplateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Config Template Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/configTemplates/{configTemplateName} + /// + /// + /// Operation Id + /// ConfigTemplate_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ConfigTemplate. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeConfigTemplate(this ResourceGroupResource resourceGroupResource, string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeConfigTemplate(configTemplateName, cancellationToken); + } + + /// + /// Gets a collection of EdgeDiagnosticResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EdgeDiagnosticResources and their operations over a EdgeDiagnosticResource. + public static EdgeDiagnosticCollection GetEdgeDiagnostics(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeDiagnostics(); + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Diagnostic. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeDiagnosticAsync(this ResourceGroupResource resourceGroupResource, string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeDiagnosticAsync(diagnosticName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns details of specified Diagnostic resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/diagnostics/{diagnosticName} + /// + /// + /// Operation Id + /// Diagnostic_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Diagnostic. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeDiagnostic(this ResourceGroupResource resourceGroupResource, string diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeDiagnostic(diagnosticName, cancellationToken); + } + + /// + /// Gets a collection of EdgeContextResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EdgeContextResources and their operations over a EdgeContextResource. + public static EdgeContextCollection GetEdgeContexts(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeContexts(); + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Context. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEdgeContextAsync(this ResourceGroupResource resourceGroupResource, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeContextAsync(contextName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Context Resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/contexts/{contextName} + /// + /// + /// Operation Id + /// Context_Get + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Context. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEdgeContext(this ResourceGroupResource resourceGroupResource, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableWorkloadOrchestrationResourceGroupResource(resourceGroupResource).GetEdgeContext(contextName, cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/schemas + /// + /// + /// Operation Id + /// Schema_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeSchemasAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeSchemasAsync(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/schemas + /// + /// + /// Operation Id + /// Schema_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeSchemas(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeSchemas(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/targets + /// + /// + /// Operation Id + /// Target_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeTargetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeTargetsAsync(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/targets + /// + /// + /// Operation Id + /// Target_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeTargets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeTargets(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/solutionTemplates + /// + /// + /// Operation Id + /// SolutionTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeSolutionTemplatesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeSolutionTemplatesAsync(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/solutionTemplates + /// + /// + /// Operation Id + /// SolutionTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeSolutionTemplates(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeSolutionTemplates(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/configTemplates + /// + /// + /// Operation Id + /// ConfigTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeConfigTemplatesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeConfigTemplatesAsync(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/configTemplates + /// + /// + /// Operation Id + /// ConfigTemplate_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeConfigTemplates(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeConfigTemplates(cancellationToken); + } + + /// + /// Lists Diagnostics resources within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/diagnostics + /// + /// + /// Operation Id + /// Diagnostic_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeDiagnosticsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeDiagnosticsAsync(cancellationToken); + } + + /// + /// Lists Diagnostics resources within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/diagnostics + /// + /// + /// Operation Id + /// Diagnostic_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeDiagnostics(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeDiagnostics(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/contexts + /// + /// + /// Operation Id + /// Context_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeContextsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeContextsAsync(cancellationToken); + } + + /// + /// List by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/contexts + /// + /// + /// Operation Id + /// Context_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetEdgeContexts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableWorkloadOrchestrationSubscriptionResource(subscriptionResource).GetEdgeContexts(cancellationToken); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Argument.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..719d2c099b10 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..4f5a7f50aca9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ChangeTrackingList.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..e54c128f4704 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..96415518f739 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,409 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal static 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()); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var 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(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + 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"); + } + + public static string GetRequiredString(this JsonElement element) + { + var 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}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Optional.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..6e0d600d8ded --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..296667349235 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + 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; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeConfigTemplateOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeConfigTemplateOperationSource.cs new file mode 100644 index 000000000000..70a4cd33d8b3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeConfigTemplateOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeConfigTemplateOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeConfigTemplateOperationSource(ArmClient client) + { + _client = client; + } + + EdgeConfigTemplateResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeConfigTemplateResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeConfigTemplateResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeConfigTemplateVersionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeConfigTemplateVersionOperationSource.cs new file mode 100644 index 000000000000..57993d615e75 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeConfigTemplateVersionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeConfigTemplateVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeConfigTemplateVersionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeConfigTemplateVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeConfigTemplateVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeConfigTemplateVersionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeContextOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeContextOperationSource.cs new file mode 100644 index 000000000000..e6a297b4851c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeContextOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeContextOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeContextOperationSource(ArmClient client) + { + _client = client; + } + + EdgeContextResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeContextResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeContextResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDeploymentInstanceOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDeploymentInstanceOperationSource.cs new file mode 100644 index 000000000000..574bcec9a2ac --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDeploymentInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeDeploymentInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeDeploymentInstanceOperationSource(ArmClient client) + { + _client = client; + } + + EdgeDeploymentInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeDeploymentInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeDeploymentInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDiagnosticOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDiagnosticOperationSource.cs new file mode 100644 index 000000000000..38a4f82fcc72 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDiagnosticOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeDiagnosticOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeDiagnosticOperationSource(ArmClient client) + { + _client = client; + } + + EdgeDiagnosticResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeDiagnosticResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeDiagnosticResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDynamicSchemaOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDynamicSchemaOperationSource.cs new file mode 100644 index 000000000000..ac96a394058b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDynamicSchemaOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeDynamicSchemaOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeDynamicSchemaOperationSource(ArmClient client) + { + _client = client; + } + + EdgeDynamicSchemaResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeDynamicSchemaResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeDynamicSchemaResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDynamicSchemaVersionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDynamicSchemaVersionOperationSource.cs new file mode 100644 index 000000000000..7251cb9e18f5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeDynamicSchemaVersionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeDynamicSchemaVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeDynamicSchemaVersionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeDynamicSchemaVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeDynamicSchemaVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeDynamicSchemaVersionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeExecutionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeExecutionOperationSource.cs new file mode 100644 index 000000000000..ff33a1468a4e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeExecutionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeExecutionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeExecutionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeExecutionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeExecutionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeExecutionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSchemaOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSchemaOperationSource.cs new file mode 100644 index 000000000000..2a09398582d4 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSchemaOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSchemaOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSchemaOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSchemaResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSchemaResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSchemaResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSchemaVersionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSchemaVersionOperationSource.cs new file mode 100644 index 000000000000..520c00633a87 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSchemaVersionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSchemaVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSchemaVersionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSchemaVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSchemaVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSchemaVersionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSiteReferenceOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSiteReferenceOperationSource.cs new file mode 100644 index 000000000000..eed274b478d3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSiteReferenceOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSiteReferenceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSiteReferenceOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSiteReferenceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSiteReferenceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSiteReferenceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionOperationSource.cs new file mode 100644 index 000000000000..c3bf6e757f3b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSolutionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSolutionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSolutionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSolutionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSolutionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionTemplateOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionTemplateOperationSource.cs new file mode 100644 index 000000000000..6f087769fa04 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionTemplateOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSolutionTemplateOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSolutionTemplateOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSolutionTemplateResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSolutionTemplateResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSolutionTemplateResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionTemplateVersionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionTemplateVersionOperationSource.cs new file mode 100644 index 000000000000..9d5bf44524ae --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionTemplateVersionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSolutionTemplateVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSolutionTemplateVersionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSolutionTemplateVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSolutionTemplateVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSolutionTemplateVersionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionVersionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionVersionOperationSource.cs new file mode 100644 index 000000000000..1f5bed3896dc --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeSolutionVersionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeSolutionVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeSolutionVersionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeSolutionVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeSolutionVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeSolutionVersionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeTargetOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeTargetOperationSource.cs new file mode 100644 index 000000000000..09e4a3e26d2b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeTargetOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeTargetOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeTargetOperationSource(ArmClient client) + { + _client = client; + } + + EdgeTargetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeTargetResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeTargetResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeWorkflowOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeWorkflowOperationSource.cs new file mode 100644 index 000000000000..cd233628b398 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeWorkflowOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeWorkflowOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeWorkflowOperationSource(ArmClient client) + { + _client = client; + } + + EdgeWorkflowResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeWorkflowResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeWorkflowResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeWorkflowVersionOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeWorkflowVersionOperationSource.cs new file mode 100644 index 000000000000..5c219594161d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/EdgeWorkflowVersionOperationSource.cs @@ -0,0 +1,36 @@ +// 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.WorkloadOrchestration +{ + internal class EdgeWorkflowVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EdgeWorkflowVersionOperationSource(ArmClient client) + { + _client = client; + } + + EdgeWorkflowVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return new EdgeWorkflowVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + return await Task.FromResult(new EdgeWorkflowVersionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/ResolvedConfigurationOperationSource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/ResolvedConfigurationOperationSource.cs new file mode 100644 index 000000000000..8dfdf5dafdcb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/ResolvedConfigurationOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal class ResolvedConfigurationOperationSource : IOperationSource + { + ResolvedConfiguration IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return ResolvedConfiguration.DeserializeResolvedConfiguration(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return ResolvedConfiguration.DeserializeResolvedConfiguration(document.RootElement); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/WorkloadOrchestrationArmOperation.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/WorkloadOrchestrationArmOperation.cs new file mode 100644 index 000000000000..f7414960f6a0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/WorkloadOrchestrationArmOperation.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ +#pragma warning disable SA1649 // File name should match first type name + internal class WorkloadOrchestrationArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of WorkloadOrchestrationArmOperation for mocking. + protected WorkloadOrchestrationArmOperation() + { + } + + internal WorkloadOrchestrationArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal WorkloadOrchestrationArmOperation(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) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "WorkloadOrchestrationArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + using var document = JsonDocument.Parse(data); + var lroDetails = document.RootElement; + return lroDetails.GetProperty("id").GetString(); + } + /// + 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/WorkloadOrchestrationArmOperationOfT.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/WorkloadOrchestrationArmOperationOfT.cs new file mode 100644 index 000000000000..d29b5fda0610 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/LongRunningOperation/WorkloadOrchestrationArmOperationOfT.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ +#pragma warning disable SA1649 // File name should match first type name + internal class WorkloadOrchestrationArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of WorkloadOrchestrationArmOperation for mocking. + protected WorkloadOrchestrationArmOperation() + { + } + + internal WorkloadOrchestrationArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal WorkloadOrchestrationArmOperation(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) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "WorkloadOrchestrationArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerWorkloadOrchestrationContext.Default); + using var document = JsonDocument.Parse(data); + var lroDetails = document.RootElement; + return lroDetails.GetProperty("id").GetString(); + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + 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 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AvailableSolutionTemplateVersion.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AvailableSolutionTemplateVersion.Serialization.cs new file mode 100644 index 000000000000..b7b2f045e2e3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AvailableSolutionTemplateVersion.Serialization.cs @@ -0,0 +1,142 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class AvailableSolutionTemplateVersion : 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(AvailableSolutionTemplateVersion)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionTemplateVersion"u8); + writer.WriteStringValue(SolutionTemplateVersion); + writer.WritePropertyName("latestConfigRevision"u8); + writer.WriteStringValue(LatestConfigRevision); + writer.WritePropertyName("isConfigured"u8); + writer.WriteBooleanValue(IsConfigured); + 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 + } + } + } + + AvailableSolutionTemplateVersion 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(AvailableSolutionTemplateVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvailableSolutionTemplateVersion(document.RootElement, options); + } + + internal static AvailableSolutionTemplateVersion DeserializeAvailableSolutionTemplateVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string solutionTemplateVersion = default; + string latestConfigRevision = default; + bool isConfigured = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionTemplateVersion"u8)) + { + solutionTemplateVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("latestConfigRevision"u8)) + { + latestConfigRevision = property.Value.GetString(); + continue; + } + if (property.NameEquals("isConfigured"u8)) + { + isConfigured = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AvailableSolutionTemplateVersion(solutionTemplateVersion, latestConfigRevision, isConfigured, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(AvailableSolutionTemplateVersion)} does not support writing '{options.Format}' format."); + } + } + + AvailableSolutionTemplateVersion 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 DeserializeAvailableSolutionTemplateVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvailableSolutionTemplateVersion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AvailableSolutionTemplateVersion.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AvailableSolutionTemplateVersion.cs new file mode 100644 index 000000000000..bbd8a6a32bdd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AvailableSolutionTemplateVersion.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Available Solution template Version along with latest revision. + public partial class AvailableSolutionTemplateVersion + { + /// + /// 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 . + /// Solution template Version. + /// Latest Configuration Revision. + /// Has this solution template version been configured. + /// or is null. + internal AvailableSolutionTemplateVersion(string solutionTemplateVersion, string latestConfigRevision, bool isConfigured) + { + Argument.AssertNotNull(solutionTemplateVersion, nameof(solutionTemplateVersion)); + Argument.AssertNotNull(latestConfigRevision, nameof(latestConfigRevision)); + + SolutionTemplateVersion = solutionTemplateVersion; + LatestConfigRevision = latestConfigRevision; + IsConfigured = isConfigured; + } + + /// Initializes a new instance of . + /// Solution template Version. + /// Latest Configuration Revision. + /// Has this solution template version been configured. + /// Keeps track of any properties unknown to the library. + internal AvailableSolutionTemplateVersion(string solutionTemplateVersion, string latestConfigRevision, bool isConfigured, IDictionary serializedAdditionalRawData) + { + SolutionTemplateVersion = solutionTemplateVersion; + LatestConfigRevision = latestConfigRevision; + IsConfigured = isConfigured; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AvailableSolutionTemplateVersion() + { + } + + /// Solution template Version. + public string SolutionTemplateVersion { get; } + /// Latest Configuration Revision. + public string LatestConfigRevision { get; } + /// Has this solution template version been configured. + public bool IsConfigured { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AzureResourceManagerWorkloadOrchestrationContext.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AzureResourceManagerWorkloadOrchestrationContext.cs new file mode 100644 index 000000000000..2f6a46132f04 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/AzureResourceManagerWorkloadOrchestrationContext.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + /// + /// 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' + /// + [ModelReaderWriterBuildable(typeof(AvailableSolutionTemplateVersion))] + [ModelReaderWriterBuildable(typeof(BulkDeploySolutionContent))] + [ModelReaderWriterBuildable(typeof(BulkDeployTargetDetails))] + [ModelReaderWriterBuildable(typeof(BulkPublishSolutionContent))] + [ModelReaderWriterBuildable(typeof(BulkPublishTargetDetails))] + [ModelReaderWriterBuildable(typeof(ConfigTemplateListResult))] + [ModelReaderWriterBuildable(typeof(ConfigTemplateUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ConfigTemplateVersionListResult))] + [ModelReaderWriterBuildable(typeof(ConfigTemplateVersionWithUpdateType))] + [ModelReaderWriterBuildable(typeof(ContextCapability))] + [ModelReaderWriterBuildable(typeof(ContextHierarchy))] + [ModelReaderWriterBuildable(typeof(ContextListResult))] + [ModelReaderWriterBuildable(typeof(DeployJobContent))] + [ModelReaderWriterBuildable(typeof(DeployJobStepStatistics))] + [ModelReaderWriterBuildable(typeof(DiagnosticListResult))] + [ModelReaderWriterBuildable(typeof(DynamicSchemaListResult))] + [ModelReaderWriterBuildable(typeof(DynamicSchemaVersionListResult))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplateData))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplatePatch))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplateProperties))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplateResource))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplateVersionData))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplateVersionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeConfigTemplateVersionResource))] + [ModelReaderWriterBuildable(typeof(EdgeContextData))] + [ModelReaderWriterBuildable(typeof(EdgeContextPatch))] + [ModelReaderWriterBuildable(typeof(EdgeContextPatchProperties))] + [ModelReaderWriterBuildable(typeof(EdgeContextProperties))] + [ModelReaderWriterBuildable(typeof(EdgeContextResource))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentInstanceData))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentInstanceHistoryData))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentInstanceHistoryProperties))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentInstanceHistoryResource))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentInstanceProperties))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentInstanceResource))] + [ModelReaderWriterBuildable(typeof(EdgeDeploymentStatus))] + [ModelReaderWriterBuildable(typeof(EdgeDiagnosticData))] + [ModelReaderWriterBuildable(typeof(EdgeDiagnosticPatch))] + [ModelReaderWriterBuildable(typeof(EdgeDiagnosticPatchProperties))] + [ModelReaderWriterBuildable(typeof(EdgeDiagnosticProperties))] + [ModelReaderWriterBuildable(typeof(EdgeDiagnosticResource))] + [ModelReaderWriterBuildable(typeof(EdgeDynamicSchemaData))] + [ModelReaderWriterBuildable(typeof(EdgeDynamicSchemaProperties))] + [ModelReaderWriterBuildable(typeof(EdgeDynamicSchemaResource))] + [ModelReaderWriterBuildable(typeof(EdgeDynamicSchemaVersionData))] + [ModelReaderWriterBuildable(typeof(EdgeDynamicSchemaVersionResource))] + [ModelReaderWriterBuildable(typeof(EdgeExecutionData))] + [ModelReaderWriterBuildable(typeof(EdgeExecutionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeExecutionResource))] + [ModelReaderWriterBuildable(typeof(EdgeExecutionStageStatus))] + [ModelReaderWriterBuildable(typeof(EdgeExecutionStatus))] + [ModelReaderWriterBuildable(typeof(EdgeJobContent))] + [ModelReaderWriterBuildable(typeof(EdgeJobData))] + [ModelReaderWriterBuildable(typeof(EdgeJobProperties))] + [ModelReaderWriterBuildable(typeof(EdgeJobResource))] + [ModelReaderWriterBuildable(typeof(EdgeJobStep))] + [ModelReaderWriterBuildable(typeof(EdgeJobStepStatistics))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaData))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaPatch))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaPatchProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaReferenceData))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaReferenceProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaReferenceResource))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaResource))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaVersionData))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaVersionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaVersionResource))] + [ModelReaderWriterBuildable(typeof(EdgeSchemaVersionWithUpdateType))] + [ModelReaderWriterBuildable(typeof(EdgeSiteReferenceData))] + [ModelReaderWriterBuildable(typeof(EdgeSiteReferenceProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSiteReferenceResource))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionData))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionDependency))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionDependencyContent))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionPatch))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionPatchProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionResource))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateContent))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateData))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplatePatch))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplatePatchProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateResource))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateVersionData))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateVersionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateVersionResource))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionTemplateVersionWithUpdateType))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionVersionContent))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionVersionData))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionVersionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeSolutionVersionResource))] + [ModelReaderWriterBuildable(typeof(EdgeTargetData))] + [ModelReaderWriterBuildable(typeof(EdgeTargetPatch))] + [ModelReaderWriterBuildable(typeof(EdgeTargetPatchProperties))] + [ModelReaderWriterBuildable(typeof(EdgeTargetProperties))] + [ModelReaderWriterBuildable(typeof(EdgeTargetResource))] + [ModelReaderWriterBuildable(typeof(EdgeTargetSnapshot))] + [ModelReaderWriterBuildable(typeof(EdgeTargetStatus))] + [ModelReaderWriterBuildable(typeof(EdgeVersionContent))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowData))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowProperties))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowResource))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowStageSpec))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowTaskConfig))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowTaskSpec))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowVersionData))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowVersionProperties))] + [ModelReaderWriterBuildable(typeof(EdgeWorkflowVersionResource))] + [ModelReaderWriterBuildable(typeof(ExecutionListResult))] + [ModelReaderWriterBuildable(typeof(ExtendedLocation))] + [ModelReaderWriterBuildable(typeof(InstallSolutionContent))] + [ModelReaderWriterBuildable(typeof(InstanceHistoryListResult))] + [ModelReaderWriterBuildable(typeof(InstanceListResult))] + [ModelReaderWriterBuildable(typeof(InstanceReconciliationPolicy))] + [ModelReaderWriterBuildable(typeof(JobListResult))] + [ModelReaderWriterBuildable(typeof(RemoveRevisionContent))] + [ModelReaderWriterBuildable(typeof(RemoveVersionResult))] + [ModelReaderWriterBuildable(typeof(ResolvedConfiguration))] + [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(SchemaListResult))] + [ModelReaderWriterBuildable(typeof(SchemaReferenceListResult))] + [ModelReaderWriterBuildable(typeof(SchemaVersionListResult))] + [ModelReaderWriterBuildable(typeof(SiteReferenceListResult))] + [ModelReaderWriterBuildable(typeof(SolutionListResult))] + [ModelReaderWriterBuildable(typeof(SolutionTemplateListResult))] + [ModelReaderWriterBuildable(typeof(SolutionTemplateVersionListResult))] + [ModelReaderWriterBuildable(typeof(SolutionVersionListResult))] + [ModelReaderWriterBuildable(typeof(SolutionVersionSnapshot))] + [ModelReaderWriterBuildable(typeof(SystemData))] + [ModelReaderWriterBuildable(typeof(TargetComponentStatus))] + [ModelReaderWriterBuildable(typeof(TargetListResult))] + [ModelReaderWriterBuildable(typeof(TaskErrorAction))] + [ModelReaderWriterBuildable(typeof(UninstallSolutionContent))] + [ModelReaderWriterBuildable(typeof(UnknownEdgeJobContent))] + [ModelReaderWriterBuildable(typeof(UnknownEdgeJobStepStatistics))] + [ModelReaderWriterBuildable(typeof(UpdateExternalValidationStatusContent))] + [ModelReaderWriterBuildable(typeof(WorkflowListResult))] + [ModelReaderWriterBuildable(typeof(WorkflowVersionListResult))] + public partial class AzureResourceManagerWorkloadOrchestrationContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeploySolutionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeploySolutionContent.Serialization.cs new file mode 100644 index 000000000000..bfaa905e877c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeploySolutionContent.Serialization.cs @@ -0,0 +1,136 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class BulkDeploySolutionContent : 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(BulkDeploySolutionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targets"u8); + writer.WriteStartArray(); + foreach (var item in Targets) + { + 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 + } + } + } + + BulkDeploySolutionContent 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(BulkDeploySolutionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBulkDeploySolutionContent(document.RootElement, options); + } + + internal static BulkDeploySolutionContent DeserializeBulkDeploySolutionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList targets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targets"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BulkDeployTargetDetails.DeserializeBulkDeployTargetDetails(item, options)); + } + targets = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BulkDeploySolutionContent(targets, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(BulkDeploySolutionContent)} does not support writing '{options.Format}' format."); + } + } + + BulkDeploySolutionContent 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 DeserializeBulkDeploySolutionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BulkDeploySolutionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeploySolutionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeploySolutionContent.cs new file mode 100644 index 000000000000..71763734bdb2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeploySolutionContent.cs @@ -0,0 +1,76 @@ +// 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.WorkloadOrchestration.Models +{ + /// Bulk deploy solution parameter. + public partial class BulkDeploySolutionContent + { + /// + /// 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 . + /// Targets to which solution needs to be deployed. + /// is null. + public BulkDeploySolutionContent(IEnumerable targets) + { + Argument.AssertNotNull(targets, nameof(targets)); + + Targets = targets.ToList(); + } + + /// Initializes a new instance of . + /// Targets to which solution needs to be deployed. + /// Keeps track of any properties unknown to the library. + internal BulkDeploySolutionContent(IList targets, IDictionary serializedAdditionalRawData) + { + Targets = targets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BulkDeploySolutionContent() + { + } + + /// Targets to which solution needs to be deployed. + public IList Targets { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeployTargetDetails.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeployTargetDetails.Serialization.cs new file mode 100644 index 000000000000..4d643a1ca548 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeployTargetDetails.Serialization.cs @@ -0,0 +1,126 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class BulkDeployTargetDetails : 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(BulkDeployTargetDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + 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 + } + } + } + + BulkDeployTargetDetails 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(BulkDeployTargetDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBulkDeployTargetDetails(document.RootElement, options); + } + + internal static BulkDeployTargetDetails DeserializeBulkDeployTargetDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BulkDeployTargetDetails(solutionVersionId, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(BulkDeployTargetDetails)} does not support writing '{options.Format}' format."); + } + } + + BulkDeployTargetDetails 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 DeserializeBulkDeployTargetDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BulkDeployTargetDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeployTargetDetails.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeployTargetDetails.cs new file mode 100644 index 000000000000..5abfc4fa09af --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkDeployTargetDetails.cs @@ -0,0 +1,76 @@ +// 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.WorkloadOrchestration.Models +{ + /// Bulk deploy target details. + public partial class BulkDeployTargetDetails + { + /// + /// 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 . + /// ArmId of Target Solution Version. + /// is null. + public BulkDeployTargetDetails(ResourceIdentifier solutionVersionId) + { + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + + SolutionVersionId = solutionVersionId; + } + + /// Initializes a new instance of . + /// ArmId of Target Solution Version. + /// Keeps track of any properties unknown to the library. + internal BulkDeployTargetDetails(ResourceIdentifier solutionVersionId, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BulkDeployTargetDetails() + { + } + + /// ArmId of Target Solution Version. + public ResourceIdentifier SolutionVersionId { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishSolutionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishSolutionContent.Serialization.cs new file mode 100644 index 000000000000..2b9af97d9637 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishSolutionContent.Serialization.cs @@ -0,0 +1,172 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class BulkPublishSolutionContent : 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(BulkPublishSolutionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targets"u8); + writer.WriteStartArray(); + foreach (var item in Targets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + if (Optional.IsCollectionDefined(SolutionDependencies)) + { + writer.WritePropertyName("solutionDependencies"u8); + writer.WriteStartArray(); + foreach (var item in SolutionDependencies) + { + 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 + } + } + } + + BulkPublishSolutionContent 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(BulkPublishSolutionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBulkPublishSolutionContent(document.RootElement, options); + } + + internal static BulkPublishSolutionContent DeserializeBulkPublishSolutionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList targets = default; + string solutionInstanceName = default; + IList solutionDependencies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targets"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BulkPublishTargetDetails.DeserializeBulkPublishTargetDetails(item, options)); + } + targets = array; + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeSolutionDependencyContent.DeserializeEdgeSolutionDependencyContent(item, options)); + } + solutionDependencies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BulkPublishSolutionContent(targets, solutionInstanceName, solutionDependencies ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(BulkPublishSolutionContent)} does not support writing '{options.Format}' format."); + } + } + + BulkPublishSolutionContent 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 DeserializeBulkPublishSolutionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BulkPublishSolutionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishSolutionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishSolutionContent.cs new file mode 100644 index 000000000000..7a0d125d153b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishSolutionContent.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.Linq; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Bulk publish solution parameter. + public partial class BulkPublishSolutionContent + { + /// + /// 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 . + /// Targets to which solution needs to be published. + /// is null. + public BulkPublishSolutionContent(IEnumerable targets) + { + Argument.AssertNotNull(targets, nameof(targets)); + + Targets = targets.ToList(); + SolutionDependencies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Targets to which solution needs to be published. + /// Name of the solution instance. + /// Solution dependencies. + /// Keeps track of any properties unknown to the library. + internal BulkPublishSolutionContent(IList targets, string solutionInstanceName, IList solutionDependencies, IDictionary serializedAdditionalRawData) + { + Targets = targets; + SolutionInstanceName = solutionInstanceName; + SolutionDependencies = solutionDependencies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BulkPublishSolutionContent() + { + } + + /// Targets to which solution needs to be published. + public IList Targets { get; } + /// Name of the solution instance. + public string SolutionInstanceName { get; set; } + /// Solution dependencies. + public IList SolutionDependencies { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishTargetDetails.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishTargetDetails.Serialization.cs new file mode 100644 index 000000000000..6bb592577181 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishTargetDetails.Serialization.cs @@ -0,0 +1,137 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class BulkPublishTargetDetails : 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(BulkPublishTargetDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + if (Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + 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 + } + } + } + + BulkPublishTargetDetails 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(BulkPublishTargetDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBulkPublishTargetDetails(document.RootElement, options); + } + + internal static BulkPublishTargetDetails DeserializeBulkPublishTargetDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier targetId = default; + string solutionInstanceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetId"u8)) + { + targetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BulkPublishTargetDetails(targetId, solutionInstanceName, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(BulkPublishTargetDetails)} does not support writing '{options.Format}' format."); + } + } + + BulkPublishTargetDetails 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 DeserializeBulkPublishTargetDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BulkPublishTargetDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishTargetDetails.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishTargetDetails.cs new file mode 100644 index 000000000000..0843b568ee66 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/BulkPublishTargetDetails.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// Bulk publish target details. + public partial class BulkPublishTargetDetails + { + /// + /// 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 . + /// ArmId of Target. + /// is null. + public BulkPublishTargetDetails(ResourceIdentifier targetId) + { + Argument.AssertNotNull(targetId, nameof(targetId)); + + TargetId = targetId; + } + + /// Initializes a new instance of . + /// ArmId of Target. + /// Name of the solution instance. + /// Keeps track of any properties unknown to the library. + internal BulkPublishTargetDetails(ResourceIdentifier targetId, string solutionInstanceName, IDictionary serializedAdditionalRawData) + { + TargetId = targetId; + SolutionInstanceName = solutionInstanceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BulkPublishTargetDetails() + { + } + + /// ArmId of Target. + public ResourceIdentifier TargetId { get; } + /// Name of the solution instance. + public string SolutionInstanceName { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateListResult.Serialization.cs new file mode 100644 index 000000000000..659c3bf4efd6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class ConfigTemplateListResult : 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(ConfigTemplateListResult)} 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 + } + } + } + + ConfigTemplateListResult 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(ConfigTemplateListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfigTemplateListResult(document.RootElement, options); + } + + internal static ConfigTemplateListResult DeserializeConfigTemplateListResult(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(EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(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 ConfigTemplateListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ConfigTemplateListResult)} does not support writing '{options.Format}' format."); + } + } + + ConfigTemplateListResult 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 DeserializeConfigTemplateListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfigTemplateListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateListResult.cs new file mode 100644 index 000000000000..219f52e63e03 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a ConfigTemplate list operation. + internal partial class ConfigTemplateListResult + { + /// + /// 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 ConfigTemplate items on this page. + /// is null. + internal ConfigTemplateListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ConfigTemplate items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ConfigTemplateListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfigTemplateListResult() + { + } + + /// The ConfigTemplate items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateUpdateProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..3a69f81a02d8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateUpdateProperties.Serialization.cs @@ -0,0 +1,129 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class ConfigTemplateUpdateProperties : 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(ConfigTemplateUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + ConfigTemplateUpdateProperties 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(ConfigTemplateUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfigTemplateUpdateProperties(document.RootElement, options); + } + + internal static ConfigTemplateUpdateProperties DeserializeConfigTemplateUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfigTemplateUpdateProperties(description, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ConfigTemplateUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ConfigTemplateUpdateProperties 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 DeserializeConfigTemplateUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfigTemplateUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateUpdateProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateUpdateProperties.cs new file mode 100644 index 000000000000..d98f42d0d519 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateUpdateProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the ConfigTemplate. + internal partial class ConfigTemplateUpdateProperties + { + /// + /// 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 ConfigTemplateUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Description of config template. + /// Keeps track of any properties unknown to the library. + internal ConfigTemplateUpdateProperties(string description, IDictionary serializedAdditionalRawData) + { + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Description of config template. + public string Description { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionListResult.Serialization.cs new file mode 100644 index 000000000000..b75ce2968552 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class ConfigTemplateVersionListResult : 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(ConfigTemplateVersionListResult)} 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 + } + } + } + + ConfigTemplateVersionListResult 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(ConfigTemplateVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfigTemplateVersionListResult(document.RootElement, options); + } + + internal static ConfigTemplateVersionListResult DeserializeConfigTemplateVersionListResult(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(EdgeConfigTemplateVersionData.DeserializeEdgeConfigTemplateVersionData(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 ConfigTemplateVersionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ConfigTemplateVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + ConfigTemplateVersionListResult 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 DeserializeConfigTemplateVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfigTemplateVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionListResult.cs new file mode 100644 index 000000000000..fcba18cfc314 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a ConfigTemplateVersion list operation. + internal partial class ConfigTemplateVersionListResult + { + /// + /// 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 ConfigTemplateVersion items on this page. + /// is null. + internal ConfigTemplateVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ConfigTemplateVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ConfigTemplateVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfigTemplateVersionListResult() + { + } + + /// The ConfigTemplateVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionWithUpdateType.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionWithUpdateType.Serialization.cs new file mode 100644 index 000000000000..70db1bf23fed --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionWithUpdateType.Serialization.cs @@ -0,0 +1,152 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class ConfigTemplateVersionWithUpdateType : 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(ConfigTemplateVersionWithUpdateType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UpdateType)) + { + writer.WritePropertyName("updateType"u8); + writer.WriteStringValue(UpdateType.Value.ToString()); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WritePropertyName("configTemplateVersion"u8); + writer.WriteObjectValue(ConfigTemplateVersion, 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 + } + } + } + + ConfigTemplateVersionWithUpdateType 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(ConfigTemplateVersionWithUpdateType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfigTemplateVersionWithUpdateType(document.RootElement, options); + } + + internal static ConfigTemplateVersionWithUpdateType DeserializeConfigTemplateVersionWithUpdateType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeUpdateType? updateType = default; + string version = default; + EdgeConfigTemplateVersionData configTemplateVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("updateType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateType = new EdgeUpdateType(property.Value.GetString()); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("configTemplateVersion"u8)) + { + configTemplateVersion = EdgeConfigTemplateVersionData.DeserializeEdgeConfigTemplateVersionData(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfigTemplateVersionWithUpdateType(updateType, version, configTemplateVersion, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ConfigTemplateVersionWithUpdateType)} does not support writing '{options.Format}' format."); + } + } + + ConfigTemplateVersionWithUpdateType 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 DeserializeConfigTemplateVersionWithUpdateType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfigTemplateVersionWithUpdateType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionWithUpdateType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionWithUpdateType.cs new file mode 100644 index 000000000000..015fab6d1403 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ConfigTemplateVersionWithUpdateType.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Config Template Version With Update Type. + public partial class ConfigTemplateVersionWithUpdateType + { + /// + /// 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 . + /// Config Template Version. + /// is null. + public ConfigTemplateVersionWithUpdateType(EdgeConfigTemplateVersionData configTemplateVersion) + { + Argument.AssertNotNull(configTemplateVersion, nameof(configTemplateVersion)); + + ConfigTemplateVersion = configTemplateVersion; + } + + /// Initializes a new instance of . + /// Update type. + /// Version to create. + /// Config Template Version. + /// Keeps track of any properties unknown to the library. + internal ConfigTemplateVersionWithUpdateType(EdgeUpdateType? updateType, string version, EdgeConfigTemplateVersionData configTemplateVersion, IDictionary serializedAdditionalRawData) + { + UpdateType = updateType; + Version = version; + ConfigTemplateVersion = configTemplateVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfigTemplateVersionWithUpdateType() + { + } + + /// Update type. + public EdgeUpdateType? UpdateType { get; set; } + /// Version to create. + public string Version { get; set; } + /// Config Template Version. + public EdgeConfigTemplateVersionData ConfigTemplateVersion { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextCapability.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextCapability.Serialization.cs new file mode 100644 index 000000000000..d1cbaaf823cf --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextCapability.Serialization.cs @@ -0,0 +1,149 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class ContextCapability : 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(ContextCapability)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.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 + } + } + } + + ContextCapability 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(ContextCapability)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContextCapability(document.RootElement, options); + } + + internal static ContextCapability DeserializeContextCapability(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = default; + EdgeResourceState? state = 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("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new EdgeResourceState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContextCapability(name, description, state, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ContextCapability)} does not support writing '{options.Format}' format."); + } + } + + ContextCapability 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 DeserializeContextCapability(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContextCapability)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextCapability.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextCapability.cs new file mode 100644 index 000000000000..85ffefe711e0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextCapability.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Capability, to match in Solution Templates and Targets. + public partial class ContextCapability + { + /// + /// 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 . + /// Name of Capability. + /// Description of Capability. + /// or is null. + public ContextCapability(string name, string description) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(description, nameof(description)); + + Name = name; + Description = description; + } + + /// Initializes a new instance of . + /// Name of Capability. + /// Description of Capability. + /// State of resource. + /// Keeps track of any properties unknown to the library. + internal ContextCapability(string name, string description, EdgeResourceState? state, IDictionary serializedAdditionalRawData) + { + Name = name; + Description = description; + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContextCapability() + { + } + + /// Name of Capability. + public string Name { get; set; } + /// Description of Capability. + public string Description { get; set; } + /// State of resource. + public EdgeResourceState? State { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextHierarchy.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextHierarchy.Serialization.cs new file mode 100644 index 000000000000..640e4879cf23 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextHierarchy.Serialization.cs @@ -0,0 +1,134 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class ContextHierarchy : 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(ContextHierarchy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + 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 + } + } + } + + ContextHierarchy 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(ContextHierarchy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContextHierarchy(document.RootElement, options); + } + + internal static ContextHierarchy DeserializeContextHierarchy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = 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("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContextHierarchy(name, description, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ContextHierarchy)} does not support writing '{options.Format}' format."); + } + } + + ContextHierarchy 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 DeserializeContextHierarchy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContextHierarchy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextHierarchy.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextHierarchy.cs new file mode 100644 index 000000000000..b44a17086097 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextHierarchy.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Hierarchy, to tag Sites / Hierarchy Provider nodes with what they represent. + public partial class ContextHierarchy + { + /// + /// 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 . + /// Name of Hierarchy. + /// Description of Hierarchy. + /// or is null. + public ContextHierarchy(string name, string description) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(description, nameof(description)); + + Name = name; + Description = description; + } + + /// Initializes a new instance of . + /// Name of Hierarchy. + /// Description of Hierarchy. + /// Keeps track of any properties unknown to the library. + internal ContextHierarchy(string name, string description, IDictionary serializedAdditionalRawData) + { + Name = name; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContextHierarchy() + { + } + + /// Name of Hierarchy. + public string Name { get; set; } + /// Description of Hierarchy. + public string Description { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextListResult.Serialization.cs new file mode 100644 index 000000000000..6cf0f96f1871 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class ContextListResult : 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(ContextListResult)} 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 + } + } + } + + ContextListResult 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(ContextListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContextListResult(document.RootElement, options); + } + + internal static ContextListResult DeserializeContextListResult(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(EdgeContextData.DeserializeEdgeContextData(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 ContextListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ContextListResult)} does not support writing '{options.Format}' format."); + } + } + + ContextListResult 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 DeserializeContextListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContextListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextListResult.cs new file mode 100644 index 000000000000..5fc454638f2f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ContextListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Context list operation. + internal partial class ContextListResult + { + /// + /// 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 Context items on this page. + /// is null. + internal ContextListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Context items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ContextListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContextListResult() + { + } + + /// The Context items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobContent.Serialization.cs new file mode 100644 index 000000000000..8996cb807485 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobContent.Serialization.cs @@ -0,0 +1,125 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class DeployJobContent : 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(DeployJobContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Parameter)) + { + writer.WritePropertyName("parameter"u8); + writer.WriteObjectValue(Parameter, options); + } + } + + DeployJobContent 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(DeployJobContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployJobContent(document.RootElement, options); + } + + internal static DeployJobContent DeserializeDeployJobContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InstallSolutionContent parameter = default; + EdgeJobType jobType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameter = InstallSolutionContent.DeserializeInstallSolutionContent(property.Value, options); + continue; + } + if (property.NameEquals("jobType"u8)) + { + jobType = new EdgeJobType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeployJobContent(jobType, serializedAdditionalRawData, parameter); + } + + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(DeployJobContent)} does not support writing '{options.Format}' format."); + } + } + + DeployJobContent 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 DeserializeDeployJobContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeployJobContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobContent.cs new file mode 100644 index 000000000000..bc4d05efb243 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobContent.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; +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Parameters for a deployment job. + public partial class DeployJobContent : EdgeJobContent + { + /// Initializes a new instance of . + internal DeployJobContent() + { + JobType = EdgeJobType.Deploy; + } + + /// Initializes a new instance of . + /// Job type discriminator value. + /// Keeps track of any properties unknown to the library. + /// + internal DeployJobContent(EdgeJobType jobType, IDictionary serializedAdditionalRawData, InstallSolutionContent parameter) : base(jobType, serializedAdditionalRawData) + { + Parameter = parameter; + JobType = jobType; + } + + /// Gets the parameter. + internal InstallSolutionContent Parameter { get; } + /// Solution Version ARM Id. + public ResourceIdentifier ParameterSolutionVersionId + { + get => Parameter?.SolutionVersionId; + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobStepStatistics.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobStepStatistics.Serialization.cs new file mode 100644 index 000000000000..4a52a255261c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobStepStatistics.Serialization.cs @@ -0,0 +1,155 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class DeployJobStepStatistics : 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(DeployJobStepStatistics)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(TotalCount)) + { + writer.WritePropertyName("totalCount"u8); + writer.WriteNumberValue(TotalCount.Value); + } + if (Optional.IsDefined(SuccessCount)) + { + writer.WritePropertyName("successCount"u8); + writer.WriteNumberValue(SuccessCount.Value); + } + if (Optional.IsDefined(FailedCount)) + { + writer.WritePropertyName("failedCount"u8); + writer.WriteNumberValue(FailedCount.Value); + } + } + + DeployJobStepStatistics 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(DeployJobStepStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployJobStepStatistics(document.RootElement, options); + } + + internal static DeployJobStepStatistics DeserializeDeployJobStepStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? totalCount = default; + int? successCount = default; + int? failedCount = default; + EdgeJobType statisticsType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("successCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + successCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("failedCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("statisticsType"u8)) + { + statisticsType = new EdgeJobType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeployJobStepStatistics(statisticsType, serializedAdditionalRawData, totalCount, successCount, failedCount); + } + + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(DeployJobStepStatistics)} does not support writing '{options.Format}' format."); + } + } + + DeployJobStepStatistics 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 DeserializeDeployJobStepStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeployJobStepStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobStepStatistics.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobStepStatistics.cs new file mode 100644 index 000000000000..a27e1365d54f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DeployJobStepStatistics.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.WorkloadOrchestration.Models +{ + /// Deploy statistics for a job step, including total, success, and failed counts. + public partial class DeployJobStepStatistics : EdgeJobStepStatistics + { + /// Initializes a new instance of . + internal DeployJobStepStatistics() + { + StatisticsType = EdgeJobType.Deploy; + } + + /// Initializes a new instance of . + /// Statistics type discriminator value. + /// Keeps track of any properties unknown to the library. + /// Total count of items processed in this step. + /// Count of successful items in this step. + /// Count of failed items in this step. + internal DeployJobStepStatistics(EdgeJobType statisticsType, IDictionary serializedAdditionalRawData, int? totalCount, int? successCount, int? failedCount) : base(statisticsType, serializedAdditionalRawData) + { + TotalCount = totalCount; + SuccessCount = successCount; + FailedCount = failedCount; + StatisticsType = statisticsType; + } + + /// Total count of items processed in this step. + public int? TotalCount { get; } + /// Count of successful items in this step. + public int? SuccessCount { get; } + /// Count of failed items in this step. + public int? FailedCount { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DiagnosticListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DiagnosticListResult.Serialization.cs new file mode 100644 index 000000000000..2657511a01c7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DiagnosticListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class DiagnosticListResult : 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(DiagnosticListResult)} 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 + } + } + } + + DiagnosticListResult 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(DiagnosticListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiagnosticListResult(document.RootElement, options); + } + + internal static DiagnosticListResult DeserializeDiagnosticListResult(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(EdgeDiagnosticData.DeserializeEdgeDiagnosticData(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 DiagnosticListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(DiagnosticListResult)} does not support writing '{options.Format}' format."); + } + } + + DiagnosticListResult 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 DeserializeDiagnosticListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiagnosticListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DiagnosticListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DiagnosticListResult.cs new file mode 100644 index 000000000000..9c8e95804ee7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DiagnosticListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Diagnostic list operation. + internal partial class DiagnosticListResult + { + /// + /// 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 Diagnostic items on this page. + /// is null. + internal DiagnosticListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Diagnostic items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DiagnosticListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiagnosticListResult() + { + } + + /// The Diagnostic items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaListResult.Serialization.cs new file mode 100644 index 000000000000..645329ba6b1f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class DynamicSchemaListResult : 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(DynamicSchemaListResult)} 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 + } + } + } + + DynamicSchemaListResult 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(DynamicSchemaListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDynamicSchemaListResult(document.RootElement, options); + } + + internal static DynamicSchemaListResult DeserializeDynamicSchemaListResult(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(EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(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 DynamicSchemaListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(DynamicSchemaListResult)} does not support writing '{options.Format}' format."); + } + } + + DynamicSchemaListResult 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 DeserializeDynamicSchemaListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DynamicSchemaListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaListResult.cs new file mode 100644 index 000000000000..069e096765b2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a DynamicSchema list operation. + internal partial class DynamicSchemaListResult + { + /// + /// 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 DynamicSchema items on this page. + /// is null. + internal DynamicSchemaListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DynamicSchema items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DynamicSchemaListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DynamicSchemaListResult() + { + } + + /// The DynamicSchema items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaVersionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaVersionListResult.Serialization.cs new file mode 100644 index 000000000000..95ffaf6886a2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class DynamicSchemaVersionListResult : 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(DynamicSchemaVersionListResult)} 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 + } + } + } + + DynamicSchemaVersionListResult 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(DynamicSchemaVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDynamicSchemaVersionListResult(document.RootElement, options); + } + + internal static DynamicSchemaVersionListResult DeserializeDynamicSchemaVersionListResult(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(EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(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 DynamicSchemaVersionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(DynamicSchemaVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + DynamicSchemaVersionListResult 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 DeserializeDynamicSchemaVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DynamicSchemaVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaVersionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaVersionListResult.cs new file mode 100644 index 000000000000..cf73d6466193 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/DynamicSchemaVersionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a DynamicSchemaVersion list operation. + internal partial class DynamicSchemaVersionListResult + { + /// + /// 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 DynamicSchemaVersion items on this page. + /// is null. + internal DynamicSchemaVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DynamicSchemaVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DynamicSchemaVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DynamicSchemaVersionListResult() + { + } + + /// The DynamicSchemaVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplatePatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplatePatch.Serialization.cs new file mode 100644 index 000000000000..96369a5933cd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplatePatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeConfigTemplatePatch : 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(EdgeConfigTemplatePatch)} does not support writing '{format}' format."); + } + + 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 (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + EdgeConfigTemplatePatch 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(EdgeConfigTemplatePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeConfigTemplatePatch(document.RootElement, options); + } + + internal static EdgeConfigTemplatePatch DeserializeEdgeConfigTemplatePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ConfigTemplateUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConfigTemplateUpdateProperties.DeserializeConfigTemplateUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeConfigTemplatePatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplatePatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeConfigTemplatePatch 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 DeserializeEdgeConfigTemplatePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplatePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplatePatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplatePatch.cs new file mode 100644 index 000000000000..8416707113cf --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplatePatch.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the ConfigTemplate. + public partial class EdgeConfigTemplatePatch + { + /// + /// 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 EdgeConfigTemplatePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EdgeConfigTemplatePatch(IDictionary tags, ConfigTemplateUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal ConfigTemplateUpdateProperties Properties { get; set; } + /// Description of config template. + public string ConfigTemplateUpdateDescription + { + get => Properties is null ? default : Properties.Description; + set + { + if (Properties is null) + Properties = new ConfigTemplateUpdateProperties(); + Properties.Description = value; + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateProperties.Serialization.cs new file mode 100644 index 000000000000..99ad3e78ed80 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateProperties.Serialization.cs @@ -0,0 +1,152 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeConfigTemplateProperties : 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(EdgeConfigTemplateProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + if (options.Format != "W" && Optional.IsDefined(LatestVersion)) + { + writer.WritePropertyName("latestVersion"u8); + writer.WriteStringValue(LatestVersion); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeConfigTemplateProperties 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(EdgeConfigTemplateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeConfigTemplateProperties(document.RootElement, options); + } + + internal static EdgeConfigTemplateProperties DeserializeEdgeConfigTemplateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + string latestVersion = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("latestVersion"u8)) + { + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeConfigTemplateProperties(description, latestVersion, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeConfigTemplateProperties 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 DeserializeEdgeConfigTemplateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateProperties.cs new file mode 100644 index 000000000000..3ebb38064714 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateProperties.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Config Template Properties. + public partial class EdgeConfigTemplateProperties + { + /// + /// 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 . + /// Description of config template. + /// is null. + public EdgeConfigTemplateProperties(string description) + { + Argument.AssertNotNull(description, nameof(description)); + + Description = description; + } + + /// Initializes a new instance of . + /// Description of config template. + /// Latest config template version. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeConfigTemplateProperties(string description, string latestVersion, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Description = description; + LatestVersion = latestVersion; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeConfigTemplateProperties() + { + } + + /// Description of config template. + public string Description { get; set; } + /// Latest config template version. + public string LatestVersion { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateVersionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateVersionProperties.Serialization.cs new file mode 100644 index 000000000000..0a95ca81c4ec --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateVersionProperties.Serialization.cs @@ -0,0 +1,141 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeConfigTemplateVersionProperties : 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(EdgeConfigTemplateVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurations"u8); + writer.WriteStringValue(Configurations); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeConfigTemplateVersionProperties 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(EdgeConfigTemplateVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeConfigTemplateVersionProperties(document.RootElement, options); + } + + internal static EdgeConfigTemplateVersionProperties DeserializeEdgeConfigTemplateVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string configurations = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurations"u8)) + { + configurations = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeConfigTemplateVersionProperties(configurations, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeConfigTemplateVersionProperties 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 DeserializeEdgeConfigTemplateVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeConfigTemplateVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateVersionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateVersionProperties.cs new file mode 100644 index 000000000000..9e452933522c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeConfigTemplateVersionProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Config Template Version Properties. + public partial class EdgeConfigTemplateVersionProperties + { + /// + /// 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 . + /// Configuration values. + /// is null. + public EdgeConfigTemplateVersionProperties(string configurations) + { + Argument.AssertNotNull(configurations, nameof(configurations)); + + Configurations = configurations; + } + + /// Initializes a new instance of . + /// Configuration values. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeConfigTemplateVersionProperties(string configurations, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Configurations = configurations; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeConfigTemplateVersionProperties() + { + } + + /// Configuration values. + public string Configurations { get; set; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatch.Serialization.cs new file mode 100644 index 000000000000..48cb7c77c6a1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeContextPatch : 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(EdgeContextPatch)} does not support writing '{format}' format."); + } + + 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 (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + EdgeContextPatch 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(EdgeContextPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeContextPatch(document.RootElement, options); + } + + internal static EdgeContextPatch DeserializeEdgeContextPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + EdgeContextPatchProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = EdgeContextPatchProperties.DeserializeEdgeContextPatchProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeContextPatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeContextPatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeContextPatch 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 DeserializeEdgeContextPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeContextPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatch.cs new file mode 100644 index 000000000000..b5dd4c2df055 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the Context. + public partial class EdgeContextPatch + { + /// + /// 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 EdgeContextPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EdgeContextPatch(IDictionary tags, EdgeContextPatchProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public EdgeContextPatchProperties Properties { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatchProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatchProperties.Serialization.cs new file mode 100644 index 000000000000..c848f58e5d41 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatchProperties.Serialization.cs @@ -0,0 +1,168 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeContextPatchProperties : 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(EdgeContextPatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Capabilities)) + { + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Hierarchies)) + { + writer.WritePropertyName("hierarchies"u8); + writer.WriteStartArray(); + foreach (var item in Hierarchies) + { + 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 + } + } + } + + EdgeContextPatchProperties 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(EdgeContextPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeContextPatchProperties(document.RootElement, options); + } + + internal static EdgeContextPatchProperties DeserializeEdgeContextPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList capabilities = default; + IList hierarchies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("capabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContextCapability.DeserializeContextCapability(item, options)); + } + capabilities = array; + continue; + } + if (property.NameEquals("hierarchies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContextHierarchy.DeserializeContextHierarchy(item, options)); + } + hierarchies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeContextPatchProperties(capabilities ?? new ChangeTrackingList(), hierarchies ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeContextPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeContextPatchProperties 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 DeserializeEdgeContextPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeContextPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatchProperties.cs new file mode 100644 index 000000000000..478b77409c6d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextPatchProperties.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the Context. + public partial class EdgeContextPatchProperties + { + /// + /// 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 EdgeContextPatchProperties() + { + Capabilities = new ChangeTrackingList(); + Hierarchies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of Capabilities. + /// List of Hierarchies. + /// Keeps track of any properties unknown to the library. + internal EdgeContextPatchProperties(IList capabilities, IList hierarchies, IDictionary serializedAdditionalRawData) + { + Capabilities = capabilities; + Hierarchies = hierarchies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of Capabilities. + public IList Capabilities { get; } + /// List of Hierarchies. + public IList Hierarchies { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextProperties.Serialization.cs new file mode 100644 index 000000000000..a085384b32d3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextProperties.Serialization.cs @@ -0,0 +1,169 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeContextProperties : 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(EdgeContextProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("hierarchies"u8); + writer.WriteStartArray(); + foreach (var item in Hierarchies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeContextProperties 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(EdgeContextProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeContextProperties(document.RootElement, options); + } + + internal static EdgeContextProperties DeserializeEdgeContextProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList capabilities = default; + IList hierarchies = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("capabilities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContextCapability.DeserializeContextCapability(item, options)); + } + capabilities = array; + continue; + } + if (property.NameEquals("hierarchies"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContextHierarchy.DeserializeContextHierarchy(item, options)); + } + hierarchies = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeContextProperties(capabilities, hierarchies, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeContextProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeContextProperties 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 DeserializeEdgeContextProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeContextProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextProperties.cs new file mode 100644 index 000000000000..e947841d65c0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeContextProperties.cs @@ -0,0 +1,87 @@ +// 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.WorkloadOrchestration.Models +{ + /// Context Properties. + public partial class EdgeContextProperties + { + /// + /// 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 . + /// List of Capabilities. + /// List of Hierarchies. + /// or is null. + public EdgeContextProperties(IEnumerable capabilities, IEnumerable hierarchies) + { + Argument.AssertNotNull(capabilities, nameof(capabilities)); + Argument.AssertNotNull(hierarchies, nameof(hierarchies)); + + Capabilities = capabilities.ToList(); + Hierarchies = hierarchies.ToList(); + } + + /// Initializes a new instance of . + /// List of Capabilities. + /// List of Hierarchies. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeContextProperties(IList capabilities, IList hierarchies, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Capabilities = capabilities; + Hierarchies = hierarchies; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeContextProperties() + { + } + + /// List of Capabilities. + public IList Capabilities { get; } + /// List of Hierarchies. + public IList Hierarchies { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceHistoryProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceHistoryProperties.Serialization.cs new file mode 100644 index 000000000000..0b22c7b2a339 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceHistoryProperties.Serialization.cs @@ -0,0 +1,219 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeDeploymentInstanceHistoryProperties : 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(EdgeDeploymentInstanceHistoryProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("solutionVersion"u8); + writer.WriteObjectValue(SolutionVersion, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + } + if (options.Format != "W" && Optional.IsDefined(SolutionScope)) + { + writer.WritePropertyName("solutionScope"u8); + writer.WriteStringValue(SolutionScope); + } + if (Optional.IsDefined(ActiveState)) + { + writer.WritePropertyName("activeState"u8); + writer.WriteStringValue(ActiveState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ReconciliationPolicy)) + { + writer.WritePropertyName("reconciliationPolicy"u8); + writer.WriteObjectValue(ReconciliationPolicy, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeDeploymentInstanceHistoryProperties 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(EdgeDeploymentInstanceHistoryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDeploymentInstanceHistoryProperties(document.RootElement, options); + } + + internal static EdgeDeploymentInstanceHistoryProperties DeserializeEdgeDeploymentInstanceHistoryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SolutionVersionSnapshot solutionVersion = default; + EdgeTargetSnapshot target = default; + string solutionScope = default; + InstanceActiveState? activeState = default; + InstanceReconciliationPolicy reconciliationPolicy = default; + EdgeDeploymentStatus status = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersion"u8)) + { + solutionVersion = SolutionVersionSnapshot.DeserializeSolutionVersionSnapshot(property.Value, options); + continue; + } + if (property.NameEquals("target"u8)) + { + target = EdgeTargetSnapshot.DeserializeEdgeTargetSnapshot(property.Value, options); + continue; + } + if (property.NameEquals("solutionScope"u8)) + { + solutionScope = property.Value.GetString(); + continue; + } + if (property.NameEquals("activeState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeState = new InstanceActiveState(property.Value.GetString()); + continue; + } + if (property.NameEquals("reconciliationPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reconciliationPolicy = InstanceReconciliationPolicy.DeserializeInstanceReconciliationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = EdgeDeploymentStatus.DeserializeEdgeDeploymentStatus(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDeploymentInstanceHistoryProperties( + solutionVersion, + target, + solutionScope, + activeState, + reconciliationPolicy, + status, + provisioningState, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceHistoryProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeDeploymentInstanceHistoryProperties 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 DeserializeEdgeDeploymentInstanceHistoryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceHistoryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceHistoryProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceHistoryProperties.cs new file mode 100644 index 000000000000..8b3798de0bef --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceHistoryProperties.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Instance History Properties. + public partial class EdgeDeploymentInstanceHistoryProperties + { + /// + /// 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 . + /// Solution version of instance. + /// Target of instance. + internal EdgeDeploymentInstanceHistoryProperties(SolutionVersionSnapshot solutionVersion, EdgeTargetSnapshot target) + { + SolutionVersion = solutionVersion; + Target = target; + } + + /// Initializes a new instance of . + /// Solution version of instance. + /// Target of instance. + /// Scope of instance. + /// State of instance. + /// Reconciliation policy of instance. + /// Deployment Status of instance. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeDeploymentInstanceHistoryProperties(SolutionVersionSnapshot solutionVersion, EdgeTargetSnapshot target, string solutionScope, InstanceActiveState? activeState, InstanceReconciliationPolicy reconciliationPolicy, EdgeDeploymentStatus status, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SolutionVersion = solutionVersion; + Target = target; + SolutionScope = solutionScope; + ActiveState = activeState; + ReconciliationPolicy = reconciliationPolicy; + Status = status; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeDeploymentInstanceHistoryProperties() + { + } + + /// Solution version of instance. + public SolutionVersionSnapshot SolutionVersion { get; } + /// Target of instance. + public EdgeTargetSnapshot Target { get; } + /// Scope of instance. + public string SolutionScope { get; } + /// State of instance. + public InstanceActiveState? ActiveState { get; } + /// Reconciliation policy of instance. + public InstanceReconciliationPolicy ReconciliationPolicy { get; } + /// Deployment Status of instance. + public EdgeDeploymentStatus Status { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..808dca45e724 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceProperties.Serialization.cs @@ -0,0 +1,229 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeDeploymentInstanceProperties : 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(EdgeDeploymentInstanceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + if (Optional.IsDefined(ActiveState)) + { + writer.WritePropertyName("activeState"u8); + writer.WriteStringValue(ActiveState.Value.ToString()); + } + if (Optional.IsDefined(ReconciliationPolicy)) + { + writer.WritePropertyName("reconciliationPolicy"u8); + writer.WriteObjectValue(ReconciliationPolicy, options); + } + if (Optional.IsDefined(SolutionScope)) + { + writer.WritePropertyName("solutionScope"u8); + writer.WriteStringValue(SolutionScope); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } + if (options.Format != "W" && Optional.IsDefined(DeploymentTimestampEpoch)) + { + writer.WritePropertyName("deploymentTimestampEpoch"u8); + writer.WriteNumberValue(DeploymentTimestampEpoch.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeDeploymentInstanceProperties 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(EdgeDeploymentInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDeploymentInstanceProperties(document.RootElement, options); + } + + internal static EdgeDeploymentInstanceProperties DeserializeEdgeDeploymentInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string solutionVersionId = default; + string targetId = default; + InstanceActiveState? activeState = default; + InstanceReconciliationPolicy reconciliationPolicy = default; + string solutionScope = default; + EdgeDeploymentStatus status = default; + long? deploymentTimestampEpoch = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("activeState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeState = new InstanceActiveState(property.Value.GetString()); + continue; + } + if (property.NameEquals("reconciliationPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reconciliationPolicy = InstanceReconciliationPolicy.DeserializeInstanceReconciliationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("solutionScope"u8)) + { + solutionScope = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = EdgeDeploymentStatus.DeserializeEdgeDeploymentStatus(property.Value, options); + continue; + } + if (property.NameEquals("deploymentTimestampEpoch"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deploymentTimestampEpoch = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDeploymentInstanceProperties( + solutionVersionId, + targetId, + activeState, + reconciliationPolicy, + solutionScope, + status, + deploymentTimestampEpoch, + provisioningState, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeDeploymentInstanceProperties 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 DeserializeEdgeDeploymentInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDeploymentInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceProperties.cs new file mode 100644 index 000000000000..283c68ce2b8c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentInstanceProperties.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Instance Properties. + public partial class EdgeDeploymentInstanceProperties + { + /// + /// 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 . + /// Solution version of instance. + /// Target of instance. + /// or is null. + public EdgeDeploymentInstanceProperties(string solutionVersionId, string targetId) + { + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + + SolutionVersionId = solutionVersionId; + TargetId = targetId; + } + + /// Initializes a new instance of . + /// Solution version of instance. + /// Target of instance. + /// State of instance. + /// Reconciliation policy of instance. + /// Scope of instance. + /// Status of instance. + /// Deployment timestamp of instance. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeDeploymentInstanceProperties(string solutionVersionId, string targetId, InstanceActiveState? activeState, InstanceReconciliationPolicy reconciliationPolicy, string solutionScope, EdgeDeploymentStatus status, long? deploymentTimestampEpoch, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + TargetId = targetId; + ActiveState = activeState; + ReconciliationPolicy = reconciliationPolicy; + SolutionScope = solutionScope; + Status = status; + DeploymentTimestampEpoch = deploymentTimestampEpoch; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeDeploymentInstanceProperties() + { + } + + /// Solution version of instance. + public string SolutionVersionId { get; set; } + /// Target of instance. + public string TargetId { get; set; } + /// State of instance. + public InstanceActiveState? ActiveState { get; set; } + /// Reconciliation policy of instance. + public InstanceReconciliationPolicy ReconciliationPolicy { get; set; } + /// Scope of instance. + public string SolutionScope { get; set; } + /// Status of instance. + public EdgeDeploymentStatus Status { get; } + /// Deployment timestamp of instance. + public long? DeploymentTimestampEpoch { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentStatus.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentStatus.Serialization.cs new file mode 100644 index 000000000000..19ccb1cd37b3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentStatus.Serialization.cs @@ -0,0 +1,249 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeDeploymentStatus : 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(EdgeDeploymentStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(LastModified)) + { + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified.Value, "O"); + } + if (Optional.IsDefined(Deployed)) + { + writer.WritePropertyName("deployed"u8); + writer.WriteNumberValue(Deployed.Value); + } + if (Optional.IsDefined(ExpectedRunningJobId)) + { + writer.WritePropertyName("expectedRunningJobId"u8); + writer.WriteNumberValue(ExpectedRunningJobId.Value); + } + if (Optional.IsDefined(RunningJobId)) + { + writer.WritePropertyName("runningJobId"u8); + writer.WriteNumberValue(RunningJobId.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (Optional.IsDefined(StatusDetails)) + { + writer.WritePropertyName("statusDetails"u8); + writer.WriteStringValue(StatusDetails); + } + if (Optional.IsDefined(Generation)) + { + writer.WritePropertyName("generation"u8); + writer.WriteNumberValue(Generation.Value); + } + if (Optional.IsCollectionDefined(TargetStatuses)) + { + writer.WritePropertyName("targetStatuses"u8); + writer.WriteStartArray(); + foreach (var item in TargetStatuses) + { + 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 + } + } + } + + EdgeDeploymentStatus 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(EdgeDeploymentStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDeploymentStatus(document.RootElement, options); + } + + internal static EdgeDeploymentStatus DeserializeEdgeDeploymentStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? lastModified = default; + int? deployed = default; + int? expectedRunningJobId = default; + int? runningJobId = default; + string status = default; + string statusDetails = default; + int? generation = default; + IReadOnlyList targetStatuses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lastModified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deployed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deployed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("expectedRunningJobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expectedRunningJobId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runningJobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningJobId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("statusDetails"u8)) + { + statusDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("generation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + generation = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetStatuses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeTargetStatus.DeserializeEdgeTargetStatus(item, options)); + } + targetStatuses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDeploymentStatus( + lastModified, + deployed, + expectedRunningJobId, + runningJobId, + status, + statusDetails, + generation, + targetStatuses ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDeploymentStatus)} does not support writing '{options.Format}' format."); + } + } + + EdgeDeploymentStatus 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 DeserializeEdgeDeploymentStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDeploymentStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentStatus.cs new file mode 100644 index 000000000000..c517e00b538d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDeploymentStatus.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Deployment Status. + public partial class EdgeDeploymentStatus + { + /// + /// 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 . + internal EdgeDeploymentStatus() + { + TargetStatuses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The lastModified of the Status. + /// Indicates if Instance is deployed. + /// The expected running job id. + /// The running job id. + /// Deployment status. + /// Status details. + /// Deployment Generation. + /// Target resource statuses. + /// Keeps track of any properties unknown to the library. + internal EdgeDeploymentStatus(DateTimeOffset? lastModified, int? deployed, int? expectedRunningJobId, int? runningJobId, string status, string statusDetails, int? generation, IReadOnlyList targetStatuses, IDictionary serializedAdditionalRawData) + { + LastModified = lastModified; + Deployed = deployed; + ExpectedRunningJobId = expectedRunningJobId; + RunningJobId = runningJobId; + Status = status; + StatusDetails = statusDetails; + Generation = generation; + TargetStatuses = targetStatuses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The lastModified of the Status. + public DateTimeOffset? LastModified { get; } + /// Indicates if Instance is deployed. + public int? Deployed { get; } + /// The expected running job id. + public int? ExpectedRunningJobId { get; } + /// The running job id. + public int? RunningJobId { get; } + /// Deployment status. + public string Status { get; } + /// Status details. + public string StatusDetails { get; } + /// Deployment Generation. + public int? Generation { get; } + /// Target resource statuses. + public IReadOnlyList TargetStatuses { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatch.Serialization.cs new file mode 100644 index 000000000000..1f4f74dbcc88 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeDiagnosticPatch : 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(EdgeDiagnosticPatch)} 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 + } + } + } + + EdgeDiagnosticPatch 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(EdgeDiagnosticPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDiagnosticPatch(document.RootElement, options); + } + + internal static EdgeDiagnosticPatch DeserializeEdgeDiagnosticPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeDiagnosticPatchProperties 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 = EdgeDiagnosticPatchProperties.DeserializeEdgeDiagnosticPatchProperties(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 EdgeDiagnosticPatch(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticPatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeDiagnosticPatch 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 DeserializeEdgeDiagnosticPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatch.cs new file mode 100644 index 000000000000..700d814ed5d9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the Diagnostic. + public partial class EdgeDiagnosticPatch + { + /// + /// 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 EdgeDiagnosticPatch() + { + 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 EdgeDiagnosticPatch(EdgeDiagnosticPatchProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) + { + Properties = properties; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeDiagnosticPatchProperties Properties { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatchProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatchProperties.Serialization.cs new file mode 100644 index 000000000000..9a7dc3657b49 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatchProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeDiagnosticPatchProperties : 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(EdgeDiagnosticPatchProperties)} does not support writing '{format}' format."); + } + + 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 + } + } + } + + EdgeDiagnosticPatchProperties 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(EdgeDiagnosticPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDiagnosticPatchProperties(document.RootElement, options); + } + + internal static EdgeDiagnosticPatchProperties DeserializeEdgeDiagnosticPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDiagnosticPatchProperties(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeDiagnosticPatchProperties 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 DeserializeEdgeDiagnosticPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatchProperties.cs new file mode 100644 index 000000000000..76392c9ddad7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticPatchProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the Diagnostic. + public partial class EdgeDiagnosticPatchProperties + { + /// + /// 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 EdgeDiagnosticPatchProperties() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal EdgeDiagnosticPatchProperties(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticProperties.Serialization.cs new file mode 100644 index 000000000000..a76824ce80b0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticProperties.Serialization.cs @@ -0,0 +1,133 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class EdgeDiagnosticProperties : 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(EdgeDiagnosticProperties)} 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) + { + 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 + } + } + } + + EdgeDiagnosticProperties 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(EdgeDiagnosticProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDiagnosticProperties(document.RootElement, options); + } + + internal static EdgeDiagnosticProperties DeserializeEdgeDiagnosticProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkloadOrchestrationProvisioningState? provisioningState = 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 WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDiagnosticProperties(provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeDiagnosticProperties 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 DeserializeEdgeDiagnosticProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDiagnosticProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticProperties.cs new file mode 100644 index 000000000000..2b80166ecc97 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDiagnosticProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The properties of a Diagnostic resource. + internal partial class EdgeDiagnosticProperties + { + /// + /// 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 EdgeDiagnosticProperties() + { + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal EdgeDiagnosticProperties(WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDynamicSchemaProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDynamicSchemaProperties.Serialization.cs new file mode 100644 index 000000000000..ce658ffa6f55 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDynamicSchemaProperties.Serialization.cs @@ -0,0 +1,163 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeDynamicSchemaProperties : 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(EdgeDynamicSchemaProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ConfigurationType)) + { + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ConfigurationModel)) + { + writer.WritePropertyName("configurationModel"u8); + writer.WriteStringValue(ConfigurationModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeDynamicSchemaProperties 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(EdgeDynamicSchemaProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeDynamicSchemaProperties(document.RootElement, options); + } + + internal static EdgeDynamicSchemaProperties DeserializeEdgeDynamicSchemaProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSchemaConfigurationType? configurationType = default; + EdgeSchemaConfigurationModelType? configurationModel = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationType = new EdgeSchemaConfigurationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("configurationModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationModel = new EdgeSchemaConfigurationModelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeDynamicSchemaProperties(configurationType, configurationModel, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeDynamicSchemaProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeDynamicSchemaProperties 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 DeserializeEdgeDynamicSchemaProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeDynamicSchemaProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDynamicSchemaProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDynamicSchemaProperties.cs new file mode 100644 index 000000000000..aefbb0313d5e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeDynamicSchemaProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// DynamicSchema Properties. + public partial class EdgeDynamicSchemaProperties + { + /// + /// 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 EdgeDynamicSchemaProperties() + { + } + + /// Initializes a new instance of . + /// Type of configuration. + /// Type of configuration model. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeDynamicSchemaProperties(EdgeSchemaConfigurationType? configurationType, EdgeSchemaConfigurationModelType? configurationModel, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + ConfigurationModel = configurationModel; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of configuration. + public EdgeSchemaConfigurationType? ConfigurationType { get; } + /// Type of configuration model. + public EdgeSchemaConfigurationModelType? ConfigurationModel { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionProperties.Serialization.cs new file mode 100644 index 000000000000..ccdd76063ddd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionProperties.Serialization.cs @@ -0,0 +1,201 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeExecutionProperties : 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(EdgeExecutionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("workflowVersionId"u8); + writer.WriteStringValue(WorkflowVersionId); + if (Optional.IsCollectionDefined(Specification)) + { + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeExecutionProperties 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(EdgeExecutionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeExecutionProperties(document.RootElement, options); + } + + internal static EdgeExecutionProperties DeserializeEdgeExecutionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string workflowVersionId = default; + IDictionary specification = default; + EdgeExecutionStatus status = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workflowVersionId"u8)) + { + workflowVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("specification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = EdgeExecutionStatus.DeserializeEdgeExecutionStatus(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeExecutionProperties(workflowVersionId, specification ?? new ChangeTrackingDictionary(), status, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeExecutionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeExecutionProperties 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 DeserializeEdgeExecutionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeExecutionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionProperties.cs new file mode 100644 index 000000000000..45996879b418 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionProperties.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Execution Properties. + public partial class EdgeExecutionProperties + { + /// + /// 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 . + /// Workflow version of execution. + /// is null. + public EdgeExecutionProperties(string workflowVersionId) + { + Argument.AssertNotNull(workflowVersionId, nameof(workflowVersionId)); + + WorkflowVersionId = workflowVersionId; + Specification = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Workflow version of execution. + /// Execution specification. + /// Status of Execution. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeExecutionProperties(string workflowVersionId, IDictionary specification, EdgeExecutionStatus status, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + WorkflowVersionId = workflowVersionId; + Specification = specification; + Status = status; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeExecutionProperties() + { + } + + /// Workflow version of execution. + public string WorkflowVersionId { get; set; } + /// + /// Execution specification + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary Specification { get; } + /// Status of Execution. + public EdgeExecutionStatus Status { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStageStatus.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStageStatus.Serialization.cs new file mode 100644 index 000000000000..070d252e8457 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStageStatus.Serialization.cs @@ -0,0 +1,291 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeExecutionStageStatus : 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(EdgeExecutionStageStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteNumberValue(Status.Value); + } + if (Optional.IsDefined(StatusMessage)) + { + writer.WritePropertyName("statusMessage"u8); + writer.WriteStringValue(StatusMessage); + } + if (Optional.IsDefined(Stage)) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + if (Optional.IsDefined(Nextstage)) + { + writer.WritePropertyName("nextstage"u8); + writer.WriteStringValue(Nextstage); + } + if (Optional.IsDefined(ErrorMessage)) + { + writer.WritePropertyName("errorMessage"u8); + writer.WriteStringValue(ErrorMessage); + } + if (Optional.IsDefined(IsActive)) + { + writer.WritePropertyName("isActive"u8); + writer.WriteStringValue(IsActive.Value.ToString()); + } + if (Optional.IsCollectionDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + 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 + } + } + } + + EdgeExecutionStageStatus 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(EdgeExecutionStageStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeExecutionStageStatus(document.RootElement, options); + } + + internal static EdgeExecutionStageStatus DeserializeEdgeExecutionStageStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? status = default; + string statusMessage = default; + string stage = default; + string nextstage = default; + string errorMessage = default; + InstanceActiveState? isActive = default; + IReadOnlyDictionary inputs = default; + IReadOnlyDictionary outputs = 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 = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("statusMessage"u8)) + { + statusMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("stage"u8)) + { + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextstage"u8)) + { + nextstage = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage"u8)) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("isActive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isActive = new InstanceActiveState(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + inputs = dictionary; + continue; + } + if (property.NameEquals("outputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + outputs = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeExecutionStageStatus( + status, + statusMessage, + stage, + nextstage, + errorMessage, + isActive, + inputs ?? new ChangeTrackingDictionary(), + outputs ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeExecutionStageStatus)} does not support writing '{options.Format}' format."); + } + } + + EdgeExecutionStageStatus 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 DeserializeEdgeExecutionStageStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeExecutionStageStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStageStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStageStatus.cs new file mode 100644 index 000000000000..e1bf49aac058 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStageStatus.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Result of Stage execution. + public partial class EdgeExecutionStageStatus + { + /// + /// 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 . + internal EdgeExecutionStageStatus() + { + Inputs = new ChangeTrackingDictionary(); + Outputs = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Deployment status. + /// Status message. + /// Current stage. + /// Next stage. + /// Error message. + /// whether this stage is active or inactive. + /// The inputs of the StageHistory, Inputs holds a key-value map of user-defined parameters for the initial stage. + /// The outputs of the StageHistory, it is different as the different input stages. + /// Keeps track of any properties unknown to the library. + internal EdgeExecutionStageStatus(int? status, string statusMessage, string stage, string nextstage, string errorMessage, InstanceActiveState? isActive, IReadOnlyDictionary inputs, IReadOnlyDictionary outputs, IDictionary serializedAdditionalRawData) + { + Status = status; + StatusMessage = statusMessage; + Stage = stage; + Nextstage = nextstage; + ErrorMessage = errorMessage; + IsActive = isActive; + Inputs = inputs; + Outputs = outputs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Deployment status. + public int? Status { get; } + /// Status message. + public string StatusMessage { get; } + /// Current stage. + public string Stage { get; } + /// Next stage. + public string Nextstage { get; } + /// Error message. + public string ErrorMessage { get; } + /// whether this stage is active or inactive. + public InstanceActiveState? IsActive { get; } + /// + /// The inputs of the StageHistory, Inputs holds a key-value map of user-defined parameters for the initial stage + /// + /// 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" }. + /// + /// + /// + /// + public IReadOnlyDictionary Inputs { get; } + /// + /// The outputs of the StageHistory, it is different as the different input stages. + /// + /// 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" }. + /// + /// + /// + /// + public IReadOnlyDictionary Outputs { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStatus.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStatus.Serialization.cs new file mode 100644 index 000000000000..72b6ffbf2451 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStatus.Serialization.cs @@ -0,0 +1,184 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeExecutionStatus : 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(EdgeExecutionStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UpdateOn)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteStringValue(UpdateOn.Value, "O"); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteNumberValue(Status.Value); + } + if (Optional.IsDefined(StatusMessage)) + { + writer.WritePropertyName("statusMessage"u8); + writer.WriteStringValue(StatusMessage); + } + if (Optional.IsCollectionDefined(StageHistory)) + { + writer.WritePropertyName("stageHistory"u8); + writer.WriteStartArray(); + foreach (var item in StageHistory) + { + 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 + } + } + } + + EdgeExecutionStatus 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(EdgeExecutionStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeExecutionStatus(document.RootElement, options); + } + + internal static EdgeExecutionStatus DeserializeEdgeExecutionStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? updateTime = default; + int? status = default; + string statusMessage = default; + IReadOnlyList stageHistory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("statusMessage"u8)) + { + statusMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("stageHistory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeExecutionStageStatus.DeserializeEdgeExecutionStageStatus(item, options)); + } + stageHistory = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeExecutionStatus(updateTime, status, statusMessage, stageHistory ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeExecutionStatus)} does not support writing '{options.Format}' format."); + } + } + + EdgeExecutionStatus 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 DeserializeEdgeExecutionStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeExecutionStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStatus.cs new file mode 100644 index 000000000000..b94890f6f512 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeExecutionStatus.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Execution Status. + public partial class EdgeExecutionStatus + { + /// + /// 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 . + internal EdgeExecutionStatus() + { + StageHistory = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The lastModified timestamp of the Status. + /// Deployment status. + /// status details. + /// target resource statuses. + /// Keeps track of any properties unknown to the library. + internal EdgeExecutionStatus(DateTimeOffset? updateOn, int? status, string statusMessage, IReadOnlyList stageHistory, IDictionary serializedAdditionalRawData) + { + UpdateOn = updateOn; + Status = status; + StatusMessage = statusMessage; + StageHistory = stageHistory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The lastModified timestamp of the Status. + public DateTimeOffset? UpdateOn { get; } + /// Deployment status. + public int? Status { get; } + /// status details. + public string StatusMessage { get; } + /// target resource statuses. + public IReadOnlyList StageHistory { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobContent.Serialization.cs new file mode 100644 index 000000000000..54de82cb1c46 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobContent.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + [PersistableModelProxy(typeof(UnknownEdgeJobContent))] + public partial class EdgeJobContent : 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(EdgeJobContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.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 + } + } + } + + EdgeJobContent 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(EdgeJobContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobContent(document.RootElement, options); + } + + internal static EdgeJobContent DeserializeEdgeJobContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("jobType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "deploy": return DeployJobContent.DeserializeDeployJobContent(element, options); + } + } + return UnknownEdgeJobContent.DeserializeUnknownEdgeJobContent(element, options); + } + + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobContent)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobContent 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 DeserializeEdgeJobContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobContent.cs new file mode 100644 index 000000000000..8db48abf6d5c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobContent.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// + /// Base Job Parameter + /// 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 . + /// + public abstract partial class EdgeJobContent + { + /// + /// 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; + + /// Initializes a new instance of . + protected EdgeJobContent() + { + } + + /// Initializes a new instance of . + /// Job type discriminator value. + /// Keeps track of any properties unknown to the library. + internal EdgeJobContent(EdgeJobType jobType, IDictionary serializedAdditionalRawData) + { + JobType = jobType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Job type discriminator value. + internal EdgeJobType JobType { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobProperties.Serialization.cs new file mode 100644 index 000000000000..aa9ddcc837bb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobProperties.Serialization.cs @@ -0,0 +1,268 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeJobProperties : 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(EdgeJobProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + 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"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(JobParameter)) + { + writer.WritePropertyName("jobParameter"u8); + writer.WriteObjectValue(JobParameter, options); + } + if (Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (Optional.IsCollectionDefined(Steps)) + { + writer.WritePropertyName("steps"u8); + writer.WriteStartArray(); + foreach (var item in Steps) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TriggeredBy)) + { + writer.WritePropertyName("triggeredBy"u8); + writer.WriteStringValue(TriggeredBy); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, 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 + } + } + } + + EdgeJobProperties 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(EdgeJobProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobProperties(document.RootElement, options); + } + + internal static EdgeJobProperties DeserializeEdgeJobProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeJobType jobType = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + EdgeJobStatus status = default; + EdgeJobContent jobParameter = default; + string correlationId = default; + IReadOnlyList steps = default; + string triggeredBy = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + ResponseError errorDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobType"u8)) + { + jobType = new EdgeJobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new EdgeJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobParameter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobParameter = EdgeJobContent.DeserializeEdgeJobContent(property.Value, options); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("steps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeJobStep.DeserializeEdgeJobStep(item, options)); + } + steps = array; + continue; + } + if (property.NameEquals("triggeredBy"u8)) + { + triggeredBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeJobProperties( + jobType, + startTime, + endTime, + status, + jobParameter, + correlationId, + steps ?? new ChangeTrackingList(), + triggeredBy, + provisioningState, + errorDetails, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobProperties 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 DeserializeEdgeJobProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobProperties.cs new file mode 100644 index 000000000000..fdca17da1c82 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobProperties.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Properties of a Job resource, including type, status, parameters, steps, and error details. + public partial class EdgeJobProperties + { + /// + /// 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 type of job. + /// Status of the job. + internal EdgeJobProperties(EdgeJobType jobType, EdgeJobStatus status) + { + JobType = jobType; + Status = status; + Steps = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of job. + /// Start time of the job (ISO8601). + /// End time of the job (ISO8601). + /// Status of the job. + /// + /// Parameters for the job. + /// 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 . + /// + /// Correlation ID for tracking. + /// Steps and substatuses for the job. + /// The OID or identity that triggered the job. + /// Provisioning state of the resource. + /// Error Details if any failure is there. + /// Keeps track of any properties unknown to the library. + internal EdgeJobProperties(EdgeJobType jobType, DateTimeOffset? startOn, DateTimeOffset? endOn, EdgeJobStatus status, EdgeJobContent jobParameter, string correlationId, IReadOnlyList steps, string triggeredBy, WorkloadOrchestrationProvisioningState? provisioningState, ResponseError errorDetails, IDictionary serializedAdditionalRawData) + { + JobType = jobType; + StartOn = startOn; + EndOn = endOn; + Status = status; + JobParameter = jobParameter; + CorrelationId = correlationId; + Steps = steps; + TriggeredBy = triggeredBy; + ProvisioningState = provisioningState; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeJobProperties() + { + } + + /// The type of job. + public EdgeJobType JobType { get; } + /// Start time of the job (ISO8601). + public DateTimeOffset? StartOn { get; } + /// End time of the job (ISO8601). + public DateTimeOffset? EndOn { get; } + /// Status of the job. + public EdgeJobStatus Status { get; } + /// + /// Parameters for the job. + /// 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 . + /// + public EdgeJobContent JobParameter { get; } + /// Correlation ID for tracking. + public string CorrelationId { get; } + /// Steps and substatuses for the job. + public IReadOnlyList Steps { get; } + /// The OID or identity that triggered the job. + public string TriggeredBy { get; } + /// Provisioning state of the resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + /// Error Details if any failure is there. + public ResponseError ErrorDetails { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStatus.cs new file mode 100644 index 000000000000..dc2d388ba643 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Status of a job or job step. + public readonly partial struct EdgeJobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeJobStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string InProgressValue = "InProgress"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// The job or step is not started. + public static EdgeJobStatus NotStarted { get; } = new EdgeJobStatus(NotStartedValue); + /// The job or step is in progress. + public static EdgeJobStatus InProgress { get; } = new EdgeJobStatus(InProgressValue); + /// The job or step succeeded. + public static EdgeJobStatus Succeeded { get; } = new EdgeJobStatus(SucceededValue); + /// The job or step failed. + public static EdgeJobStatus Failed { get; } = new EdgeJobStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeJobStatus left, EdgeJobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeJobStatus left, EdgeJobStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeJobStatus(string value) => new EdgeJobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeJobStatus other && Equals(other); + /// + public bool Equals(EdgeJobStatus 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStep.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStep.Serialization.cs new file mode 100644 index 000000000000..4523f9721cf0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStep.Serialization.cs @@ -0,0 +1,240 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeJobStep : 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(EdgeJobStep)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + 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(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsDefined(Statistics)) + { + writer.WritePropertyName("statistics"u8); + writer.WriteObjectValue(Statistics, options); + } + if (Optional.IsCollectionDefined(Steps)) + { + writer.WritePropertyName("steps"u8); + writer.WriteStartArray(); + foreach (var item in Steps) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, 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 + } + } + } + + EdgeJobStep 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(EdgeJobStep)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobStep(document.RootElement, options); + } + + internal static EdgeJobStep DeserializeEdgeJobStep(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + EdgeJobStatus status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + string message = default; + EdgeJobStepStatistics statistics = default; + IReadOnlyList steps = default; + ResponseError errorDetails = 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("status"u8)) + { + status = new EdgeJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("statistics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statistics = EdgeJobStepStatistics.DeserializeEdgeJobStepStatistics(property.Value, options); + continue; + } + if (property.NameEquals("steps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeEdgeJobStep(item, options)); + } + steps = array; + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeJobStep( + name, + status, + startTime, + endTime, + message, + statistics, + steps ?? new ChangeTrackingList(), + errorDetails, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobStep)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobStep 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 DeserializeEdgeJobStep(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobStep)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStep.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStep.cs new file mode 100644 index 000000000000..30fc585143e9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStep.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Job Step. + public partial class EdgeJobStep + { + /// + /// 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 . + /// Name of the step. + /// Status of the step. + /// is null. + internal EdgeJobStep(string name, EdgeJobStatus status) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Status = status; + Steps = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of the step. + /// Status of the step. + /// Start time of the step (ISO8601). + /// End time of the step (ISO8601). + /// Message for the step. + /// + /// Statistics for the step + /// 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 . + /// + /// Nested substeps for this step. + /// Error Details if any failure is there. + /// Keeps track of any properties unknown to the library. + internal EdgeJobStep(string name, EdgeJobStatus status, DateTimeOffset? startOn, DateTimeOffset? endOn, string message, EdgeJobStepStatistics statistics, IReadOnlyList steps, ResponseError errorDetails, IDictionary serializedAdditionalRawData) + { + Name = name; + Status = status; + StartOn = startOn; + EndOn = endOn; + Message = message; + Statistics = statistics; + Steps = steps; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeJobStep() + { + } + + /// Name of the step. + public string Name { get; } + /// Status of the step. + public EdgeJobStatus Status { get; } + /// Start time of the step (ISO8601). + public DateTimeOffset? StartOn { get; } + /// End time of the step (ISO8601). + public DateTimeOffset? EndOn { get; } + /// Message for the step. + public string Message { get; } + /// + /// Statistics for the step + /// 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 . + /// + public EdgeJobStepStatistics Statistics { get; } + /// Nested substeps for this step. + public IReadOnlyList Steps { get; } + /// Error Details if any failure is there. + public ResponseError ErrorDetails { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStepStatistics.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStepStatistics.Serialization.cs new file mode 100644 index 000000000000..56218c91cdfb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStepStatistics.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + [PersistableModelProxy(typeof(UnknownEdgeJobStepStatistics))] + public partial class EdgeJobStepStatistics : 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(EdgeJobStepStatistics)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("statisticsType"u8); + writer.WriteStringValue(StatisticsType.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 + } + } + } + + EdgeJobStepStatistics 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(EdgeJobStepStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobStepStatistics(document.RootElement, options); + } + + internal static EdgeJobStepStatistics DeserializeEdgeJobStepStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("statisticsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "deploy": return DeployJobStepStatistics.DeserializeDeployJobStepStatistics(element, options); + } + } + return UnknownEdgeJobStepStatistics.DeserializeUnknownEdgeJobStepStatistics(element, options); + } + + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobStepStatistics)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobStepStatistics 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 DeserializeEdgeJobStepStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobStepStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStepStatistics.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStepStatistics.cs new file mode 100644 index 000000000000..09d741b5a30a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobStepStatistics.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// + /// Base Job Step Statistics + /// 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 . + /// + public abstract partial class EdgeJobStepStatistics + { + /// + /// 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; + + /// Initializes a new instance of . + protected EdgeJobStepStatistics() + { + } + + /// Initializes a new instance of . + /// Statistics type discriminator value. + /// Keeps track of any properties unknown to the library. + internal EdgeJobStepStatistics(EdgeJobType statisticsType, IDictionary serializedAdditionalRawData) + { + StatisticsType = statisticsType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Statistics type discriminator value. + internal EdgeJobType StatisticsType { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobType.cs new file mode 100644 index 000000000000..b3beefcd6917 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeJobType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// JobType for the job. Supports extensibility via string values. + public readonly partial struct EdgeJobType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeJobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeployValue = "deploy"; + private const string StagingValue = "staging"; + private const string ExternalValidationValue = "externalValidation"; + + /// A deployment job. + public static EdgeJobType Deploy { get; } = new EdgeJobType(DeployValue); + /// A staging job. + public static EdgeJobType Staging { get; } = new EdgeJobType(StagingValue); + /// A validation job. + public static EdgeJobType ExternalValidation { get; } = new EdgeJobType(ExternalValidationValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeJobType left, EdgeJobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeJobType left, EdgeJobType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeJobType(string value) => new EdgeJobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeJobType other && Equals(other); + /// + public bool Equals(EdgeJobType 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeResourceState.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeResourceState.cs new file mode 100644 index 000000000000..b1b32b1bb406 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeResourceState.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.WorkloadOrchestration.Models +{ + /// Resource Type State. + public readonly partial struct EdgeResourceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeResourceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string InactiveValue = "inactive"; + + /// Resource is active. + public static EdgeResourceState Active { get; } = new EdgeResourceState(ActiveValue); + /// Resource is inactive. + public static EdgeResourceState Inactive { get; } = new EdgeResourceState(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeResourceState left, EdgeResourceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeResourceState left, EdgeResourceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeResourceState(string value) => new EdgeResourceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeResourceState other && Equals(other); + /// + public bool Equals(EdgeResourceState 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaConfigurationModelType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaConfigurationModelType.cs new file mode 100644 index 000000000000..6792203382ef --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaConfigurationModelType.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.WorkloadOrchestration.Models +{ + /// Available configuration models. + public readonly partial struct EdgeSchemaConfigurationModelType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeSchemaConfigurationModelType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationValue = "Application"; + private const string CommonValue = "Common"; + + /// Configuration model Application. + public static EdgeSchemaConfigurationModelType Application { get; } = new EdgeSchemaConfigurationModelType(ApplicationValue); + /// Configuration model Common. + public static EdgeSchemaConfigurationModelType Common { get; } = new EdgeSchemaConfigurationModelType(CommonValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeSchemaConfigurationModelType left, EdgeSchemaConfigurationModelType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeSchemaConfigurationModelType left, EdgeSchemaConfigurationModelType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeSchemaConfigurationModelType(string value) => new EdgeSchemaConfigurationModelType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeSchemaConfigurationModelType other && Equals(other); + /// + public bool Equals(EdgeSchemaConfigurationModelType 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaConfigurationType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaConfigurationType.cs new file mode 100644 index 000000000000..01c0107a7cb1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaConfigurationType.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.WorkloadOrchestration.Models +{ + /// Available configuration types. + public readonly partial struct EdgeSchemaConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeSchemaConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SharedValue = "Shared"; + private const string HierarchyValue = "Hierarchy"; + + /// Configuration type Shared. + public static EdgeSchemaConfigurationType Shared { get; } = new EdgeSchemaConfigurationType(SharedValue); + /// Configuration type Hierarchy. + public static EdgeSchemaConfigurationType Hierarchy { get; } = new EdgeSchemaConfigurationType(HierarchyValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeSchemaConfigurationType left, EdgeSchemaConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeSchemaConfigurationType left, EdgeSchemaConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeSchemaConfigurationType(string value) => new EdgeSchemaConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeSchemaConfigurationType other && Equals(other); + /// + public bool Equals(EdgeSchemaConfigurationType 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatch.Serialization.cs new file mode 100644 index 000000000000..2e5722bb3445 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSchemaPatch : 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(EdgeSchemaPatch)} 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 + } + } + } + + EdgeSchemaPatch 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(EdgeSchemaPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaPatch(document.RootElement, options); + } + + internal static EdgeSchemaPatch DeserializeEdgeSchemaPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSchemaPatchProperties 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 = EdgeSchemaPatchProperties.DeserializeEdgeSchemaPatchProperties(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 EdgeSchemaPatch(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaPatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaPatch 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 DeserializeEdgeSchemaPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatch.cs new file mode 100644 index 000000000000..e913fe6366b9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the Schema. + public partial class EdgeSchemaPatch + { + /// + /// 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 EdgeSchemaPatch() + { + 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 EdgeSchemaPatch(EdgeSchemaPatchProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) + { + Properties = properties; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSchemaPatchProperties Properties { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatchProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatchProperties.Serialization.cs new file mode 100644 index 000000000000..4c720e2bccd6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatchProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSchemaPatchProperties : 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(EdgeSchemaPatchProperties)} does not support writing '{format}' format."); + } + + 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 + } + } + } + + EdgeSchemaPatchProperties 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(EdgeSchemaPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaPatchProperties(document.RootElement, options); + } + + internal static EdgeSchemaPatchProperties DeserializeEdgeSchemaPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaPatchProperties(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaPatchProperties 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 DeserializeEdgeSchemaPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatchProperties.cs new file mode 100644 index 000000000000..95f37331b3b2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaPatchProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the Schema. + public partial class EdgeSchemaPatchProperties + { + /// + /// 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 EdgeSchemaPatchProperties() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaPatchProperties(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaProperties.Serialization.cs new file mode 100644 index 000000000000..da0503ce87ed --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaProperties.Serialization.cs @@ -0,0 +1,144 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSchemaProperties : 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(EdgeSchemaProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(CurrentVersion)) + { + writer.WritePropertyName("currentVersion"u8); + writer.WriteStringValue(CurrentVersion); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSchemaProperties 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(EdgeSchemaProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaProperties(document.RootElement, options); + } + + internal static EdgeSchemaProperties DeserializeEdgeSchemaProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string currentVersion = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("currentVersion"u8)) + { + currentVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaProperties(currentVersion, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaProperties 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 DeserializeEdgeSchemaProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaProperties.cs new file mode 100644 index 000000000000..596a26375456 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Schema Properties. + public partial class EdgeSchemaProperties + { + /// + /// 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 EdgeSchemaProperties() + { + } + + /// Initializes a new instance of . + /// Current Version of schema. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaProperties(string currentVersion, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + CurrentVersion = currentVersion; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Current Version of schema. + public string CurrentVersion { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaReferenceProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaReferenceProperties.Serialization.cs new file mode 100644 index 000000000000..52f1a9be624c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaReferenceProperties.Serialization.cs @@ -0,0 +1,141 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSchemaReferenceProperties : 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(EdgeSchemaReferenceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("schemaId"u8); + writer.WriteStringValue(SchemaId); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSchemaReferenceProperties 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(EdgeSchemaReferenceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaReferenceProperties(document.RootElement, options); + } + + internal static EdgeSchemaReferenceProperties DeserializeEdgeSchemaReferenceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string schemaId = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("schemaId"u8)) + { + schemaId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaReferenceProperties(schemaId, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaReferenceProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaReferenceProperties 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 DeserializeEdgeSchemaReferenceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaReferenceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaReferenceProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaReferenceProperties.cs new file mode 100644 index 000000000000..548bb868d513 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaReferenceProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Schema Reference Properties. + public partial class EdgeSchemaReferenceProperties + { + /// + /// 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 . + /// Schema Id of schema reference. + /// is null. + internal EdgeSchemaReferenceProperties(string schemaId) + { + Argument.AssertNotNull(schemaId, nameof(schemaId)); + + SchemaId = schemaId; + } + + /// Initializes a new instance of . + /// Schema Id of schema reference. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaReferenceProperties(string schemaId, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SchemaId = schemaId; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSchemaReferenceProperties() + { + } + + /// Schema Id of schema reference. + public string SchemaId { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionProperties.Serialization.cs new file mode 100644 index 000000000000..48f5a600cba8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionProperties.Serialization.cs @@ -0,0 +1,141 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSchemaVersionProperties : 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(EdgeSchemaVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSchemaVersionProperties 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(EdgeSchemaVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaVersionProperties(document.RootElement, options); + } + + internal static EdgeSchemaVersionProperties DeserializeEdgeSchemaVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string value = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaVersionProperties(value, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaVersionProperties 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 DeserializeEdgeSchemaVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionProperties.cs new file mode 100644 index 000000000000..b0f70ee73590 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Schema Version Properties. + public partial class EdgeSchemaVersionProperties + { + /// + /// 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 . + /// Value of schema version. + /// is null. + public EdgeSchemaVersionProperties(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value; + } + + /// Initializes a new instance of . + /// Value of schema version. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaVersionProperties(string value, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Value = value; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSchemaVersionProperties() + { + } + + /// Value of schema version. + public string Value { get; set; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionWithUpdateType.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionWithUpdateType.Serialization.cs new file mode 100644 index 000000000000..f7485858b2f6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionWithUpdateType.Serialization.cs @@ -0,0 +1,152 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSchemaVersionWithUpdateType : 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(EdgeSchemaVersionWithUpdateType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UpdateType)) + { + writer.WritePropertyName("updateType"u8); + writer.WriteStringValue(UpdateType.Value.ToString()); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WritePropertyName("schemaVersion"u8); + writer.WriteObjectValue(SchemaVersion, 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 + } + } + } + + EdgeSchemaVersionWithUpdateType 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(EdgeSchemaVersionWithUpdateType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSchemaVersionWithUpdateType(document.RootElement, options); + } + + internal static EdgeSchemaVersionWithUpdateType DeserializeEdgeSchemaVersionWithUpdateType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeUpdateType? updateType = default; + string version = default; + EdgeSchemaVersionData schemaVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("updateType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateType = new EdgeUpdateType(property.Value.GetString()); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("schemaVersion"u8)) + { + schemaVersion = EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSchemaVersionWithUpdateType(updateType, version, schemaVersion, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSchemaVersionWithUpdateType)} does not support writing '{options.Format}' format."); + } + } + + EdgeSchemaVersionWithUpdateType 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 DeserializeEdgeSchemaVersionWithUpdateType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSchemaVersionWithUpdateType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionWithUpdateType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionWithUpdateType.cs new file mode 100644 index 000000000000..dd5eaf692372 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSchemaVersionWithUpdateType.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Schema Version With Update Type. + public partial class EdgeSchemaVersionWithUpdateType + { + /// + /// 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 . + /// Schema Version. + /// is null. + public EdgeSchemaVersionWithUpdateType(EdgeSchemaVersionData schemaVersion) + { + Argument.AssertNotNull(schemaVersion, nameof(schemaVersion)); + + SchemaVersion = schemaVersion; + } + + /// Initializes a new instance of . + /// Update type. + /// Version to create. + /// Schema Version. + /// Keeps track of any properties unknown to the library. + internal EdgeSchemaVersionWithUpdateType(EdgeUpdateType? updateType, string version, EdgeSchemaVersionData schemaVersion, IDictionary serializedAdditionalRawData) + { + UpdateType = updateType; + Version = version; + SchemaVersion = schemaVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSchemaVersionWithUpdateType() + { + } + + /// Update type. + public EdgeUpdateType? UpdateType { get; set; } + /// Version to create. + public string Version { get; set; } + /// Schema Version. + public EdgeSchemaVersionData SchemaVersion { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSiteReferenceProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSiteReferenceProperties.Serialization.cs new file mode 100644 index 000000000000..7ddd239b072f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSiteReferenceProperties.Serialization.cs @@ -0,0 +1,141 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSiteReferenceProperties : 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(EdgeSiteReferenceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("siteId"u8); + writer.WriteStringValue(SiteId); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSiteReferenceProperties 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(EdgeSiteReferenceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSiteReferenceProperties(document.RootElement, options); + } + + internal static EdgeSiteReferenceProperties DeserializeEdgeSiteReferenceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string siteId = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("siteId"u8)) + { + siteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSiteReferenceProperties(siteId, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSiteReferenceProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSiteReferenceProperties 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 DeserializeEdgeSiteReferenceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSiteReferenceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSiteReferenceProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSiteReferenceProperties.cs new file mode 100644 index 000000000000..feba0fda2dd6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSiteReferenceProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Site Reference Properties. + public partial class EdgeSiteReferenceProperties + { + /// + /// 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 . + /// Azure Resource ID for Site. + /// is null. + public EdgeSiteReferenceProperties(string siteId) + { + Argument.AssertNotNull(siteId, nameof(siteId)); + + SiteId = siteId; + } + + /// Initializes a new instance of . + /// Azure Resource ID for Site. + /// Provisioning State. + /// Keeps track of any properties unknown to the library. + internal EdgeSiteReferenceProperties(string siteId, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SiteId = siteId; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSiteReferenceProperties() + { + } + + /// Azure Resource ID for Site. + public string SiteId { get; set; } + /// Provisioning State. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependency.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependency.Serialization.cs new file mode 100644 index 000000000000..0759e3648c4d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependency.Serialization.cs @@ -0,0 +1,184 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionDependency : 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(EdgeSolutionDependency)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + if (Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + if (Optional.IsCollectionDefined(Dependencies)) + { + writer.WritePropertyName("dependencies"u8); + writer.WriteStartArray(); + foreach (var item in Dependencies) + { + 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 + } + } + } + + EdgeSolutionDependency 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(EdgeSolutionDependency)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionDependency(document.RootElement, options); + } + + internal static EdgeSolutionDependency DeserializeEdgeSolutionDependency(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + string solutionInstanceName = default; + ResourceIdentifier solutionTemplateVersionId = default; + ResourceIdentifier targetId = default; + IReadOnlyList dependencies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("dependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeEdgeSolutionDependency(item, options)); + } + dependencies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionDependency( + solutionVersionId, + solutionInstanceName, + solutionTemplateVersionId, + targetId, + dependencies ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionDependency)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionDependency 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 DeserializeEdgeSolutionDependency(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionDependency)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependency.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependency.cs new file mode 100644 index 000000000000..c16fdf1dd75d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependency.cs @@ -0,0 +1,99 @@ +// 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.WorkloadOrchestration.Models +{ + /// Solution Dependency Context. + public partial class EdgeSolutionDependency + { + /// + /// 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 . + /// Solution Version Id. + /// Solution Template Version Id. + /// Target Id. + /// , or is null. + internal EdgeSolutionDependency(ResourceIdentifier solutionVersionId, ResourceIdentifier solutionTemplateVersionId, ResourceIdentifier targetId) + { + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + + SolutionVersionId = solutionVersionId; + SolutionTemplateVersionId = solutionTemplateVersionId; + TargetId = targetId; + Dependencies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Solution Version Id. + /// Solution Instance Name. + /// Solution Template Version Id. + /// Target Id. + /// Solution dependencies. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionDependency(ResourceIdentifier solutionVersionId, string solutionInstanceName, ResourceIdentifier solutionTemplateVersionId, ResourceIdentifier targetId, IReadOnlyList dependencies, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + SolutionInstanceName = solutionInstanceName; + SolutionTemplateVersionId = solutionTemplateVersionId; + TargetId = targetId; + Dependencies = dependencies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionDependency() + { + } + + /// Solution Version Id. + public ResourceIdentifier SolutionVersionId { get; } + /// Solution Instance Name. + public string SolutionInstanceName { get; } + /// Solution Template Version Id. + public ResourceIdentifier SolutionTemplateVersionId { get; } + /// Target Id. + public ResourceIdentifier TargetId { get; } + /// Solution dependencies. + public IReadOnlyList Dependencies { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependencyContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependencyContent.Serialization.cs new file mode 100644 index 000000000000..76420487badd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependencyContent.Serialization.cs @@ -0,0 +1,217 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionDependencyContent : 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(EdgeSolutionDependencyContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SolutionVersionId)) + { + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + } + if (Optional.IsDefined(SolutionTemplateId)) + { + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + } + if (Optional.IsDefined(SolutionTemplateVersion)) + { + writer.WritePropertyName("solutionTemplateVersion"u8); + writer.WriteStringValue(SolutionTemplateVersion); + } + if (Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + if (Optional.IsDefined(TargetId)) + { + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + } + if (Optional.IsCollectionDefined(Dependencies)) + { + writer.WritePropertyName("dependencies"u8); + writer.WriteStartArray(); + foreach (var item in Dependencies) + { + 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 + } + } + } + + EdgeSolutionDependencyContent 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(EdgeSolutionDependencyContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionDependencyContent(document.RootElement, options); + } + + internal static EdgeSolutionDependencyContent DeserializeEdgeSolutionDependencyContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + ResourceIdentifier solutionTemplateId = default; + string solutionTemplateVersion = default; + string solutionInstanceName = default; + ResourceIdentifier targetId = default; + IList dependencies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + solutionTemplateId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionTemplateVersion"u8)) + { + solutionTemplateVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("dependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeEdgeSolutionDependencyContent(item, options)); + } + dependencies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionDependencyContent( + solutionVersionId, + solutionTemplateId, + solutionTemplateVersion, + solutionInstanceName, + targetId, + dependencies ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionDependencyContent)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionDependencyContent 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 DeserializeEdgeSolutionDependencyContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionDependencyContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependencyContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependencyContent.cs new file mode 100644 index 000000000000..687aaff454fd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionDependencyContent.cs @@ -0,0 +1,87 @@ +// 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.WorkloadOrchestration.Models +{ + /// Solution Dependency Context. + public partial class EdgeSolutionDependencyContent + { + /// + /// 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 EdgeSolutionDependencyContent() + { + Dependencies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Solution Version Id. + /// Solution Template Id. + /// Solution Template Version. + /// Solution Instance Name. + /// Target Id. + /// Solution dependencies. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionDependencyContent(ResourceIdentifier solutionVersionId, ResourceIdentifier solutionTemplateId, string solutionTemplateVersion, string solutionInstanceName, ResourceIdentifier targetId, IList dependencies, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersion = solutionTemplateVersion; + SolutionInstanceName = solutionInstanceName; + TargetId = targetId; + Dependencies = dependencies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Solution Version Id. + public ResourceIdentifier SolutionVersionId { get; set; } + /// Solution Template Id. + public ResourceIdentifier SolutionTemplateId { get; set; } + /// Solution Template Version. + public string SolutionTemplateVersion { get; set; } + /// Solution Instance Name. + public string SolutionInstanceName { get; set; } + /// Target Id. + public ResourceIdentifier TargetId { get; set; } + /// Solution dependencies. + public IList Dependencies { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatch.Serialization.cs new file mode 100644 index 000000000000..5c83d5c5958c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatch.Serialization.cs @@ -0,0 +1,133 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionPatch : 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(EdgeSolutionPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + EdgeSolutionPatch 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(EdgeSolutionPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionPatch(document.RootElement, options); + } + + internal static EdgeSolutionPatch DeserializeEdgeSolutionPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeSolutionPatchProperties properties = 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 = EdgeSolutionPatchProperties.DeserializeEdgeSolutionPatchProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionPatch(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionPatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionPatch 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 DeserializeEdgeSolutionPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatch.cs new file mode 100644 index 000000000000..9bb00e1dd85e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatch.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the Solution. + public partial class EdgeSolutionPatch + { + /// + /// 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 EdgeSolutionPatch() + { + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionPatch(EdgeSolutionPatchProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EdgeSolutionPatchProperties Properties { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatchProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatchProperties.Serialization.cs new file mode 100644 index 000000000000..6ec8dff9f801 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatchProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionPatchProperties : 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(EdgeSolutionPatchProperties)} does not support writing '{format}' format."); + } + + 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 + } + } + } + + EdgeSolutionPatchProperties 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(EdgeSolutionPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionPatchProperties(document.RootElement, options); + } + + internal static EdgeSolutionPatchProperties DeserializeEdgeSolutionPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionPatchProperties(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionPatchProperties 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 DeserializeEdgeSolutionPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatchProperties.cs new file mode 100644 index 000000000000..6c0d6584e5c1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionPatchProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the Solution. + public partial class EdgeSolutionPatchProperties + { + /// + /// 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 EdgeSolutionPatchProperties() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionPatchProperties(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionProperties.Serialization.cs new file mode 100644 index 000000000000..b336933c38b8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionProperties.Serialization.cs @@ -0,0 +1,169 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionProperties : 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(EdgeSolutionProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SolutionTemplateId)) + { + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AvailableSolutionTemplateVersions)) + { + writer.WritePropertyName("availableSolutionTemplateVersions"u8); + writer.WriteStartArray(); + foreach (var item in AvailableSolutionTemplateVersions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSolutionProperties 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(EdgeSolutionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionProperties(document.RootElement, options); + } + + internal static EdgeSolutionProperties DeserializeEdgeSolutionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string solutionTemplateId = default; + IReadOnlyList availableSolutionTemplateVersions = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("availableSolutionTemplateVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AvailableSolutionTemplateVersion.DeserializeAvailableSolutionTemplateVersion(item, options)); + } + availableSolutionTemplateVersions = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionProperties(solutionTemplateId, availableSolutionTemplateVersions ?? new ChangeTrackingList(), provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionProperties 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 DeserializeEdgeSolutionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionProperties.cs new file mode 100644 index 000000000000..190c50231d66 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Solution Properties. + public partial class EdgeSolutionProperties + { + /// + /// 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 EdgeSolutionProperties() + { + AvailableSolutionTemplateVersions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Solution template Id. + /// List of latest revisions for available solution template versions. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionProperties(string solutionTemplateId, IReadOnlyList availableSolutionTemplateVersions, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SolutionTemplateId = solutionTemplateId; + AvailableSolutionTemplateVersions = availableSolutionTemplateVersions; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Solution template Id. + public string SolutionTemplateId { get; } + /// List of latest revisions for available solution template versions. + public IReadOnlyList AvailableSolutionTemplateVersions { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateContent.Serialization.cs new file mode 100644 index 000000000000..4f6a1d1a49d6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateContent.Serialization.cs @@ -0,0 +1,162 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionTemplateContent : 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(EdgeSolutionTemplateContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + if (Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + if (Optional.IsCollectionDefined(SolutionDependencies)) + { + writer.WritePropertyName("solutionDependencies"u8); + writer.WriteStartArray(); + foreach (var item in SolutionDependencies) + { + 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 + } + } + } + + EdgeSolutionTemplateContent 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(EdgeSolutionTemplateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplateContent(document.RootElement, options); + } + + internal static EdgeSolutionTemplateContent DeserializeEdgeSolutionTemplateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionTemplateVersionId = default; + string solutionInstanceName = default; + IList solutionDependencies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeSolutionDependencyContent.DeserializeEdgeSolutionDependencyContent(item, options)); + } + solutionDependencies = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplateContent(solutionTemplateVersionId, solutionInstanceName, solutionDependencies ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateContent)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplateContent 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 DeserializeEdgeSolutionTemplateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateContent.cs new file mode 100644 index 000000000000..b8110b98e2ba --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateContent.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.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Solution Template Parameter. + public partial class EdgeSolutionTemplateContent + { + /// + /// 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 . + /// Solution Template Version ARM Id. + /// is null. + public EdgeSolutionTemplateContent(ResourceIdentifier solutionTemplateVersionId) + { + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionDependencies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Solution Template Version ARM Id. + /// Solution Instance Name. + /// Solution Dependencies. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplateContent(ResourceIdentifier solutionTemplateVersionId, string solutionInstanceName, IList solutionDependencies, IDictionary serializedAdditionalRawData) + { + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionInstanceName = solutionInstanceName; + SolutionDependencies = solutionDependencies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionTemplateContent() + { + } + + /// Solution Template Version ARM Id. + public ResourceIdentifier SolutionTemplateVersionId { get; } + /// Solution Instance Name. + public string SolutionInstanceName { get; set; } + /// Solution Dependencies. + public IList SolutionDependencies { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatch.Serialization.cs new file mode 100644 index 000000000000..9de0ae6452e5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionTemplatePatch : 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(EdgeSolutionTemplatePatch)} does not support writing '{format}' format."); + } + + 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 (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + EdgeSolutionTemplatePatch 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(EdgeSolutionTemplatePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplatePatch(document.RootElement, options); + } + + internal static EdgeSolutionTemplatePatch DeserializeEdgeSolutionTemplatePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + EdgeSolutionTemplatePatchProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = EdgeSolutionTemplatePatchProperties.DeserializeEdgeSolutionTemplatePatchProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplatePatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplatePatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplatePatch 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 DeserializeEdgeSolutionTemplatePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplatePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatch.cs new file mode 100644 index 000000000000..359a2c72031d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the SolutionTemplate. + public partial class EdgeSolutionTemplatePatch + { + /// + /// 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 EdgeSolutionTemplatePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplatePatch(IDictionary tags, EdgeSolutionTemplatePatchProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public EdgeSolutionTemplatePatchProperties Properties { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatchProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatchProperties.Serialization.cs new file mode 100644 index 000000000000..4d488964468a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatchProperties.Serialization.cs @@ -0,0 +1,184 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionTemplatePatchProperties : 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(EdgeSolutionTemplatePatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Capabilities)) + { + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(IsExternalValidationEnabled)) + { + writer.WritePropertyName("enableExternalValidation"u8); + writer.WriteBooleanValue(IsExternalValidationEnabled.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 + } + } + } + + EdgeSolutionTemplatePatchProperties 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(EdgeSolutionTemplatePatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplatePatchProperties(document.RootElement, options); + } + + internal static EdgeSolutionTemplatePatchProperties DeserializeEdgeSolutionTemplatePatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + IList capabilities = default; + EdgeResourceState? state = default; + bool? enableExternalValidation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("capabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + capabilities = array; + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new EdgeResourceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("enableExternalValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableExternalValidation = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplatePatchProperties(description, capabilities ?? new ChangeTrackingList(), state, enableExternalValidation, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplatePatchProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplatePatchProperties 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 DeserializeEdgeSolutionTemplatePatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplatePatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatchProperties.cs new file mode 100644 index 000000000000..4cad9935f6e5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplatePatchProperties.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The updatable properties of the SolutionTemplate. + public partial class EdgeSolutionTemplatePatchProperties + { + /// + /// 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 EdgeSolutionTemplatePatchProperties() + { + Capabilities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Description of Solution template. + /// List of capabilities. + /// State of resource. + /// Flag to enable external validation. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplatePatchProperties(string description, IList capabilities, EdgeResourceState? state, bool? isExternalValidationEnabled, IDictionary serializedAdditionalRawData) + { + Description = description; + Capabilities = capabilities; + State = state; + IsExternalValidationEnabled = isExternalValidationEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Description of Solution template. + public string Description { get; set; } + /// List of capabilities. + public IList Capabilities { get; } + /// State of resource. + public EdgeResourceState? State { get; set; } + /// Flag to enable external validation. + public bool? IsExternalValidationEnabled { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateProperties.Serialization.cs new file mode 100644 index 000000000000..ab97329eb0c6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateProperties.Serialization.cs @@ -0,0 +1,207 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionTemplateProperties : 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(EdgeSolutionTemplateProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(LatestVersion)) + { + writer.WritePropertyName("latestVersion"u8); + writer.WriteStringValue(LatestVersion); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(IsExternalValidationEnabled)) + { + writer.WritePropertyName("enableExternalValidation"u8); + writer.WriteBooleanValue(IsExternalValidationEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSolutionTemplateProperties 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(EdgeSolutionTemplateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplateProperties(document.RootElement, options); + } + + internal static EdgeSolutionTemplateProperties DeserializeEdgeSolutionTemplateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + IList capabilities = default; + string latestVersion = default; + EdgeResourceState? state = default; + bool? enableExternalValidation = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("capabilities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + capabilities = array; + continue; + } + if (property.NameEquals("latestVersion"u8)) + { + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new EdgeResourceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("enableExternalValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableExternalValidation = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplateProperties( + description, + capabilities, + latestVersion, + state, + enableExternalValidation, + provisioningState, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplateProperties 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 DeserializeEdgeSolutionTemplateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateProperties.cs new file mode 100644 index 000000000000..085388bd6924 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateProperties.cs @@ -0,0 +1,99 @@ +// 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.WorkloadOrchestration.Models +{ + /// Solution Template Properties. + public partial class EdgeSolutionTemplateProperties + { + /// + /// 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 . + /// Description of Solution template. + /// List of capabilities. + /// or is null. + public EdgeSolutionTemplateProperties(string description, IEnumerable capabilities) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(capabilities, nameof(capabilities)); + + Description = description; + Capabilities = capabilities.ToList(); + } + + /// Initializes a new instance of . + /// Description of Solution template. + /// List of capabilities. + /// Latest solution template version. + /// State of resource. + /// Flag to enable external validation. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplateProperties(string description, IList capabilities, string latestVersion, EdgeResourceState? state, bool? isExternalValidationEnabled, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Description = description; + Capabilities = capabilities; + LatestVersion = latestVersion; + State = state; + IsExternalValidationEnabled = isExternalValidationEnabled; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionTemplateProperties() + { + } + + /// Description of Solution template. + public string Description { get; set; } + /// List of capabilities. + public IList Capabilities { get; } + /// Latest solution template version. + public string LatestVersion { get; } + /// State of resource. + public EdgeResourceState? State { get; set; } + /// Flag to enable external validation. + public bool? IsExternalValidationEnabled { get; set; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionProperties.Serialization.cs new file mode 100644 index 000000000000..d62c9b27dcb6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionProperties.Serialization.cs @@ -0,0 +1,194 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionTemplateVersionProperties : 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(EdgeSolutionTemplateVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurations"u8); + writer.WriteStringValue(Configurations); + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + if (Optional.IsDefined(OrchestratorType)) + { + writer.WritePropertyName("orchestratorType"u8); + writer.WriteStringValue(OrchestratorType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSolutionTemplateVersionProperties 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(EdgeSolutionTemplateVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplateVersionProperties(document.RootElement, options); + } + + internal static EdgeSolutionTemplateVersionProperties DeserializeEdgeSolutionTemplateVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string configurations = default; + IDictionary specification = default; + SolutionVersionOrchestratorType? orchestratorType = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurations"u8)) + { + configurations = property.Value.GetString(); + continue; + } + if (property.NameEquals("specification"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (property.NameEquals("orchestratorType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orchestratorType = new SolutionVersionOrchestratorType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplateVersionProperties(configurations, specification, orchestratorType, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplateVersionProperties 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 DeserializeEdgeSolutionTemplateVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionProperties.cs new file mode 100644 index 000000000000..9266f1e2d3b1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionProperties.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Solution Template Version Properties. + public partial class EdgeSolutionTemplateVersionProperties + { + /// + /// 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 . + /// Config expressions for this solution version. + /// App components spec. + /// or is null. + public EdgeSolutionTemplateVersionProperties(string configurations, IDictionary specification) + { + Argument.AssertNotNull(configurations, nameof(configurations)); + Argument.AssertNotNull(specification, nameof(specification)); + + Configurations = configurations; + Specification = specification; + } + + /// Initializes a new instance of . + /// Config expressions for this solution version. + /// App components spec. + /// Orchestrator type. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplateVersionProperties(string configurations, IDictionary specification, SolutionVersionOrchestratorType? orchestratorType, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Configurations = configurations; + Specification = specification; + OrchestratorType = orchestratorType; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionTemplateVersionProperties() + { + } + + /// Config expressions for this solution version. + public string Configurations { get; set; } + /// + /// App components spec + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary Specification { get; } + /// Orchestrator type. + public SolutionVersionOrchestratorType? OrchestratorType { get; set; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionWithUpdateType.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionWithUpdateType.Serialization.cs new file mode 100644 index 000000000000..c49d0b7c5568 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionWithUpdateType.Serialization.cs @@ -0,0 +1,152 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionTemplateVersionWithUpdateType : 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(EdgeSolutionTemplateVersionWithUpdateType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UpdateType)) + { + writer.WritePropertyName("updateType"u8); + writer.WriteStringValue(UpdateType.Value.ToString()); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WritePropertyName("solutionTemplateVersion"u8); + writer.WriteObjectValue(SolutionTemplateVersion, 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 + } + } + } + + EdgeSolutionTemplateVersionWithUpdateType 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(EdgeSolutionTemplateVersionWithUpdateType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionTemplateVersionWithUpdateType(document.RootElement, options); + } + + internal static EdgeSolutionTemplateVersionWithUpdateType DeserializeEdgeSolutionTemplateVersionWithUpdateType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeUpdateType? updateType = default; + string version = default; + EdgeSolutionTemplateVersionData solutionTemplateVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("updateType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateType = new EdgeUpdateType(property.Value.GetString()); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersion"u8)) + { + solutionTemplateVersion = EdgeSolutionTemplateVersionData.DeserializeEdgeSolutionTemplateVersionData(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionTemplateVersionWithUpdateType(updateType, version, solutionTemplateVersion, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateVersionWithUpdateType)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionTemplateVersionWithUpdateType 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 DeserializeEdgeSolutionTemplateVersionWithUpdateType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionTemplateVersionWithUpdateType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionWithUpdateType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionWithUpdateType.cs new file mode 100644 index 000000000000..a15f5f66ea4c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionTemplateVersionWithUpdateType.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Solution Template Version With Update Type. + public partial class EdgeSolutionTemplateVersionWithUpdateType + { + /// + /// 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 . + /// Solution Template Version. + /// is null. + public EdgeSolutionTemplateVersionWithUpdateType(EdgeSolutionTemplateVersionData solutionTemplateVersion) + { + Argument.AssertNotNull(solutionTemplateVersion, nameof(solutionTemplateVersion)); + + SolutionTemplateVersion = solutionTemplateVersion; + } + + /// Initializes a new instance of . + /// Update type. + /// Version to create. + /// Solution Template Version. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionTemplateVersionWithUpdateType(EdgeUpdateType? updateType, string version, EdgeSolutionTemplateVersionData solutionTemplateVersion, IDictionary serializedAdditionalRawData) + { + UpdateType = updateType; + Version = version; + SolutionTemplateVersion = solutionTemplateVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionTemplateVersionWithUpdateType() + { + } + + /// Update type. + public EdgeUpdateType? UpdateType { get; set; } + /// Version to create. + public string Version { get; set; } + /// Solution Template Version. + public EdgeSolutionTemplateVersionData SolutionTemplateVersion { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionContent.Serialization.cs new file mode 100644 index 000000000000..33a6659564c4 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionContent.Serialization.cs @@ -0,0 +1,126 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionVersionContent : 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(EdgeSolutionVersionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + 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 + } + } + } + + EdgeSolutionVersionContent 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(EdgeSolutionVersionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionContent(document.RootElement, options); + } + + internal static EdgeSolutionVersionContent DeserializeEdgeSolutionVersionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionContent(solutionVersionId, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionContent)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionContent 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 DeserializeEdgeSolutionVersionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionContent.cs new file mode 100644 index 000000000000..1eee34ea9364 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionContent.cs @@ -0,0 +1,76 @@ +// 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.WorkloadOrchestration.Models +{ + /// Solution Version Parameter. + public partial class EdgeSolutionVersionContent + { + /// + /// 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 . + /// Solution Version ARM Id. + /// is null. + public EdgeSolutionVersionContent(ResourceIdentifier solutionVersionId) + { + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + + SolutionVersionId = solutionVersionId; + } + + /// Initializes a new instance of . + /// Solution Version ARM Id. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionContent(ResourceIdentifier solutionVersionId, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionVersionContent() + { + } + + /// Solution Version ARM Id. + public ResourceIdentifier SolutionVersionId { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionProperties.Serialization.cs new file mode 100644 index 000000000000..7da5611ca600 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionProperties.Serialization.cs @@ -0,0 +1,361 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeSolutionVersionProperties : 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(EdgeSolutionVersionProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SolutionTemplateVersionId)) + { + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + } + if (options.Format != "W" && Optional.IsDefined(Revision)) + { + writer.WritePropertyName("revision"u8); + writer.WriteNumberValue(Revision.Value); + } + if (options.Format != "W" && Optional.IsDefined(TargetDisplayName)) + { + writer.WritePropertyName("targetDisplayName"u8); + writer.WriteStringValue(TargetDisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteStringValue(Configuration); + } + if (options.Format != "W" && Optional.IsDefined(TargetLevelConfiguration)) + { + writer.WritePropertyName("targetLevelConfiguration"u8); + writer.WriteStringValue(TargetLevelConfiguration); + } + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + if (options.Format != "W" && Optional.IsDefined(ReviewId)) + { + writer.WritePropertyName("reviewId"u8); + writer.WriteStringValue(ReviewId); + } + if (options.Format != "W" && Optional.IsDefined(ExternalValidationId)) + { + writer.WritePropertyName("externalValidationId"u8); + writer.WriteStringValue(ExternalValidationId); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SolutionDependencies)) + { + writer.WritePropertyName("solutionDependencies"u8); + writer.WriteStartArray(); + foreach (var item in SolutionDependencies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, options); + } + if (options.Format != "W" && Optional.IsDefined(LatestActionTrackingUri)) + { + writer.WritePropertyName("latestActionTrackingUri"u8); + writer.WriteStringValue(LatestActionTrackingUri); + } + if (options.Format != "W" && Optional.IsDefined(ActionType)) + { + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeSolutionVersionProperties 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(EdgeSolutionVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionProperties(document.RootElement, options); + } + + internal static EdgeSolutionVersionProperties DeserializeEdgeSolutionVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string solutionTemplateVersionId = default; + int? revision = default; + string targetDisplayName = default; + string configuration = default; + string targetLevelConfiguration = default; + IDictionary specification = default; + string reviewId = default; + string externalValidationId = default; + SolutionInstanceState? state = default; + string solutionInstanceName = default; + IReadOnlyList solutionDependencies = default; + ResponseError errorDetails = default; + string latestActionTrackingUri = default; + EdgeJobType? actionType = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("revision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + revision = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetDisplayName"u8)) + { + targetDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("configuration"u8)) + { + configuration = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetLevelConfiguration"u8)) + { + targetLevelConfiguration = property.Value.GetString(); + continue; + } + if (property.NameEquals("specification"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (property.NameEquals("reviewId"u8)) + { + reviewId = property.Value.GetString(); + continue; + } + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new SolutionInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeSolutionDependency.DeserializeEdgeSolutionDependency(item, options)); + } + solutionDependencies = array; + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("latestActionTrackingUri"u8)) + { + latestActionTrackingUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("actionType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionType = new EdgeJobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionProperties( + solutionTemplateVersionId, + revision, + targetDisplayName, + configuration, + targetLevelConfiguration, + specification, + reviewId, + externalValidationId, + state, + solutionInstanceName, + solutionDependencies ?? new ChangeTrackingList(), + errorDetails, + latestActionTrackingUri, + actionType, + provisioningState, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionProperties 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 DeserializeEdgeSolutionVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionProperties.cs new file mode 100644 index 000000000000..6657ee283fa7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeSolutionVersionProperties.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Solution Version Properties. + public partial class EdgeSolutionVersionProperties + { + /// + /// 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 . + /// App components spec. + /// is null. + public EdgeSolutionVersionProperties(IDictionary specification) + { + Argument.AssertNotNull(specification, nameof(specification)); + + Specification = specification; + SolutionDependencies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Solution Template Version Id. + /// Revision number of resolved config for this solution version. + /// Name of applicable target's display name. + /// Resolved configuration values. + /// Configuration on the line level across all solution template versions. + /// App components spec. + /// Review id of resolved config for this solution version. + /// External validation id. + /// State of solution instance. + /// Solution instance name. + /// Solution Dependency Context. + /// Error Details if any failure is there. + /// The URI for tracking the latest action performed on this solution version. + /// The type of the latest action performed on this solution version. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionProperties(string solutionTemplateVersionId, int? revision, string targetDisplayName, string configuration, string targetLevelConfiguration, IDictionary specification, string reviewId, string externalValidationId, SolutionInstanceState? state, string solutionInstanceName, IReadOnlyList solutionDependencies, ResponseError errorDetails, string latestActionTrackingUri, EdgeJobType? actionType, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SolutionTemplateVersionId = solutionTemplateVersionId; + Revision = revision; + TargetDisplayName = targetDisplayName; + Configuration = configuration; + TargetLevelConfiguration = targetLevelConfiguration; + Specification = specification; + ReviewId = reviewId; + ExternalValidationId = externalValidationId; + State = state; + SolutionInstanceName = solutionInstanceName; + SolutionDependencies = solutionDependencies; + ErrorDetails = errorDetails; + LatestActionTrackingUri = latestActionTrackingUri; + ActionType = actionType; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionVersionProperties() + { + } + + /// Solution Template Version Id. + public string SolutionTemplateVersionId { get; } + /// Revision number of resolved config for this solution version. + public int? Revision { get; } + /// Name of applicable target's display name. + public string TargetDisplayName { get; } + /// Resolved configuration values. + public string Configuration { get; } + /// Configuration on the line level across all solution template versions. + public string TargetLevelConfiguration { get; } + /// + /// App components spec + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary Specification { get; } + /// Review id of resolved config for this solution version. + public string ReviewId { get; } + /// External validation id. + public string ExternalValidationId { get; } + /// State of solution instance. + public SolutionInstanceState? State { get; } + /// Solution instance name. + public string SolutionInstanceName { get; } + /// Solution Dependency Context. + public IReadOnlyList SolutionDependencies { get; } + /// Error Details if any failure is there. + public ResponseError ErrorDetails { get; } + /// The URI for tracking the latest action performed on this solution version. + public string LatestActionTrackingUri { get; } + /// The type of the latest action performed on this solution version. + public EdgeJobType? ActionType { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatch.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatch.Serialization.cs new file mode 100644 index 000000000000..77dd8ec40433 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatch.Serialization.cs @@ -0,0 +1,159 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeTargetPatch : 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(EdgeTargetPatch)} does not support writing '{format}' format."); + } + + 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 (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + EdgeTargetPatch 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(EdgeTargetPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeTargetPatch(document.RootElement, options); + } + + internal static EdgeTargetPatch DeserializeEdgeTargetPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + EdgeTargetPatchProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = EdgeTargetPatchProperties.DeserializeEdgeTargetPatchProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeTargetPatch(tags ?? new ChangeTrackingDictionary(), 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeTargetPatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeTargetPatch 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 DeserializeEdgeTargetPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeTargetPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatch.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatch.cs new file mode 100644 index 000000000000..1563366c8d1a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// The type used for update operations of the Target. + public partial class EdgeTargetPatch + { + /// + /// 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 EdgeTargetPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EdgeTargetPatch(IDictionary tags, EdgeTargetPatchProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public EdgeTargetPatchProperties Properties { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatchProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatchProperties.Serialization.cs new file mode 100644 index 000000000000..3de98da7f5dd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatchProperties.Serialization.cs @@ -0,0 +1,271 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeTargetPatchProperties : 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(EdgeTargetPatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(ContextId)) + { + writer.WritePropertyName("contextId"u8); + writer.WriteStringValue(ContextId); + } + if (Optional.IsCollectionDefined(TargetSpecification)) + { + writer.WritePropertyName("targetSpecification"u8); + writer.WriteStartObject(); + foreach (var item in TargetSpecification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Capabilities)) + { + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(HierarchyLevel)) + { + writer.WritePropertyName("hierarchyLevel"u8); + writer.WriteStringValue(HierarchyLevel); + } + if (Optional.IsDefined(SolutionScope)) + { + writer.WritePropertyName("solutionScope"u8); + writer.WriteStringValue(SolutionScope); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.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 + } + } + } + + EdgeTargetPatchProperties 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(EdgeTargetPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeTargetPatchProperties(document.RootElement, options); + } + + internal static EdgeTargetPatchProperties DeserializeEdgeTargetPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + string displayName = default; + ResourceIdentifier contextId = default; + IDictionary targetSpecification = default; + IList capabilities = default; + string hierarchyLevel = default; + string solutionScope = default; + EdgeResourceState? state = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("contextId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contextId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetSpecification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + targetSpecification = dictionary; + continue; + } + if (property.NameEquals("capabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + capabilities = array; + continue; + } + if (property.NameEquals("hierarchyLevel"u8)) + { + hierarchyLevel = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionScope"u8)) + { + solutionScope = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new EdgeResourceState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeTargetPatchProperties( + description, + displayName, + contextId, + targetSpecification ?? new ChangeTrackingDictionary(), + capabilities ?? new ChangeTrackingList(), + hierarchyLevel, + solutionScope, + state, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeTargetPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeTargetPatchProperties 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 DeserializeEdgeTargetPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeTargetPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatchProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatchProperties.cs new file mode 100644 index 000000000000..23020351367d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetPatchProperties.cs @@ -0,0 +1,125 @@ +// 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.WorkloadOrchestration.Models +{ + /// The updatable properties of the Target. + public partial class EdgeTargetPatchProperties + { + /// + /// 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 EdgeTargetPatchProperties() + { + TargetSpecification = new ChangeTrackingDictionary(); + Capabilities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Description of target. + /// Display name of target. + /// ArmId of Context. + /// target spec. + /// List of capabilities. + /// Hierarchy Level. + /// Scope of the target resource. + /// State of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeTargetPatchProperties(string description, string displayName, ResourceIdentifier contextId, IDictionary targetSpecification, IList capabilities, string hierarchyLevel, string solutionScope, EdgeResourceState? state, IDictionary serializedAdditionalRawData) + { + Description = description; + DisplayName = displayName; + ContextId = contextId; + TargetSpecification = targetSpecification; + Capabilities = capabilities; + HierarchyLevel = hierarchyLevel; + SolutionScope = solutionScope; + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Description of target. + public string Description { get; set; } + /// Display name of target. + public string DisplayName { get; set; } + /// ArmId of Context. + public ResourceIdentifier ContextId { get; set; } + /// + /// target spec + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary TargetSpecification { get; } + /// List of capabilities. + public IList Capabilities { get; } + /// Hierarchy Level. + public string HierarchyLevel { get; set; } + /// Scope of the target resource. + public string SolutionScope { get; set; } + /// State of resource. + public EdgeResourceState? State { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetProperties.Serialization.cs new file mode 100644 index 000000000000..b565a982b009 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetProperties.Serialization.cs @@ -0,0 +1,273 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeTargetProperties : 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(EdgeTargetProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("contextId"u8); + writer.WriteStringValue(ContextId); + writer.WritePropertyName("targetSpecification"u8); + writer.WriteStartObject(); + foreach (var item in TargetSpecification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("hierarchyLevel"u8); + writer.WriteStringValue(HierarchyLevel); + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } + if (Optional.IsDefined(SolutionScope)) + { + writer.WritePropertyName("solutionScope"u8); + writer.WriteStringValue(SolutionScope); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeTargetProperties 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(EdgeTargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeTargetProperties(document.RootElement, options); + } + + internal static EdgeTargetProperties DeserializeEdgeTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + string displayName = default; + ResourceIdentifier contextId = default; + IDictionary targetSpecification = default; + IList capabilities = default; + string hierarchyLevel = default; + EdgeDeploymentStatus status = default; + string solutionScope = default; + EdgeResourceState? state = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("contextId"u8)) + { + contextId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetSpecification"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + targetSpecification = dictionary; + continue; + } + if (property.NameEquals("capabilities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + capabilities = array; + continue; + } + if (property.NameEquals("hierarchyLevel"u8)) + { + hierarchyLevel = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = EdgeDeploymentStatus.DeserializeEdgeDeploymentStatus(property.Value, options); + continue; + } + if (property.NameEquals("solutionScope"u8)) + { + solutionScope = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new EdgeResourceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeTargetProperties( + description, + displayName, + contextId, + targetSpecification, + capabilities, + hierarchyLevel, + status, + solutionScope, + state, + provisioningState, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeTargetProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeTargetProperties 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 DeserializeEdgeTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeTargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetProperties.cs new file mode 100644 index 000000000000..2e6938214259 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetProperties.cs @@ -0,0 +1,157 @@ +// 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.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Target Properties. + public partial class EdgeTargetProperties + { + /// + /// 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 . + /// Description of target. + /// Display name of target. + /// ArmId of Context. + /// target spec. + /// List of capabilities. + /// Hierarchy Level. + /// , , , , or is null. + public EdgeTargetProperties(string description, string displayName, ResourceIdentifier contextId, IDictionary targetSpecification, IEnumerable capabilities, string hierarchyLevel) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(contextId, nameof(contextId)); + Argument.AssertNotNull(targetSpecification, nameof(targetSpecification)); + Argument.AssertNotNull(capabilities, nameof(capabilities)); + Argument.AssertNotNull(hierarchyLevel, nameof(hierarchyLevel)); + + Description = description; + DisplayName = displayName; + ContextId = contextId; + TargetSpecification = targetSpecification; + Capabilities = capabilities.ToList(); + HierarchyLevel = hierarchyLevel; + } + + /// Initializes a new instance of . + /// Description of target. + /// Display name of target. + /// ArmId of Context. + /// target spec. + /// List of capabilities. + /// Hierarchy Level. + /// Status of target. + /// Scope of the target resource. + /// State of resource. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeTargetProperties(string description, string displayName, ResourceIdentifier contextId, IDictionary targetSpecification, IList capabilities, string hierarchyLevel, EdgeDeploymentStatus status, string solutionScope, EdgeResourceState? state, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Description = description; + DisplayName = displayName; + ContextId = contextId; + TargetSpecification = targetSpecification; + Capabilities = capabilities; + HierarchyLevel = hierarchyLevel; + Status = status; + SolutionScope = solutionScope; + State = state; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeTargetProperties() + { + } + + /// Description of target. + public string Description { get; set; } + /// Display name of target. + public string DisplayName { get; set; } + /// ArmId of Context. + public ResourceIdentifier ContextId { get; set; } + /// + /// target spec + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary TargetSpecification { get; } + /// List of capabilities. + public IList Capabilities { get; } + /// Hierarchy Level. + public string HierarchyLevel { get; set; } + /// Status of target. + public EdgeDeploymentStatus Status { get; } + /// Scope of the target resource. + public string SolutionScope { get; set; } + /// State of resource. + public EdgeResourceState? State { get; set; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetSnapshot.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetSnapshot.Serialization.cs new file mode 100644 index 000000000000..a2aa03388b14 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetSnapshot.Serialization.cs @@ -0,0 +1,189 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeTargetSnapshot : 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(EdgeTargetSnapshot)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TargetId)) + { + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + } + if (Optional.IsCollectionDefined(TargetSpecification)) + { + writer.WritePropertyName("targetSpecification"u8); + writer.WriteStartObject(); + foreach (var item in TargetSpecification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(SolutionScope)) + { + writer.WritePropertyName("solutionScope"u8); + writer.WriteStringValue(SolutionScope); + } + 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 + } + } + } + + EdgeTargetSnapshot 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(EdgeTargetSnapshot)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeTargetSnapshot(document.RootElement, options); + } + + internal static EdgeTargetSnapshot DeserializeEdgeTargetSnapshot(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier targetId = default; + IReadOnlyDictionary targetSpecification = default; + string solutionScope = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetSpecification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + targetSpecification = dictionary; + continue; + } + if (property.NameEquals("solutionScope"u8)) + { + solutionScope = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeTargetSnapshot(targetId, targetSpecification ?? new ChangeTrackingDictionary(), solutionScope, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeTargetSnapshot)} does not support writing '{options.Format}' format."); + } + } + + EdgeTargetSnapshot 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 DeserializeEdgeTargetSnapshot(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeTargetSnapshot)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetSnapshot.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetSnapshot.cs new file mode 100644 index 000000000000..27b72f316f49 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetSnapshot.cs @@ -0,0 +1,104 @@ +// 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.WorkloadOrchestration.Models +{ + /// Target Snapshot. + public partial class EdgeTargetSnapshot + { + /// + /// 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 . + internal EdgeTargetSnapshot() + { + TargetSpecification = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Target of instance. + /// target spec. + /// Scope of the target resource. + /// Keeps track of any properties unknown to the library. + internal EdgeTargetSnapshot(ResourceIdentifier targetId, IReadOnlyDictionary targetSpecification, string solutionScope, IDictionary serializedAdditionalRawData) + { + TargetId = targetId; + TargetSpecification = targetSpecification; + SolutionScope = solutionScope; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Target of instance. + public ResourceIdentifier TargetId { get; } + /// + /// target spec + /// + /// 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" }. + /// + /// + /// + /// + public IReadOnlyDictionary TargetSpecification { get; } + /// Scope of the target resource. + public string SolutionScope { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetStatus.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetStatus.Serialization.cs new file mode 100644 index 000000000000..89f01d72e0bf --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetStatus.Serialization.cs @@ -0,0 +1,165 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeTargetStatus : 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(EdgeTargetStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (Optional.IsCollectionDefined(ComponentStatuses)) + { + writer.WritePropertyName("componentStatuses"u8); + writer.WriteStartArray(); + foreach (var item in ComponentStatuses) + { + 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 + } + } + } + + EdgeTargetStatus 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(EdgeTargetStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeTargetStatus(document.RootElement, options); + } + + internal static EdgeTargetStatus DeserializeEdgeTargetStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string status = default; + IReadOnlyList componentStatuses = 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("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("componentStatuses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TargetComponentStatus.DeserializeTargetComponentStatus(item, options)); + } + componentStatuses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeTargetStatus(name, status, componentStatuses ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeTargetStatus)} does not support writing '{options.Format}' format."); + } + } + + EdgeTargetStatus 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 DeserializeEdgeTargetStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeTargetStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetStatus.cs new file mode 100644 index 000000000000..ecbc37721d44 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeTargetStatus.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Target Status. + public partial class EdgeTargetStatus + { + /// + /// 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 . + internal EdgeTargetStatus() + { + ComponentStatuses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Target name. + /// Target status. + /// Component statuses. + /// Keeps track of any properties unknown to the library. + internal EdgeTargetStatus(string name, string status, IReadOnlyList componentStatuses, IDictionary serializedAdditionalRawData) + { + Name = name; + Status = status; + ComponentStatuses = componentStatuses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Target name. + public string Name { get; } + /// Target status. + public string Status { get; } + /// Component statuses. + public IReadOnlyList ComponentStatuses { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeUpdateType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeUpdateType.cs new file mode 100644 index 000000000000..1dcf916338fd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeUpdateType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Denotes which part of the version number will be updated. + public readonly partial struct EdgeUpdateType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeUpdateType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MajorValue = "Major"; + private const string MinorValue = "Minor"; + private const string PatchValue = "Patch"; + + /// Major version. + public static EdgeUpdateType Major { get; } = new EdgeUpdateType(MajorValue); + /// Minor version. + public static EdgeUpdateType Minor { get; } = new EdgeUpdateType(MinorValue); + /// Patch version. + public static EdgeUpdateType Patch { get; } = new EdgeUpdateType(PatchValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeUpdateType left, EdgeUpdateType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeUpdateType left, EdgeUpdateType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeUpdateType(string value) => new EdgeUpdateType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeUpdateType other && Equals(other); + /// + public bool Equals(EdgeUpdateType 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeVersionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeVersionContent.Serialization.cs new file mode 100644 index 000000000000..e2fd99d2eb04 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeVersionContent.Serialization.cs @@ -0,0 +1,126 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeVersionContent : 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(EdgeVersionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + 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 + } + } + } + + EdgeVersionContent 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(EdgeVersionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeVersionContent(document.RootElement, options); + } + + internal static EdgeVersionContent DeserializeEdgeVersionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeVersionContent(version, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeVersionContent)} does not support writing '{options.Format}' format."); + } + } + + EdgeVersionContent 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 DeserializeEdgeVersionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeVersionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeVersionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeVersionContent.cs new file mode 100644 index 000000000000..bf098065e0bc --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeVersionContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Version Parameter. + public partial class EdgeVersionContent + { + /// + /// 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 . + /// Version of the Resource. + /// is null. + public EdgeVersionContent(string version) + { + Argument.AssertNotNull(version, nameof(version)); + + Version = version; + } + + /// Initializes a new instance of . + /// Version of the Resource. + /// Keeps track of any properties unknown to the library. + internal EdgeVersionContent(string version, IDictionary serializedAdditionalRawData) + { + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeVersionContent() + { + } + + /// Version of the Resource. + public string Version { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowProperties.Serialization.cs new file mode 100644 index 000000000000..c0f9789bd951 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowProperties.Serialization.cs @@ -0,0 +1,144 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeWorkflowProperties : 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(EdgeWorkflowProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(WorkflowTemplateId)) + { + writer.WritePropertyName("workflowTemplateId"u8); + writer.WriteStringValue(WorkflowTemplateId); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeWorkflowProperties 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(EdgeWorkflowProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowProperties(document.RootElement, options); + } + + internal static EdgeWorkflowProperties DeserializeEdgeWorkflowProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string workflowTemplateId = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workflowTemplateId"u8)) + { + workflowTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowProperties(workflowTemplateId, provisioningState, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowProperties 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 DeserializeEdgeWorkflowProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowProperties.cs new file mode 100644 index 000000000000..a3132da39bf6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Workflow Properties. + public partial class EdgeWorkflowProperties + { + /// + /// 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 EdgeWorkflowProperties() + { + } + + /// Initializes a new instance of . + /// Workflow template Id. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowProperties(string workflowTemplateId, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + WorkflowTemplateId = workflowTemplateId; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Workflow template Id. + public string WorkflowTemplateId { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowStageSpec.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowStageSpec.Serialization.cs new file mode 100644 index 000000000000..8427a5439ce8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowStageSpec.Serialization.cs @@ -0,0 +1,211 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeWorkflowStageSpec : 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(EdgeWorkflowStageSpec)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsCollectionDefined(Specification)) + { + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Tasks)) + { + writer.WritePropertyName("tasks"u8); + writer.WriteStartArray(); + foreach (var item in Tasks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TaskOption)) + { + writer.WritePropertyName("taskOption"u8); + writer.WriteObjectValue(TaskOption, 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 + } + } + } + + EdgeWorkflowStageSpec 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(EdgeWorkflowStageSpec)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowStageSpec(document.RootElement, options); + } + + internal static EdgeWorkflowStageSpec DeserializeEdgeWorkflowStageSpec(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary specification = default; + IList tasks = default; + EdgeWorkflowTaskConfig taskOption = 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("specification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (property.NameEquals("tasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeWorkflowTaskSpec.DeserializeEdgeWorkflowTaskSpec(item, options)); + } + tasks = array; + continue; + } + if (property.NameEquals("taskOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskOption = EdgeWorkflowTaskConfig.DeserializeEdgeWorkflowTaskConfig(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowStageSpec(name, specification ?? new ChangeTrackingDictionary(), tasks ?? new ChangeTrackingList(), taskOption, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowStageSpec)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowStageSpec 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 DeserializeEdgeWorkflowStageSpec(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowStageSpec)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowStageSpec.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowStageSpec.cs new file mode 100644 index 000000000000..4312077b0a69 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowStageSpec.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Stage Properties. + public partial class EdgeWorkflowStageSpec + { + /// + /// 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 . + /// Name of Stage. + /// is null. + public EdgeWorkflowStageSpec(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Specification = new ChangeTrackingDictionary(); + Tasks = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of Stage. + /// Stage specification. + /// List of tasks in the stage. + /// Task option for the stage. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowStageSpec(string name, IDictionary specification, IList tasks, EdgeWorkflowTaskConfig taskOption, IDictionary serializedAdditionalRawData) + { + Name = name; + Specification = specification; + Tasks = tasks; + TaskOption = taskOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeWorkflowStageSpec() + { + } + + /// Name of Stage. + public string Name { get; set; } + /// + /// Stage specification + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary Specification { get; } + /// List of tasks in the stage. + public IList Tasks { get; } + /// Task option for the stage. + public EdgeWorkflowTaskConfig TaskOption { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskConfig.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskConfig.Serialization.cs new file mode 100644 index 000000000000..944a5fa4a5ce --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskConfig.Serialization.cs @@ -0,0 +1,148 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeWorkflowTaskConfig : 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(EdgeWorkflowTaskConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Concurrency)) + { + writer.WritePropertyName("concurrency"u8); + writer.WriteNumberValue(Concurrency.Value); + } + if (Optional.IsDefined(ErrorAction)) + { + writer.WritePropertyName("errorAction"u8); + writer.WriteObjectValue(ErrorAction, 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 + } + } + } + + EdgeWorkflowTaskConfig 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(EdgeWorkflowTaskConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowTaskConfig(document.RootElement, options); + } + + internal static EdgeWorkflowTaskConfig DeserializeEdgeWorkflowTaskConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? concurrency = default; + TaskErrorAction errorAction = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("concurrency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + concurrency = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("errorAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorAction = TaskErrorAction.DeserializeTaskErrorAction(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowTaskConfig(concurrency, errorAction, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowTaskConfig)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowTaskConfig 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 DeserializeEdgeWorkflowTaskConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowTaskConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskConfig.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskConfig.cs new file mode 100644 index 000000000000..d35ff4ee3096 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskConfig.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Task Option Properties. + public partial class EdgeWorkflowTaskConfig + { + /// + /// 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 EdgeWorkflowTaskConfig() + { + } + + /// Initializes a new instance of . + /// Parallel worker numbers of the tasks. + /// Error action for the tasks. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowTaskConfig(int? concurrency, TaskErrorAction errorAction, IDictionary serializedAdditionalRawData) + { + Concurrency = concurrency; + ErrorAction = errorAction; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Parallel worker numbers of the tasks. + public int? Concurrency { get; set; } + /// Error action for the tasks. + public TaskErrorAction ErrorAction { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskSpec.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskSpec.Serialization.cs new file mode 100644 index 000000000000..3a6158da610c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskSpec.Serialization.cs @@ -0,0 +1,179 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeWorkflowTaskSpec : 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(EdgeWorkflowTaskSpec)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(TargetId)) + { + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + } + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + 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 + } + } + } + + EdgeWorkflowTaskSpec 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(EdgeWorkflowTaskSpec)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowTaskSpec(document.RootElement, options); + } + + internal static EdgeWorkflowTaskSpec DeserializeEdgeWorkflowTaskSpec(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceIdentifier targetId = default; + IDictionary specification = 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("targetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("specification"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowTaskSpec(name, targetId, specification, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowTaskSpec)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowTaskSpec 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 DeserializeEdgeWorkflowTaskSpec(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowTaskSpec)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskSpec.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskSpec.cs new file mode 100644 index 000000000000..92b96be0735e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowTaskSpec.cs @@ -0,0 +1,116 @@ +// 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.WorkloadOrchestration.Models +{ + /// Task Spec. + public partial class EdgeWorkflowTaskSpec + { + /// + /// 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 . + /// Name of Task. + /// Task specification. + /// or is null. + public EdgeWorkflowTaskSpec(string name, IDictionary specification) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(specification, nameof(specification)); + + Name = name; + Specification = specification; + } + + /// Initializes a new instance of . + /// Name of Task. + /// Target ARM id. + /// Task specification. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowTaskSpec(string name, ResourceIdentifier targetId, IDictionary specification, IDictionary serializedAdditionalRawData) + { + Name = name; + TargetId = targetId; + Specification = specification; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeWorkflowTaskSpec() + { + } + + /// Name of Task. + public string Name { get; set; } + /// Target ARM id. + public ResourceIdentifier TargetId { get; set; } + /// + /// Task specification + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary Specification { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowVersionProperties.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowVersionProperties.Serialization.cs new file mode 100644 index 000000000000..47d7281be245 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowVersionProperties.Serialization.cs @@ -0,0 +1,256 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class EdgeWorkflowVersionProperties : 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(EdgeWorkflowVersionProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Revision)) + { + writer.WritePropertyName("revision"u8); + writer.WriteNumberValue(Revision.Value); + } + if (options.Format != "W" && Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteStringValue(Configuration); + } + writer.WritePropertyName("stageSpec"u8); + writer.WriteStartArray(); + foreach (var item in StageSpec) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(ReviewId)) + { + writer.WritePropertyName("reviewId"u8); + writer.WriteStringValue(ReviewId); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsCollectionDefined(Specification)) + { + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.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 + } + } + } + + EdgeWorkflowVersionProperties 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(EdgeWorkflowVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeWorkflowVersionProperties(document.RootElement, options); + } + + internal static EdgeWorkflowVersionProperties DeserializeEdgeWorkflowVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? revision = default; + string configuration = default; + IList stageSpec = default; + string reviewId = default; + SolutionInstanceState? state = default; + IDictionary specification = default; + WorkloadOrchestrationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("revision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + revision = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("configuration"u8)) + { + configuration = property.Value.GetString(); + continue; + } + if (property.NameEquals("stageSpec"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeWorkflowStageSpec.DeserializeEdgeWorkflowStageSpec(item, options)); + } + stageSpec = array; + continue; + } + if (property.NameEquals("reviewId"u8)) + { + reviewId = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new SolutionInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("specification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkloadOrchestrationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeWorkflowVersionProperties( + revision, + configuration, + stageSpec, + reviewId, + state, + specification ?? new ChangeTrackingDictionary(), + provisioningState, + 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeWorkflowVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + EdgeWorkflowVersionProperties 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 DeserializeEdgeWorkflowVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeWorkflowVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowVersionProperties.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowVersionProperties.cs new file mode 100644 index 000000000000..6ba645344309 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/EdgeWorkflowVersionProperties.cs @@ -0,0 +1,130 @@ +// 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.WorkloadOrchestration.Models +{ + /// Workflow Version Properties. + public partial class EdgeWorkflowVersionProperties + { + /// + /// 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 . + /// A list of stage specs. + /// is null. + public EdgeWorkflowVersionProperties(IEnumerable stageSpec) + { + Argument.AssertNotNull(stageSpec, nameof(stageSpec)); + + StageSpec = stageSpec.ToList(); + Specification = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Revision number of resolved config for this workflow version. + /// Resolved configuration values. + /// A list of stage specs. + /// Review id of resolved config for this workflow version. + /// State of workflow version. + /// Execution specification. + /// Provisioning state of resource. + /// Keeps track of any properties unknown to the library. + internal EdgeWorkflowVersionProperties(int? revision, string configuration, IList stageSpec, string reviewId, SolutionInstanceState? state, IDictionary specification, WorkloadOrchestrationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Revision = revision; + Configuration = configuration; + StageSpec = stageSpec; + ReviewId = reviewId; + State = state; + Specification = specification; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeWorkflowVersionProperties() + { + } + + /// Revision number of resolved config for this workflow version. + public int? Revision { get; } + /// Resolved configuration values. + public string Configuration { get; } + /// A list of stage specs. + public IList StageSpec { get; } + /// Review id of resolved config for this workflow version. + public string ReviewId { get; } + /// State of workflow version. + public SolutionInstanceState? State { get; } + /// + /// Execution specification + /// + /// 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" }. + /// + /// + /// + /// + public IDictionary Specification { get; } + /// Provisioning state of resource. + public WorkloadOrchestrationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ExecutionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ExecutionListResult.Serialization.cs new file mode 100644 index 000000000000..f7e1f54fc5c0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ExecutionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class ExecutionListResult : 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(ExecutionListResult)} 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 + } + } + } + + ExecutionListResult 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(ExecutionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExecutionListResult(document.RootElement, options); + } + + internal static ExecutionListResult DeserializeExecutionListResult(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(EdgeExecutionData.DeserializeEdgeExecutionData(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 ExecutionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ExecutionListResult)} does not support writing '{options.Format}' format."); + } + } + + ExecutionListResult 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 DeserializeExecutionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExecutionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ExecutionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ExecutionListResult.cs new file mode 100644 index 000000000000..112ddbf3e075 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ExecutionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Execution list operation. + internal partial class ExecutionListResult + { + /// + /// 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 Execution items on this page. + /// is null. + internal ExecutionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Execution items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExecutionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExecutionListResult() + { + } + + /// The Execution items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstallSolutionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstallSolutionContent.Serialization.cs new file mode 100644 index 000000000000..0367986df4a5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstallSolutionContent.Serialization.cs @@ -0,0 +1,126 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class InstallSolutionContent : 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(InstallSolutionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + 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 + } + } + } + + InstallSolutionContent 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(InstallSolutionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstallSolutionContent(document.RootElement, options); + } + + internal static InstallSolutionContent DeserializeInstallSolutionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InstallSolutionContent(solutionVersionId, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(InstallSolutionContent)} does not support writing '{options.Format}' format."); + } + } + + InstallSolutionContent 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 DeserializeInstallSolutionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstallSolutionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstallSolutionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstallSolutionContent.cs new file mode 100644 index 000000000000..352c7343908b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstallSolutionContent.cs @@ -0,0 +1,76 @@ +// 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.WorkloadOrchestration.Models +{ + /// Install Solution Parameter. + public partial class InstallSolutionContent + { + /// + /// 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 . + /// Solution Version ARM Id. + /// is null. + public InstallSolutionContent(ResourceIdentifier solutionVersionId) + { + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + + SolutionVersionId = solutionVersionId; + } + + /// Initializes a new instance of . + /// Solution Version ARM Id. + /// Keeps track of any properties unknown to the library. + internal InstallSolutionContent(ResourceIdentifier solutionVersionId, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InstallSolutionContent() + { + } + + /// Solution Version ARM Id. + public ResourceIdentifier SolutionVersionId { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceActiveState.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceActiveState.cs new file mode 100644 index 000000000000..17552eea2f64 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceActiveState.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.WorkloadOrchestration.Models +{ + /// Instance State. + public readonly partial struct InstanceActiveState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InstanceActiveState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string InactiveValue = "inactive"; + + /// Instance is active. + public static InstanceActiveState Active { get; } = new InstanceActiveState(ActiveValue); + /// Instance is inactive. + public static InstanceActiveState Inactive { get; } = new InstanceActiveState(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(InstanceActiveState left, InstanceActiveState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InstanceActiveState left, InstanceActiveState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InstanceActiveState(string value) => new InstanceActiveState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InstanceActiveState other && Equals(other); + /// + public bool Equals(InstanceActiveState 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceHistoryListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceHistoryListResult.Serialization.cs new file mode 100644 index 000000000000..9e4e2dcf5c75 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceHistoryListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class InstanceHistoryListResult : 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(InstanceHistoryListResult)} 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 + } + } + } + + InstanceHistoryListResult 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(InstanceHistoryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstanceHistoryListResult(document.RootElement, options); + } + + internal static InstanceHistoryListResult DeserializeInstanceHistoryListResult(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(EdgeDeploymentInstanceHistoryData.DeserializeEdgeDeploymentInstanceHistoryData(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 InstanceHistoryListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(InstanceHistoryListResult)} does not support writing '{options.Format}' format."); + } + } + + InstanceHistoryListResult 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 DeserializeInstanceHistoryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstanceHistoryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceHistoryListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceHistoryListResult.cs new file mode 100644 index 000000000000..9bd94f7b1f94 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceHistoryListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a InstanceHistory list operation. + internal partial class InstanceHistoryListResult + { + /// + /// 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 InstanceHistory items on this page. + /// is null. + internal InstanceHistoryListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The InstanceHistory items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal InstanceHistoryListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InstanceHistoryListResult() + { + } + + /// The InstanceHistory items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceListResult.Serialization.cs new file mode 100644 index 000000000000..67f7ebee32c6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class InstanceListResult : 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(InstanceListResult)} 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 + } + } + } + + InstanceListResult 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(InstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstanceListResult(document.RootElement, options); + } + + internal static InstanceListResult DeserializeInstanceListResult(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(EdgeDeploymentInstanceData.DeserializeEdgeDeploymentInstanceData(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 InstanceListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(InstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + InstanceListResult 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 DeserializeInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceListResult.cs new file mode 100644 index 000000000000..06f12cd6e7d7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Instance list operation. + internal partial class InstanceListResult + { + /// + /// 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 Instance items on this page. + /// is null. + internal InstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Instance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal InstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InstanceListResult() + { + } + + /// The Instance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationPolicy.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationPolicy.Serialization.cs new file mode 100644 index 000000000000..7e2efab5ede8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationPolicy.Serialization.cs @@ -0,0 +1,134 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class InstanceReconciliationPolicy : 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(InstanceReconciliationPolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + writer.WritePropertyName("interval"u8); + writer.WriteStringValue(Interval); + 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 + } + } + } + + InstanceReconciliationPolicy 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(InstanceReconciliationPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstanceReconciliationPolicy(document.RootElement, options); + } + + internal static InstanceReconciliationPolicy DeserializeInstanceReconciliationPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InstanceReconciliationState state = default; + string interval = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + state = new InstanceReconciliationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("interval"u8)) + { + interval = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InstanceReconciliationPolicy(state, interval, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(InstanceReconciliationPolicy)} does not support writing '{options.Format}' format."); + } + } + + InstanceReconciliationPolicy 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 DeserializeInstanceReconciliationPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstanceReconciliationPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationPolicy.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationPolicy.cs new file mode 100644 index 000000000000..595d32bf8ed2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationPolicy.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; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Defines a ReconciliationPolicy. + public partial class InstanceReconciliationPolicy + { + /// + /// 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 state of the ReconciliationPolicy. + /// Policy interval. + /// is null. + public InstanceReconciliationPolicy(InstanceReconciliationState state, string interval) + { + Argument.AssertNotNull(interval, nameof(interval)); + + State = state; + Interval = interval; + } + + /// Initializes a new instance of . + /// The state of the ReconciliationPolicy. + /// Policy interval. + /// Keeps track of any properties unknown to the library. + internal InstanceReconciliationPolicy(InstanceReconciliationState state, string interval, IDictionary serializedAdditionalRawData) + { + State = state; + Interval = interval; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InstanceReconciliationPolicy() + { + } + + /// The state of the ReconciliationPolicy. + public InstanceReconciliationState State { get; set; } + /// Policy interval. + public string Interval { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationState.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationState.cs new file mode 100644 index 000000000000..83fb9adc4e37 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/InstanceReconciliationState.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.WorkloadOrchestration.Models +{ + /// Defines a state of the reconciliation policy. + public readonly partial struct InstanceReconciliationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InstanceReconciliationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InactiveValue = "inactive"; + private const string ActiveValue = "active"; + + /// Reconciliation is inactive. + public static InstanceReconciliationState Inactive { get; } = new InstanceReconciliationState(InactiveValue); + /// Reconciliation is active. + public static InstanceReconciliationState Active { get; } = new InstanceReconciliationState(ActiveValue); + /// Determines if two values are the same. + public static bool operator ==(InstanceReconciliationState left, InstanceReconciliationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InstanceReconciliationState left, InstanceReconciliationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InstanceReconciliationState(string value) => new InstanceReconciliationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InstanceReconciliationState other && Equals(other); + /// + public bool Equals(InstanceReconciliationState 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/JobListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/JobListResult.Serialization.cs new file mode 100644 index 000000000000..43e46f5d56c0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/JobListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class JobListResult : 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(JobListResult)} 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 + } + } + } + + JobListResult 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(JobListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobListResult(document.RootElement, options); + } + + internal static JobListResult DeserializeJobListResult(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(EdgeJobData.DeserializeEdgeJobData(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 JobListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(JobListResult)} does not support writing '{options.Format}' format."); + } + } + + JobListResult 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 DeserializeJobListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/JobListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/JobListResult.cs new file mode 100644 index 000000000000..a07ff41de359 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/JobListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Job list operation. + internal partial class JobListResult + { + /// + /// 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 Job items on this page. + /// is null. + internal JobListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Job items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal JobListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal JobListResult() + { + } + + /// The Job items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveRevisionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveRevisionContent.Serialization.cs new file mode 100644 index 000000000000..4865c674f9b9 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveRevisionContent.Serialization.cs @@ -0,0 +1,134 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class RemoveRevisionContent : 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(RemoveRevisionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + writer.WritePropertyName("solutionVersion"u8); + writer.WriteStringValue(SolutionVersion); + 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 + } + } + } + + RemoveRevisionContent 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(RemoveRevisionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemoveRevisionContent(document.RootElement, options); + } + + internal static RemoveRevisionContent DeserializeRemoveRevisionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionTemplateId = default; + string solutionVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionVersion"u8)) + { + solutionVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemoveRevisionContent(solutionTemplateId, solutionVersion, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(RemoveRevisionContent)} does not support writing '{options.Format}' format."); + } + } + + RemoveRevisionContent 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 DeserializeRemoveRevisionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemoveRevisionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveRevisionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveRevisionContent.cs new file mode 100644 index 000000000000..2e111983f456 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveRevisionContent.cs @@ -0,0 +1,83 @@ +// 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.WorkloadOrchestration.Models +{ + /// Install Solution Parameter. + public partial class RemoveRevisionContent + { + /// + /// 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 . + /// Solution Template ARM Id. + /// Solution Version Name. + /// or is null. + public RemoveRevisionContent(ResourceIdentifier solutionTemplateId, string solutionVersion) + { + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionVersion, nameof(solutionVersion)); + + SolutionTemplateId = solutionTemplateId; + SolutionVersion = solutionVersion; + } + + /// Initializes a new instance of . + /// Solution Template ARM Id. + /// Solution Version Name. + /// Keeps track of any properties unknown to the library. + internal RemoveRevisionContent(ResourceIdentifier solutionTemplateId, string solutionVersion, IDictionary serializedAdditionalRawData) + { + SolutionTemplateId = solutionTemplateId; + SolutionVersion = solutionVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RemoveRevisionContent() + { + } + + /// Solution Template ARM Id. + public ResourceIdentifier SolutionTemplateId { get; } + /// Solution Version Name. + public string SolutionVersion { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveVersionResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveVersionResult.Serialization.cs new file mode 100644 index 000000000000..5df429a0171f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveVersionResult.Serialization.cs @@ -0,0 +1,126 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class RemoveVersionResult : 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(RemoveVersionResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + 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 + } + } + } + + RemoveVersionResult 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(RemoveVersionResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemoveVersionResult(document.RootElement, options); + } + + internal static RemoveVersionResult DeserializeRemoveVersionResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemoveVersionResult(status, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(RemoveVersionResult)} does not support writing '{options.Format}' format."); + } + } + + RemoveVersionResult 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 DeserializeRemoveVersionResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemoveVersionResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveVersionResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveVersionResult.cs new file mode 100644 index 000000000000..20a03a66f10a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/RemoveVersionResult.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Remove Version response. + public partial class RemoveVersionResult + { + /// + /// 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 . + /// Status for remove version response. + /// is null. + internal RemoveVersionResult(string status) + { + Argument.AssertNotNull(status, nameof(status)); + + Status = status; + } + + /// Initializes a new instance of . + /// Status for remove version response. + /// Keeps track of any properties unknown to the library. + internal RemoveVersionResult(string status, IDictionary serializedAdditionalRawData) + { + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RemoveVersionResult() + { + } + + /// Status for remove version response. + public string Status { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ResolvedConfiguration.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ResolvedConfiguration.Serialization.cs new file mode 100644 index 000000000000..070bce2aa5de --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ResolvedConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class ResolvedConfiguration : 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(ResolvedConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configuration"u8); + writer.WriteStringValue(Configuration); + 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 + } + } + } + + ResolvedConfiguration 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(ResolvedConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolvedConfiguration(document.RootElement, options); + } + + internal static ResolvedConfiguration DeserializeResolvedConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string configuration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configuration"u8)) + { + configuration = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResolvedConfiguration(configuration, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(ResolvedConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ResolvedConfiguration 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 DeserializeResolvedConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolvedConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ResolvedConfiguration.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ResolvedConfiguration.cs new file mode 100644 index 000000000000..bd33271e003a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/ResolvedConfiguration.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Resolved Configuration. + public partial class ResolvedConfiguration + { + /// + /// 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 . + /// Resolved Configuration as string. + /// is null. + internal ResolvedConfiguration(string configuration) + { + Argument.AssertNotNull(configuration, nameof(configuration)); + + Configuration = configuration; + } + + /// Initializes a new instance of . + /// Resolved Configuration as string. + /// Keeps track of any properties unknown to the library. + internal ResolvedConfiguration(string configuration, IDictionary serializedAdditionalRawData) + { + Configuration = configuration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResolvedConfiguration() + { + } + + /// Resolved Configuration as string. + public string Configuration { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaListResult.Serialization.cs new file mode 100644 index 000000000000..ee565796a3b3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SchemaListResult : 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(SchemaListResult)} 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 + } + } + } + + SchemaListResult 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(SchemaListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchemaListResult(document.RootElement, options); + } + + internal static SchemaListResult DeserializeSchemaListResult(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(EdgeSchemaData.DeserializeEdgeSchemaData(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 SchemaListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SchemaListResult)} does not support writing '{options.Format}' format."); + } + } + + SchemaListResult 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 DeserializeSchemaListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchemaListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaListResult.cs new file mode 100644 index 000000000000..693d0c59ba7c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Schema list operation. + internal partial class SchemaListResult + { + /// + /// 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 Schema items on this page. + /// is null. + internal SchemaListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Schema items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SchemaListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchemaListResult() + { + } + + /// The Schema items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaReferenceListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaReferenceListResult.Serialization.cs new file mode 100644 index 000000000000..2bc58005051e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaReferenceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SchemaReferenceListResult : 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(SchemaReferenceListResult)} 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 + } + } + } + + SchemaReferenceListResult 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(SchemaReferenceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchemaReferenceListResult(document.RootElement, options); + } + + internal static SchemaReferenceListResult DeserializeSchemaReferenceListResult(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(EdgeSchemaReferenceData.DeserializeEdgeSchemaReferenceData(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 SchemaReferenceListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SchemaReferenceListResult)} does not support writing '{options.Format}' format."); + } + } + + SchemaReferenceListResult 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 DeserializeSchemaReferenceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchemaReferenceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaReferenceListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaReferenceListResult.cs new file mode 100644 index 000000000000..1510f51d7665 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaReferenceListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a SchemaReference list operation. + internal partial class SchemaReferenceListResult + { + /// + /// 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 SchemaReference items on this page. + /// is null. + internal SchemaReferenceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SchemaReference items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SchemaReferenceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchemaReferenceListResult() + { + } + + /// The SchemaReference items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaVersionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaVersionListResult.Serialization.cs new file mode 100644 index 000000000000..bfccd63d84bd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SchemaVersionListResult : 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(SchemaVersionListResult)} 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 + } + } + } + + SchemaVersionListResult 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(SchemaVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchemaVersionListResult(document.RootElement, options); + } + + internal static SchemaVersionListResult DeserializeSchemaVersionListResult(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(EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(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 SchemaVersionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SchemaVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + SchemaVersionListResult 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 DeserializeSchemaVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchemaVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaVersionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaVersionListResult.cs new file mode 100644 index 000000000000..db0b9148aaf0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SchemaVersionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a SchemaVersion list operation. + internal partial class SchemaVersionListResult + { + /// + /// 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 SchemaVersion items on this page. + /// is null. + internal SchemaVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SchemaVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SchemaVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchemaVersionListResult() + { + } + + /// The SchemaVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SiteReferenceListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SiteReferenceListResult.Serialization.cs new file mode 100644 index 000000000000..e81fd0e8c18b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SiteReferenceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SiteReferenceListResult : 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(SiteReferenceListResult)} 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 + } + } + } + + SiteReferenceListResult 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(SiteReferenceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteReferenceListResult(document.RootElement, options); + } + + internal static SiteReferenceListResult DeserializeSiteReferenceListResult(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(EdgeSiteReferenceData.DeserializeEdgeSiteReferenceData(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 SiteReferenceListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SiteReferenceListResult)} does not support writing '{options.Format}' format."); + } + } + + SiteReferenceListResult 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 DeserializeSiteReferenceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteReferenceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SiteReferenceListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SiteReferenceListResult.cs new file mode 100644 index 000000000000..130bef6d2bfa --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SiteReferenceListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a SiteReference list operation. + internal partial class SiteReferenceListResult + { + /// + /// 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 SiteReference items on this page. + /// is null. + internal SiteReferenceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SiteReference items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SiteReferenceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteReferenceListResult() + { + } + + /// The SiteReference items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionInstanceState.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionInstanceState.cs new file mode 100644 index 000000000000..c10bf2ee2f75 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionInstanceState.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Solution Instance State. + public readonly partial struct SolutionInstanceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SolutionInstanceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InReviewValue = "InReview"; + private const string UpgradeInReviewValue = "UpgradeInReview"; + private const string ReadyToDeployValue = "ReadyToDeploy"; + private const string ReadyToUpgradeValue = "ReadyToUpgrade"; + private const string DeployingValue = "Deploying"; + private const string DeployedValue = "Deployed"; + private const string FailedValue = "Failed"; + private const string UndeployedValue = "Undeployed"; + private const string PendingExternalValidationValue = "PendingExternalValidation"; + private const string ExternalValidationFailedValue = "ExternalValidationFailed"; + private const string StagingValue = "Staging"; + + /// Solution Instance is in review. + public static SolutionInstanceState InReview { get; } = new SolutionInstanceState(InReviewValue); + /// Solution Instance upgrade is in review. + public static SolutionInstanceState UpgradeInReview { get; } = new SolutionInstanceState(UpgradeInReviewValue); + /// Solution Instance is ready to deploy. + public static SolutionInstanceState ReadyToDeploy { get; } = new SolutionInstanceState(ReadyToDeployValue); + /// Solution Instance is ready to upgrade. + public static SolutionInstanceState ReadyToUpgrade { get; } = new SolutionInstanceState(ReadyToUpgradeValue); + /// Solution Instance is deploying. + public static SolutionInstanceState Deploying { get; } = new SolutionInstanceState(DeployingValue); + /// Solution Instance is deployed. + public static SolutionInstanceState Deployed { get; } = new SolutionInstanceState(DeployedValue); + /// Solution Instance failed to deploy. + public static SolutionInstanceState Failed { get; } = new SolutionInstanceState(FailedValue); + /// Solution Instance is undeployed. + public static SolutionInstanceState Undeployed { get; } = new SolutionInstanceState(UndeployedValue); + /// Solution Instance is pending external validation. + public static SolutionInstanceState PendingExternalValidation { get; } = new SolutionInstanceState(PendingExternalValidationValue); + /// Solution Instance failed external validation. + public static SolutionInstanceState ExternalValidationFailed { get; } = new SolutionInstanceState(ExternalValidationFailedValue); + /// Solution Instance is staging the images. + public static SolutionInstanceState Staging { get; } = new SolutionInstanceState(StagingValue); + /// Determines if two values are the same. + public static bool operator ==(SolutionInstanceState left, SolutionInstanceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SolutionInstanceState left, SolutionInstanceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SolutionInstanceState(string value) => new SolutionInstanceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SolutionInstanceState other && Equals(other); + /// + public bool Equals(SolutionInstanceState 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionInstanceValidationStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionInstanceValidationStatus.cs new file mode 100644 index 000000000000..23fd16e75be5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionInstanceValidationStatus.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.WorkloadOrchestration.Models +{ + /// Solution Instance Validation Status. + public readonly partial struct SolutionInstanceValidationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SolutionInstanceValidationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ValidValue = "Valid"; + private const string InvalidValue = "Invalid"; + + /// Solution Instance is valid. + public static SolutionInstanceValidationStatus Valid { get; } = new SolutionInstanceValidationStatus(ValidValue); + /// Solution Instance is invalid. + public static SolutionInstanceValidationStatus Invalid { get; } = new SolutionInstanceValidationStatus(InvalidValue); + /// Determines if two values are the same. + public static bool operator ==(SolutionInstanceValidationStatus left, SolutionInstanceValidationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SolutionInstanceValidationStatus left, SolutionInstanceValidationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SolutionInstanceValidationStatus(string value) => new SolutionInstanceValidationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SolutionInstanceValidationStatus other && Equals(other); + /// + public bool Equals(SolutionInstanceValidationStatus 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionListResult.Serialization.cs new file mode 100644 index 000000000000..87ceb375ed87 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SolutionListResult : 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(SolutionListResult)} 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 + } + } + } + + SolutionListResult 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(SolutionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSolutionListResult(document.RootElement, options); + } + + internal static SolutionListResult DeserializeSolutionListResult(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(EdgeSolutionData.DeserializeEdgeSolutionData(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 SolutionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SolutionListResult)} does not support writing '{options.Format}' format."); + } + } + + SolutionListResult 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 DeserializeSolutionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SolutionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionListResult.cs new file mode 100644 index 000000000000..ac2725ba9a95 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Solution list operation. + internal partial class SolutionListResult + { + /// + /// 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 Solution items on this page. + /// is null. + internal SolutionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Solution items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SolutionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SolutionListResult() + { + } + + /// The Solution items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateListResult.Serialization.cs new file mode 100644 index 000000000000..574e08ffb868 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SolutionTemplateListResult : 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(SolutionTemplateListResult)} 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 + } + } + } + + SolutionTemplateListResult 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(SolutionTemplateListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSolutionTemplateListResult(document.RootElement, options); + } + + internal static SolutionTemplateListResult DeserializeSolutionTemplateListResult(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(EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(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 SolutionTemplateListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SolutionTemplateListResult)} does not support writing '{options.Format}' format."); + } + } + + SolutionTemplateListResult 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 DeserializeSolutionTemplateListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SolutionTemplateListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateListResult.cs new file mode 100644 index 000000000000..53c976d0ffc5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a SolutionTemplate list operation. + internal partial class SolutionTemplateListResult + { + /// + /// 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 SolutionTemplate items on this page. + /// is null. + internal SolutionTemplateListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SolutionTemplate items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SolutionTemplateListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SolutionTemplateListResult() + { + } + + /// The SolutionTemplate items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateVersionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateVersionListResult.Serialization.cs new file mode 100644 index 000000000000..4eea86a3bab8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SolutionTemplateVersionListResult : 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(SolutionTemplateVersionListResult)} 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 + } + } + } + + SolutionTemplateVersionListResult 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(SolutionTemplateVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSolutionTemplateVersionListResult(document.RootElement, options); + } + + internal static SolutionTemplateVersionListResult DeserializeSolutionTemplateVersionListResult(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(EdgeSolutionTemplateVersionData.DeserializeEdgeSolutionTemplateVersionData(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 SolutionTemplateVersionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SolutionTemplateVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + SolutionTemplateVersionListResult 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 DeserializeSolutionTemplateVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SolutionTemplateVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateVersionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateVersionListResult.cs new file mode 100644 index 000000000000..a024bed54bcd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionTemplateVersionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a SolutionTemplateVersion list operation. + internal partial class SolutionTemplateVersionListResult + { + /// + /// 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 SolutionTemplateVersion items on this page. + /// is null. + internal SolutionTemplateVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SolutionTemplateVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SolutionTemplateVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SolutionTemplateVersionListResult() + { + } + + /// The SolutionTemplateVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionListResult.Serialization.cs new file mode 100644 index 000000000000..b58358b663e1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class SolutionVersionListResult : 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(SolutionVersionListResult)} 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 + } + } + } + + SolutionVersionListResult 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(SolutionVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSolutionVersionListResult(document.RootElement, options); + } + + internal static SolutionVersionListResult DeserializeSolutionVersionListResult(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(EdgeSolutionVersionData.DeserializeEdgeSolutionVersionData(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 SolutionVersionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SolutionVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + SolutionVersionListResult 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 DeserializeSolutionVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SolutionVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionListResult.cs new file mode 100644 index 000000000000..9ec0441c1141 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a SolutionVersion list operation. + internal partial class SolutionVersionListResult + { + /// + /// 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 SolutionVersion items on this page. + /// is null. + internal SolutionVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SolutionVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SolutionVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SolutionVersionListResult() + { + } + + /// The SolutionVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionOrchestratorType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionOrchestratorType.cs new file mode 100644 index 000000000000..a8345081eee6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionOrchestratorType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Available Orchestrator types. + public readonly partial struct SolutionVersionOrchestratorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SolutionVersionOrchestratorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TOValue = "TO"; + + /// Default type. + public static SolutionVersionOrchestratorType TO { get; } = new SolutionVersionOrchestratorType(TOValue); + /// Determines if two values are the same. + public static bool operator ==(SolutionVersionOrchestratorType left, SolutionVersionOrchestratorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SolutionVersionOrchestratorType left, SolutionVersionOrchestratorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SolutionVersionOrchestratorType(string value) => new SolutionVersionOrchestratorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SolutionVersionOrchestratorType other && Equals(other); + /// + public bool Equals(SolutionVersionOrchestratorType 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionSnapshot.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionSnapshot.Serialization.cs new file mode 100644 index 000000000000..38f2ea61e7c7 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionSnapshot.Serialization.cs @@ -0,0 +1,178 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class SolutionVersionSnapshot : 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(SolutionVersionSnapshot)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SolutionVersionId)) + { + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + } + if (Optional.IsCollectionDefined(Specification)) + { + writer.WritePropertyName("specification"u8); + writer.WriteStartObject(); + foreach (var item in Specification) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#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 + } + 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 + } + } + } + + SolutionVersionSnapshot 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(SolutionVersionSnapshot)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSolutionVersionSnapshot(document.RootElement, options); + } + + internal static SolutionVersionSnapshot DeserializeSolutionVersionSnapshot(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + IReadOnlyDictionary specification = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("specification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + specification = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SolutionVersionSnapshot(solutionVersionId, specification ?? 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(SolutionVersionSnapshot)} does not support writing '{options.Format}' format."); + } + } + + SolutionVersionSnapshot 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 DeserializeSolutionVersionSnapshot(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SolutionVersionSnapshot)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionSnapshot.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionSnapshot.cs new file mode 100644 index 000000000000..7ebab88b9b1b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/SolutionVersionSnapshot.cs @@ -0,0 +1,100 @@ +// 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.WorkloadOrchestration.Models +{ + /// Solution Version Snapshot. + public partial class SolutionVersionSnapshot + { + /// + /// 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 . + internal SolutionVersionSnapshot() + { + Specification = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Solution version of instance. + /// App components spec. + /// Keeps track of any properties unknown to the library. + internal SolutionVersionSnapshot(ResourceIdentifier solutionVersionId, IReadOnlyDictionary specification, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + Specification = specification; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Solution version of instance. + public ResourceIdentifier SolutionVersionId { get; } + /// + /// App components spec + /// + /// 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" }. + /// + /// + /// + /// + public IReadOnlyDictionary Specification { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetComponentStatus.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetComponentStatus.Serialization.cs new file mode 100644 index 000000000000..077492a1615e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetComponentStatus.Serialization.cs @@ -0,0 +1,140 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class TargetComponentStatus : 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(TargetComponentStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + 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 + } + } + } + + TargetComponentStatus 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(TargetComponentStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetComponentStatus(document.RootElement, options); + } + + internal static TargetComponentStatus DeserializeTargetComponentStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string status = 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("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetComponentStatus(name, status, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(TargetComponentStatus)} does not support writing '{options.Format}' format."); + } + } + + TargetComponentStatus 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 DeserializeTargetComponentStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetComponentStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetComponentStatus.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetComponentStatus.cs new file mode 100644 index 000000000000..745d00cdbd08 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetComponentStatus.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Component Status. + public partial class TargetComponentStatus + { + /// + /// 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 . + internal TargetComponentStatus() + { + } + + /// Initializes a new instance of . + /// Component name. + /// Component status. + /// Keeps track of any properties unknown to the library. + internal TargetComponentStatus(string name, string status, IDictionary serializedAdditionalRawData) + { + Name = name; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Component name. + public string Name { get; } + /// Component status. + public string Status { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetListResult.Serialization.cs new file mode 100644 index 000000000000..7d2c32a3541b --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class TargetListResult : 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(TargetListResult)} 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 + } + } + } + + TargetListResult 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(TargetListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetListResult(document.RootElement, options); + } + + internal static TargetListResult DeserializeTargetListResult(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(EdgeTargetData.DeserializeEdgeTargetData(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 TargetListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(TargetListResult)} does not support writing '{options.Format}' format."); + } + } + + TargetListResult 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 DeserializeTargetListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetListResult.cs new file mode 100644 index 000000000000..ba267ad31849 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TargetListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Target list operation. + internal partial class TargetListResult + { + /// + /// 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 Target items on this page. + /// is null. + internal TargetListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Target items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal TargetListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TargetListResult() + { + } + + /// The Target items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorAction.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorAction.Serialization.cs new file mode 100644 index 000000000000..1dccabb050b8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorAction.Serialization.cs @@ -0,0 +1,148 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class TaskErrorAction : 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(TaskErrorAction)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(MaxToleratedFailures)) + { + writer.WritePropertyName("maxToleratedFailures"u8); + writer.WriteNumberValue(MaxToleratedFailures.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 + } + } + } + + TaskErrorAction 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(TaskErrorAction)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskErrorAction(document.RootElement, options); + } + + internal static TaskErrorAction DeserializeTaskErrorAction(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TaskErrorActionModeType? mode = default; + int? maxToleratedFailures = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new TaskErrorActionModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("maxToleratedFailures"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxToleratedFailures = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TaskErrorAction(mode, maxToleratedFailures, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(TaskErrorAction)} does not support writing '{options.Format}' format."); + } + } + + TaskErrorAction 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 DeserializeTaskErrorAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskErrorAction)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorAction.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorAction.cs new file mode 100644 index 000000000000..024e997b5fba --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorAction.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Error Action Properties. + public partial class TaskErrorAction + { + /// + /// 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 TaskErrorAction() + { + } + + /// Initializes a new instance of . + /// Error action mode. + /// Max tolerated failures. + /// Keeps track of any properties unknown to the library. + internal TaskErrorAction(TaskErrorActionModeType? mode, int? maxToleratedFailures, IDictionary serializedAdditionalRawData) + { + Mode = mode; + MaxToleratedFailures = maxToleratedFailures; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Error action mode. + public TaskErrorActionModeType? Mode { get; set; } + /// Max tolerated failures. + public int? MaxToleratedFailures { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorActionModeType.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorActionModeType.cs new file mode 100644 index 000000000000..4538b8a1c835 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/TaskErrorActionModeType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Error Action Mode. + public readonly partial struct TaskErrorActionModeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TaskErrorActionModeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StopOnAnyFailureValue = "stopOnAnyFailure"; + private const string StopOnNFailuresValue = "stopOnNFailures"; + private const string SilentlyContinueValue = "silentlyContinue"; + + /// Stop on any failure. + public static TaskErrorActionModeType StopOnAnyFailure { get; } = new TaskErrorActionModeType(StopOnAnyFailureValue); + /// Stop after N cumulative failures. + public static TaskErrorActionModeType StopOnNFailures { get; } = new TaskErrorActionModeType(StopOnNFailuresValue); + /// Continue silently despite errors. + public static TaskErrorActionModeType SilentlyContinue { get; } = new TaskErrorActionModeType(SilentlyContinueValue); + /// Determines if two values are the same. + public static bool operator ==(TaskErrorActionModeType left, TaskErrorActionModeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TaskErrorActionModeType left, TaskErrorActionModeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TaskErrorActionModeType(string value) => new TaskErrorActionModeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TaskErrorActionModeType other && Equals(other); + /// + public bool Equals(TaskErrorActionModeType 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UninstallSolutionContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UninstallSolutionContent.Serialization.cs new file mode 100644 index 000000000000..4b1924ffacd5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UninstallSolutionContent.Serialization.cs @@ -0,0 +1,137 @@ +// 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.WorkloadOrchestration.Models +{ + public partial class UninstallSolutionContent : 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(UninstallSolutionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + if (Optional.IsDefined(SolutionInstanceName)) + { + writer.WritePropertyName("solutionInstanceName"u8); + writer.WriteStringValue(SolutionInstanceName); + } + 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 + } + } + } + + UninstallSolutionContent 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(UninstallSolutionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUninstallSolutionContent(document.RootElement, options); + } + + internal static UninstallSolutionContent DeserializeUninstallSolutionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionTemplateId = default; + string solutionInstanceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("solutionInstanceName"u8)) + { + solutionInstanceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UninstallSolutionContent(solutionTemplateId, solutionInstanceName, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(UninstallSolutionContent)} does not support writing '{options.Format}' format."); + } + } + + UninstallSolutionContent 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 DeserializeUninstallSolutionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UninstallSolutionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UninstallSolutionContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UninstallSolutionContent.cs new file mode 100644 index 000000000000..0ad83f99e52a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UninstallSolutionContent.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// Uninstall Solution Parameter. + public partial class UninstallSolutionContent + { + /// + /// 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 . + /// Solution Template ARM Id. + /// is null. + public UninstallSolutionContent(ResourceIdentifier solutionTemplateId) + { + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + + SolutionTemplateId = solutionTemplateId; + } + + /// Initializes a new instance of . + /// Solution Template ARM Id. + /// Solution Instance Name. + /// Keeps track of any properties unknown to the library. + internal UninstallSolutionContent(ResourceIdentifier solutionTemplateId, string solutionInstanceName, IDictionary serializedAdditionalRawData) + { + SolutionTemplateId = solutionTemplateId; + SolutionInstanceName = solutionInstanceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UninstallSolutionContent() + { + } + + /// Solution Template ARM Id. + public ResourceIdentifier SolutionTemplateId { get; } + /// Solution Instance Name. + public string SolutionInstanceName { get; set; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobContent.Serialization.cs new file mode 100644 index 000000000000..41ebb0b9d2a3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobContent.Serialization.cs @@ -0,0 +1,110 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class UnknownEdgeJobContent : 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(EdgeJobContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + EdgeJobContent 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(EdgeJobContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobContent(document.RootElement, options); + } + + internal static UnknownEdgeJobContent DeserializeUnknownEdgeJobContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeJobType jobType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobType"u8)) + { + jobType = new EdgeJobType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownEdgeJobContent(jobType, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobContent)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobContent 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 DeserializeEdgeJobContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobContent.cs new file mode 100644 index 000000000000..1aeb80bde1a2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobContent.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Unknown version of EdgeJobContent. + internal partial class UnknownEdgeJobContent : EdgeJobContent + { + /// Initializes a new instance of . + /// Job type discriminator value. + /// Keeps track of any properties unknown to the library. + internal UnknownEdgeJobContent(EdgeJobType jobType, IDictionary serializedAdditionalRawData) : base(jobType, serializedAdditionalRawData) + { + JobType = jobType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownEdgeJobContent() + { + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobStepStatistics.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobStepStatistics.Serialization.cs new file mode 100644 index 000000000000..aa603611f47d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobStepStatistics.Serialization.cs @@ -0,0 +1,110 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class UnknownEdgeJobStepStatistics : 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(EdgeJobStepStatistics)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + EdgeJobStepStatistics 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(EdgeJobStepStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeJobStepStatistics(document.RootElement, options); + } + + internal static UnknownEdgeJobStepStatistics DeserializeUnknownEdgeJobStepStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeJobType statisticsType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("statisticsType"u8)) + { + statisticsType = new EdgeJobType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownEdgeJobStepStatistics(statisticsType, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeJobStepStatistics)} does not support writing '{options.Format}' format."); + } + } + + EdgeJobStepStatistics 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 DeserializeEdgeJobStepStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeJobStepStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobStepStatistics.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobStepStatistics.cs new file mode 100644 index 000000000000..a7d18f16eaad --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UnknownEdgeJobStepStatistics.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Unknown version of EdgeJobStepStatistics. + internal partial class UnknownEdgeJobStepStatistics : EdgeJobStepStatistics + { + /// Initializes a new instance of . + /// Statistics type discriminator value. + /// Keeps track of any properties unknown to the library. + internal UnknownEdgeJobStepStatistics(EdgeJobType statisticsType, IDictionary serializedAdditionalRawData) : base(statisticsType, serializedAdditionalRawData) + { + StatisticsType = statisticsType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownEdgeJobStepStatistics() + { + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UpdateExternalValidationStatusContent.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UpdateExternalValidationStatusContent.Serialization.cs new file mode 100644 index 000000000000..1f3400219a07 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UpdateExternalValidationStatusContent.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + public partial class UpdateExternalValidationStatusContent : 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(UpdateExternalValidationStatusContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + if (Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + ((IJsonModel)ErrorDetails).Write(writer, options); + } + writer.WritePropertyName("externalValidationId"u8); + writer.WriteStringValue(ExternalValidationId); + writer.WritePropertyName("validationStatus"u8); + writer.WriteStringValue(ValidationStatus.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 + } + } + } + + UpdateExternalValidationStatusContent 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(UpdateExternalValidationStatusContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUpdateExternalValidationStatusContent(document.RootElement, options); + } + + internal static UpdateExternalValidationStatusContent DeserializeUpdateExternalValidationStatusContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier solutionVersionId = default; + ResponseError errorDetails = default; + string externalValidationId = default; + SolutionInstanceValidationStatus validationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerWorkloadOrchestrationContext.Default); + continue; + } + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("validationStatus"u8)) + { + validationStatus = new SolutionInstanceValidationStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UpdateExternalValidationStatusContent(solutionVersionId, errorDetails, externalValidationId, validationStatus, 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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(UpdateExternalValidationStatusContent)} does not support writing '{options.Format}' format."); + } + } + + UpdateExternalValidationStatusContent 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 DeserializeUpdateExternalValidationStatusContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UpdateExternalValidationStatusContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UpdateExternalValidationStatusContent.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UpdateExternalValidationStatusContent.cs new file mode 100644 index 000000000000..f016f31c77a0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/UpdateExternalValidationStatusContent.cs @@ -0,0 +1,93 @@ +// 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.WorkloadOrchestration.Models +{ + /// Update External Validation Status Parameter. + public partial class UpdateExternalValidationStatusContent + { + /// + /// 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 . + /// Solution Version Id. + /// External validation id. + /// Validation Status of external validation. + /// or is null. + public UpdateExternalValidationStatusContent(ResourceIdentifier solutionVersionId, string externalValidationId, SolutionInstanceValidationStatus validationStatus) + { + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + + SolutionVersionId = solutionVersionId; + ExternalValidationId = externalValidationId; + ValidationStatus = validationStatus; + } + + /// Initializes a new instance of . + /// Solution Version Id. + /// Error Details if any failure is there. + /// External validation id. + /// Validation Status of external validation. + /// Keeps track of any properties unknown to the library. + internal UpdateExternalValidationStatusContent(ResourceIdentifier solutionVersionId, ResponseError errorDetails, string externalValidationId, SolutionInstanceValidationStatus validationStatus, IDictionary serializedAdditionalRawData) + { + SolutionVersionId = solutionVersionId; + ErrorDetails = errorDetails; + ExternalValidationId = externalValidationId; + ValidationStatus = validationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UpdateExternalValidationStatusContent() + { + } + + /// Solution Version Id. + public ResourceIdentifier SolutionVersionId { get; } + /// Error Details if any failure is there. + public ResponseError ErrorDetails { get; set; } + /// External validation id. + public string ExternalValidationId { get; } + /// Validation Status of external validation. + public SolutionInstanceValidationStatus ValidationStatus { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowListResult.Serialization.cs new file mode 100644 index 000000000000..0896886b7122 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class WorkflowListResult : 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(WorkflowListResult)} 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 + } + } + } + + WorkflowListResult 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(WorkflowListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowListResult(document.RootElement, options); + } + + internal static WorkflowListResult DeserializeWorkflowListResult(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(EdgeWorkflowData.DeserializeEdgeWorkflowData(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 WorkflowListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(WorkflowListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowListResult 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 DeserializeWorkflowListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowListResult.cs new file mode 100644 index 000000000000..3bd202f7b657 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a Workflow list operation. + internal partial class WorkflowListResult + { + /// + /// 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 Workflow items on this page. + /// is null. + internal WorkflowListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Workflow items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal WorkflowListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowListResult() + { + } + + /// The Workflow items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowVersionListResult.Serialization.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowVersionListResult.Serialization.cs new file mode 100644 index 000000000000..0d5c6c0cb1dd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.WorkloadOrchestration.Models +{ + internal partial class WorkflowVersionListResult : 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(WorkflowVersionListResult)} 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 + } + } + } + + WorkflowVersionListResult 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(WorkflowVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowVersionListResult(document.RootElement, options); + } + + internal static WorkflowVersionListResult DeserializeWorkflowVersionListResult(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(EdgeWorkflowVersionData.DeserializeEdgeWorkflowVersionData(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 WorkflowVersionListResult(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, AzureResourceManagerWorkloadOrchestrationContext.Default); + default: + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowVersionListResult 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 DeserializeWorkflowVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowVersionListResult.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowVersionListResult.cs new file mode 100644 index 000000000000..e1ebc130b9c0 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkflowVersionListResult.cs @@ -0,0 +1,80 @@ +// 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.WorkloadOrchestration.Models +{ + /// The response of a WorkflowVersion list operation. + internal partial class WorkflowVersionListResult + { + /// + /// 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 WorkflowVersion items on this page. + /// is null. + internal WorkflowVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The WorkflowVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal WorkflowVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowVersionListResult() + { + } + + /// The WorkflowVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkloadOrchestrationProvisioningState.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkloadOrchestrationProvisioningState.cs new file mode 100644 index 000000000000..c80014fc4c26 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/Models/WorkloadOrchestrationProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.WorkloadOrchestration.Models +{ + /// Provisioning state of resource. + public readonly partial struct WorkloadOrchestrationProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkloadOrchestrationProvisioningState(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 InitializedValue = "Initialized"; + private const string InprogressValue = "InProgress"; + private const string DeletingValue = "Deleting"; + + /// Resource has been created. + public static WorkloadOrchestrationProvisioningState Succeeded { get; } = new WorkloadOrchestrationProvisioningState(SucceededValue); + /// Resource creation failed. + public static WorkloadOrchestrationProvisioningState Failed { get; } = new WorkloadOrchestrationProvisioningState(FailedValue); + /// Resource creation was canceled. + public static WorkloadOrchestrationProvisioningState Canceled { get; } = new WorkloadOrchestrationProvisioningState(CanceledValue); + /// Resource Provisioning is initialized. + public static WorkloadOrchestrationProvisioningState Initialized { get; } = new WorkloadOrchestrationProvisioningState(InitializedValue); + /// Resource Provisioning is in progress. + public static WorkloadOrchestrationProvisioningState Inprogress { get; } = new WorkloadOrchestrationProvisioningState(InprogressValue); + /// Resource Provisioning is deleting. + public static WorkloadOrchestrationProvisioningState Deleting { get; } = new WorkloadOrchestrationProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(WorkloadOrchestrationProvisioningState left, WorkloadOrchestrationProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkloadOrchestrationProvisioningState left, WorkloadOrchestrationProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WorkloadOrchestrationProvisioningState(string value) => new WorkloadOrchestrationProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkloadOrchestrationProvisioningState other && Equals(other); + /// + public bool Equals(WorkloadOrchestrationProvisioningState 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/ProviderConstants.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..946f7bd11537 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ConfigTemplateVersionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ConfigTemplateVersionsRestOperations.cs new file mode 100644 index 000000000000..81b57bbfa9bb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ConfigTemplateVersionsRestOperations.cs @@ -0,0 +1,321 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class ConfigTemplateVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConfigTemplateVersionsRestOperations. + /// 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 ConfigTemplateVersionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName, string configTemplateVersionName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(configTemplateVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string configTemplateName, string configTemplateVersionName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(configTemplateVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Config Template Version Resource. + /// 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 ConfigTemplate. + /// The name of the ConfigTemplateVersion. + /// 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 configTemplateName, string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, configTemplateName, configTemplateVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeConfigTemplateVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeConfigTemplateVersionData.DeserializeEdgeConfigTemplateVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeConfigTemplateVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Config Template Version Resource. + /// 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 ConfigTemplate. + /// The name of the ConfigTemplateVersion. + /// 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 configTemplateName, string configTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNullOrEmpty(configTemplateVersionName, nameof(configTemplateVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, configTemplateName, configTemplateVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeConfigTemplateVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeConfigTemplateVersionData.DeserializeEdgeConfigTemplateVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeConfigTemplateVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByConfigTemplateRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByConfigTemplateRequest(string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Config Template Version Resources. + /// 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 ConfigTemplate. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByConfigTemplateAsync(string subscriptionId, string resourceGroupName, string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateListByConfigTemplateRequest(subscriptionId, resourceGroupName, configTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConfigTemplateVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConfigTemplateVersionListResult.DeserializeConfigTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Config Template Version Resources. + /// 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 ConfigTemplate. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByConfigTemplate(string subscriptionId, string resourceGroupName, string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateListByConfigTemplateRequest(subscriptionId, resourceGroupName, configTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConfigTemplateVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConfigTemplateVersionListResult.DeserializeConfigTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByConfigTemplateNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string configTemplateName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByConfigTemplateNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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 Config Template Version Resources. + /// 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 ConfigTemplate. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByConfigTemplateNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateListByConfigTemplateNextPageRequest(nextLink, subscriptionId, resourceGroupName, configTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConfigTemplateVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConfigTemplateVersionListResult.DeserializeConfigTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Config Template Version Resources. + /// 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 ConfigTemplate. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByConfigTemplateNextPage(string nextLink, string subscriptionId, string resourceGroupName, string configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateListByConfigTemplateNextPageRequest(nextLink, subscriptionId, resourceGroupName, configTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConfigTemplateVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConfigTemplateVersionListResult.DeserializeConfigTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ConfigTemplatesRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ConfigTemplatesRestOperations.cs new file mode 100644 index 000000000000..86b80da9b765 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ConfigTemplatesRestOperations.cs @@ -0,0 +1,926 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class ConfigTemplatesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConfigTemplatesRestOperations. + /// 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 ConfigTemplatesRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, configTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeConfigTemplateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeConfigTemplateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, configTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeConfigTemplateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeConfigTemplateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeConfigTemplateData 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeConfigTemplateData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, 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; + } + + /// Create or update a Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, EdgeConfigTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, configTemplateName, 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 Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, EdgeConfigTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, configTemplateName, 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 configTemplateName, EdgeConfigTemplatePatch 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeConfigTemplatePatch 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, 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; + } + + /// update a Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, EdgeConfigTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, configTemplateName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeConfigTemplateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// update a Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, EdgeConfigTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, configTemplateName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeConfigTemplateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeConfigTemplateData.DeserializeEdgeConfigTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateVersionRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName, ConfigTemplateVersionWithUpdateType body) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/createVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateVersionRequest(string subscriptionId, string resourceGroupName, string configTemplateName, ConfigTemplateVersionWithUpdateType body) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/createVersion", 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(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a Config Template Version Resource with the specified UpdateType. + /// 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 ConfigTemplate. + /// 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 CreateVersionAsync(string subscriptionId, string resourceGroupName, string configTemplateName, ConfigTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateVersionRequest(subscriptionId, resourceGroupName, configTemplateName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Config Template Version Resource with the specified UpdateType. + /// 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 ConfigTemplate. + /// 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 CreateVersion(string subscriptionId, string resourceGroupName, string configTemplateName, ConfigTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateVersionRequest(subscriptionId, resourceGroupName, configTemplateName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveVersionRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeVersionContent 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/removeVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveVersionRequest(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeVersionContent 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendPath("/removeVersion", 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; + } + + /// Remove Config Template Version Resource. + /// 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 ConfigTemplate. + /// 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> RemoveVersionAsync(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveVersionRequest(subscriptionId, resourceGroupName, configTemplateName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RemoveVersionResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RemoveVersionResult.DeserializeRemoveVersionResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove Config Template Version Resource. + /// 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 ConfigTemplate. + /// 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 RemoveVersion(string subscriptionId, string resourceGroupName, string configTemplateName, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveVersionRequest(subscriptionId, resourceGroupName, configTemplateName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RemoveVersionResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RemoveVersionResult.DeserializeRemoveVersionResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string configTemplateName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/configTemplates/", false); + uri.AppendPath(configTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, configTemplateName); + 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 Config Template Resource. + /// 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 ConfigTemplate. + /// 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 configTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(configTemplateName, nameof(configTemplateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, configTemplateName); + _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.Edge/configTemplates", 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.Edge/configTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified 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: + { + ConfigTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + ConfigTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(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.Edge/configTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/configTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List 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: + { + ConfigTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + ConfigTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(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); + return message; + } + + /// List by specified 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: + { + ConfigTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + ConfigTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(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); + return message; + } + + /// List 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: + { + ConfigTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + ConfigTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConfigTemplateListResult.DeserializeConfigTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ContextsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ContextsRestOperations.cs new file mode 100644 index 000000000000..a7391010282f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ContextsRestOperations.cs @@ -0,0 +1,722 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class ContextsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContextsRestOperations. + /// 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 ContextsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Context Resource. + /// 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 Context. + /// 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 contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeContextData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeContextData.DeserializeEdgeContextData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeContextData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Context Resource. + /// 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 Context. + /// 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 contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeContextData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeContextData.DeserializeEdgeContextData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeContextData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string contextName, EdgeContextData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, EdgeContextData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/contexts/", false); + uri.AppendPath(contextName, 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; + } + + /// Create or update Context Resource. + /// 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 Context. + /// 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 contextName, EdgeContextData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, 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 Context Resource. + /// 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 Context. + /// 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 contextName, EdgeContextData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, 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 contextName, EdgeContextPatch 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, EdgeContextPatch 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.Edge/contexts/", false); + uri.AppendPath(contextName, 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; + } + + /// update an Context Resource. + /// 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 Context. + /// 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 contextName, EdgeContextPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, 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 an Context Resource. + /// 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 Context. + /// 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 contextName, EdgeContextPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + 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.Edge/contexts", 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.Edge/contexts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified 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: + { + ContextListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContextListResult.DeserializeContextListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + ContextListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContextListResult.DeserializeContextListResult(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.Edge/contexts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/contexts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List 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: + { + ContextListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContextListResult.DeserializeContextListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + ContextListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContextListResult.DeserializeContextListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string contextName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete Context Resource. + /// 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 Context. + /// 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 contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName); + 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 Context Resource. + /// 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 Context. + /// 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 contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + 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 by specified 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: + { + ContextListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContextListResult.DeserializeContextListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + ContextListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContextListResult.DeserializeContextListResult(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); + return message; + } + + /// List 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: + { + ContextListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContextListResult.DeserializeContextListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + ContextListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContextListResult.DeserializeContextListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DiagnosticsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DiagnosticsRestOperations.cs new file mode 100644 index 000000000000..f22e7964b622 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DiagnosticsRestOperations.cs @@ -0,0 +1,722 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class DiagnosticsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DiagnosticsRestOperations. + /// 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 DiagnosticsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string diagnosticName) + { + 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string diagnosticName) + { + 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of specified Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, diagnosticName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDiagnosticData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDiagnosticData.DeserializeEdgeDiagnosticData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDiagnosticData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of specified Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, diagnosticName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDiagnosticData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDiagnosticData.DeserializeEdgeDiagnosticData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDiagnosticData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string diagnosticName, EdgeDiagnosticData 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string diagnosticName, EdgeDiagnosticData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, 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 new or updates existing Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, EdgeDiagnosticData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, diagnosticName, 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); + } + } + + /// Creates new or updates existing Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, EdgeDiagnosticData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, diagnosticName, 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 diagnosticName, EdgeDiagnosticPatch 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string diagnosticName, EdgeDiagnosticPatch 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, 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 existing Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, EdgeDiagnosticPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, diagnosticName, 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); + } + } + + /// Updates existing Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, EdgeDiagnosticPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, diagnosticName, 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 diagnosticName) + { + 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.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string diagnosticName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/diagnostics/", false); + uri.AppendPath(diagnosticName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Deletes specified Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, diagnosticName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specified Diagnostic resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Diagnostic. + /// 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 diagnosticName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(diagnosticName, nameof(diagnosticName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, diagnosticName); + _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.Edge/diagnostics", 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.Edge/diagnostics", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns a collection of Diagnostic resources within the 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: + { + DiagnosticListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticListResult.DeserializeDiagnosticListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a collection of Diagnostic resources within the 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: + { + DiagnosticListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticListResult.DeserializeDiagnosticListResult(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.Edge/diagnostics", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/diagnostics", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists Diagnostics resources within an Azure 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: + { + DiagnosticListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticListResult.DeserializeDiagnosticListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists Diagnostics resources within an Azure 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: + { + DiagnosticListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticListResult.DeserializeDiagnosticListResult(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); + return message; + } + + /// Returns a collection of Diagnostic resources within the 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: + { + DiagnosticListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticListResult.DeserializeDiagnosticListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a collection of Diagnostic resources within the 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: + { + DiagnosticListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticListResult.DeserializeDiagnosticListResult(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); + return message; + } + + /// Lists Diagnostics resources within an Azure 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: + { + DiagnosticListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticListResult.DeserializeDiagnosticListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists Diagnostics resources within an Azure 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: + { + DiagnosticListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticListResult.DeserializeDiagnosticListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DynamicSchemaVersionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DynamicSchemaVersionsRestOperations.cs new file mode 100644 index 000000000000..7b29b4deca8c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DynamicSchemaVersionsRestOperations.cs @@ -0,0 +1,664 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class DynamicSchemaVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DynamicSchemaVersionsRestOperations. + /// 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 DynamicSchemaVersionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDynamicSchemaVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDynamicSchemaVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, 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; + } + + /// Create or update a Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName, 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 Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName, 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, 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; + } + + /// update a Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// update a Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, EdgeDynamicSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDynamicSchemaVersionData.DeserializeEdgeDynamicSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, string dynamicSchemaVersionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(dynamicSchemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + 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 Dynamic Schema Version Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The name of the DynamicSchemaVersion. + /// 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 schemaName, string dynamicSchemaName, string dynamicSchemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaVersionName, nameof(dynamicSchemaVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDynamicSchemaRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByDynamicSchemaRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by Dynamic Schema. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByDynamicSchemaAsync(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateListByDynamicSchemaRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DynamicSchemaVersionListResult.DeserializeDynamicSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by Dynamic Schema. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByDynamicSchema(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateListByDynamicSchemaRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DynamicSchemaVersionListResult.DeserializeDynamicSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDynamicSchemaNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByDynamicSchemaNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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 by Dynamic Schema. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByDynamicSchemaNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateListByDynamicSchemaNextPageRequest(nextLink, subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DynamicSchemaVersionListResult.DeserializeDynamicSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by Dynamic Schema. + /// 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 Schema. + /// The name of the DynamicSchema. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByDynamicSchemaNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateListByDynamicSchemaNextPageRequest(nextLink, subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DynamicSchemaVersionListResult.DeserializeDynamicSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DynamicSchemasRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DynamicSchemasRestOperations.cs new file mode 100644 index 000000000000..1e4331bf1f87 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/DynamicSchemasRestOperations.cs @@ -0,0 +1,620 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class DynamicSchemasRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DynamicSchemasRestOperations. + /// 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 DynamicSchemasRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDynamicSchemaData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDynamicSchemaData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, EdgeDynamicSchemaData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, EdgeDynamicSchemaData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, 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; + } + + /// Create or update a DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, 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 DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, 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 schemaName, string dynamicSchemaName, EdgeDynamicSchemaData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName, EdgeDynamicSchemaData data) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, 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; + } + + /// update a DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// update a DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, EdgeDynamicSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDynamicSchemaData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDynamicSchemaData.DeserializeEdgeDynamicSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schemaName, string dynamicSchemaName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas/", false); + uri.AppendPath(dynamicSchemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + 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 DynamicSchema Resource. + /// 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 Schema. + /// The name of the DynamicSchema. + /// 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 schemaName, string dynamicSchemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(dynamicSchemaName, nameof(dynamicSchemaName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchemaRequestUri(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySchemaRequest(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/dynamicSchemas", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by Schema. + /// 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 Schema. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchemaAsync(string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaRequest(subscriptionId, resourceGroupName, schemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DynamicSchemaListResult.DeserializeDynamicSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by Schema. + /// 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 Schema. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchema(string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaRequest(subscriptionId, resourceGroupName, schemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DynamicSchemaListResult.DeserializeDynamicSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchemaNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schemaName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySchemaNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schemaName) + { + 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 by Schema. + /// 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 Schema. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchemaNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaNextPageRequest(nextLink, subscriptionId, resourceGroupName, schemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DynamicSchemaListResult.DeserializeDynamicSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by Schema. + /// 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 Schema. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchemaNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaNextPageRequest(nextLink, subscriptionId, resourceGroupName, schemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DynamicSchemaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DynamicSchemaListResult.DeserializeDynamicSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ExecutionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ExecutionsRestOperations.cs new file mode 100644 index 000000000000..5563d6bed399 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/ExecutionsRestOperations.cs @@ -0,0 +1,700 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class ExecutionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExecutionsRestOperations. + /// 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 ExecutionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeExecutionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeExecutionData.DeserializeEdgeExecutionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeExecutionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeExecutionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeExecutionData.DeserializeEdgeExecutionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeExecutionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName, EdgeExecutionData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName, EdgeExecutionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, 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; + } + + /// Create or update Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName, 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 Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName, 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 contextName, string workflowName, string versionName, string executionName, EdgeExecutionData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName, EdgeExecutionData data) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, 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; + } + + /// update an Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName, 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 an Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, EdgeExecutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName, 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 contextName, string workflowName, string versionName, string executionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, string executionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(executionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + 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 Execution Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The name of the Execution. + /// 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 contextName, string workflowName, string versionName, string executionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNullOrEmpty(executionName, nameof(executionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkflowVersionRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkflowVersionRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendPath("/executions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Execution Resources. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByWorkflowVersionAsync(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateListByWorkflowVersionRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExecutionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExecutionListResult.DeserializeExecutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Execution Resources. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkflowVersion(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateListByWorkflowVersionRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExecutionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExecutionListResult.DeserializeExecutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkflowVersionNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkflowVersionNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + 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 Execution Resources. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByWorkflowVersionNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateListByWorkflowVersionNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName, workflowName, versionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExecutionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExecutionListResult.DeserializeExecutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Execution Resources. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkflowVersionNextPage(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateListByWorkflowVersionNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName, workflowName, versionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExecutionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExecutionListResult.DeserializeExecutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/InstanceHistoriesRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/InstanceHistoriesRestOperations.cs new file mode 100644 index 000000000000..b205e22c5f0c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/InstanceHistoriesRestOperations.cs @@ -0,0 +1,361 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class InstanceHistoriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InstanceHistoriesRestOperations. + /// 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 InstanceHistoriesRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, string instanceHistoryName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(instanceHistoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, string instanceHistoryName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(instanceHistoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get InstanceHistory Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// Name of the instance history. + /// 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 targetName, string solutionName, string instanceName, string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, instanceHistoryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDeploymentInstanceHistoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDeploymentInstanceHistoryData.DeserializeEdgeDeploymentInstanceHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDeploymentInstanceHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get InstanceHistory Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// Name of the instance history. + /// 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 targetName, string solutionName, string instanceName, string instanceHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(instanceHistoryName, nameof(instanceHistoryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, instanceHistoryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDeploymentInstanceHistoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDeploymentInstanceHistoryData.DeserializeEdgeDeploymentInstanceHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDeploymentInstanceHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/histories", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByInstanceRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/histories", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List InstanceHistory Resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceAsync(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceHistoryListResult.DeserializeInstanceHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List InstanceHistory Resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByInstance(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceHistoryListResult.DeserializeInstanceHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByInstanceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + 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 InstanceHistory Resources. + /// 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. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceHistoryListResult.DeserializeInstanceHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List InstanceHistory Resources. + /// 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. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceHistoryListResult.DeserializeInstanceHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/InstancesRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/InstancesRestOperations.cs new file mode 100644 index 000000000000..0ef068144f63 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/InstancesRestOperations.cs @@ -0,0 +1,656 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class InstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InstancesRestOperations. + /// 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 InstancesRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeDeploymentInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeDeploymentInstanceData.DeserializeEdgeDeploymentInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDeploymentInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeDeploymentInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeDeploymentInstanceData.DeserializeEdgeDeploymentInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeDeploymentInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, 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; + } + + /// Create or update Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, 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 Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, 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 targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData data) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, 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; + } + + /// Update an Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, 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 an Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, EdgeDeploymentInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, 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 targetName, string solutionName, string instanceName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string instanceName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + 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 Instance Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the instance. + /// 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 targetName, string solutionName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySolutionRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySolutionRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/instances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Instance Resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListBySolutionAsync(string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionRequest(subscriptionId, resourceGroupName, targetName, solutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceListResult.DeserializeInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Instance Resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListBySolution(string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionRequest(subscriptionId, resourceGroupName, targetName, solutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceListResult.DeserializeInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySolutionNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySolutionNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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 Instance Resources. + /// 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. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListBySolutionNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName, solutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstanceListResult.DeserializeInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Instance Resources. + /// 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. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListBySolutionNextPage(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName, solutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstanceListResult.DeserializeInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/JobsRestOperations.cs new file mode 100644 index 000000000000..0932f58f4b20 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/JobsRestOperations.cs @@ -0,0 +1,277 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class JobsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of JobsRestOperations. + /// 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 JobsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string jobName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string resourceUri, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Job resource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the Job. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string resourceUri, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateGetRequest(resourceUri, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeJobData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeJobData.DeserializeEdgeJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Job resource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the Job. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string resourceUri, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateGetRequest(resourceUri, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeJobData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeJobData.DeserializeEdgeJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByTargetRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByTargetRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Jobs by parent resource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> ListByTargetAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByTargetRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = JobListResult.DeserializeJobListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Jobs by parent resource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response ListByTarget(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByTargetRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = JobListResult.DeserializeJobListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByTargetNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByTargetNextPageRequest(string nextLink, string resourceUri) + { + 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 Jobs by parent resource. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> ListByTargetNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByTargetNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = JobListResult.DeserializeJobListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Jobs by parent resource. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response ListByTargetNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByTargetNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = JobListResult.DeserializeJobListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemaReferencesRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemaReferencesRestOperations.cs new file mode 100644 index 000000000000..e2c4b7578b1f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemaReferencesRestOperations.cs @@ -0,0 +1,277 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SchemaReferencesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SchemaReferencesRestOperations. + /// 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 SchemaReferencesRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string schemaReferenceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/schemaReferences/", false); + uri.AppendPath(schemaReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string resourceUri, string schemaReferenceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/schemaReferences/", false); + uri.AppendPath(schemaReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Schema Reference Resource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the SchemaReference. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string resourceUri, string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var message = CreateGetRequest(resourceUri, schemaReferenceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaReferenceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSchemaReferenceData.DeserializeEdgeSchemaReferenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSchemaReferenceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Schema Reference Resource. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The name of the SchemaReference. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string resourceUri, string schemaReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + Argument.AssertNotNullOrEmpty(schemaReferenceName, nameof(schemaReferenceName)); + + using var message = CreateGetRequest(resourceUri, schemaReferenceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaReferenceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSchemaReferenceData.DeserializeEdgeSchemaReferenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSchemaReferenceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/schemaReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string resourceUri) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Edge/schemaReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified resource group. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public async Task> ListByResourceGroupAsync(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByResourceGroupRequest(resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchemaReferenceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaReferenceListResult.DeserializeSchemaReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified resource group. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// is null. + public Response ListByResourceGroup(string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByResourceGroupRequest(resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchemaReferenceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaReferenceListResult.DeserializeSchemaReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string resourceUri) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string resourceUri) + { + 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 by specified resource group. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceUri); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchemaReferenceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaReferenceListResult.DeserializeSchemaReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified resource group. + /// The URL to the next page of results. + /// The fully qualified Azure Resource manager identifier of the resource. + /// The cancellation token to use. + /// or is null. + public Response ListByResourceGroupNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(resourceUri, nameof(resourceUri)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceUri); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchemaReferenceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaReferenceListResult.DeserializeSchemaReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemaVersionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemaVersionsRestOperations.cs new file mode 100644 index 000000000000..eda83323685f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemaVersionsRestOperations.cs @@ -0,0 +1,620 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SchemaVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SchemaVersionsRestOperations. + /// 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 SchemaVersionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSchemaVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSchemaVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName, EdgeSchemaVersionData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName, EdgeSchemaVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, 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; + } + + /// Create or update a Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName, 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 Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName, 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 schemaName, string schemaVersionName, EdgeSchemaVersionData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName, EdgeSchemaVersionData data) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, 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; + } + + /// update a Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// update a Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, EdgeSchemaVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSchemaVersionData.DeserializeEdgeSchemaVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schemaName, string schemaVersionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + 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 Schema Version Resource. + /// 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 Schema. + /// The name of the SchemaVersion. + /// 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 schemaName, string schemaVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNullOrEmpty(schemaVersionName, nameof(schemaVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchemaRequestUri(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySchemaRequest(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified 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 Schema. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchemaAsync(string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaRequest(subscriptionId, resourceGroupName, schemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchemaVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaVersionListResult.DeserializeSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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 Schema. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchema(string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaRequest(subscriptionId, resourceGroupName, schemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchemaVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaVersionListResult.DeserializeSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchemaNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schemaName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySchemaNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schemaName) + { + 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 by specified 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 name of the Schema. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchemaNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaNextPageRequest(nextLink, subscriptionId, resourceGroupName, schemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchemaVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaVersionListResult.DeserializeSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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 name of the Schema. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchemaNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateListBySchemaNextPageRequest(nextLink, subscriptionId, resourceGroupName, schemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchemaVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaVersionListResult.DeserializeSchemaVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemasRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemasRestOperations.cs new file mode 100644 index 000000000000..b6448aa18675 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SchemasRestOperations.cs @@ -0,0 +1,926 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SchemasRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SchemasRestOperations. + /// 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 SchemasRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Schema Resource. + /// 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 Schema. + /// 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 schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSchemaData.DeserializeEdgeSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSchemaData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Schema Resource. + /// 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 Schema. + /// 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 schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSchemaData.DeserializeEdgeSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSchemaData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaData 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, 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; + } + + /// Create or update a Schema Resource. + /// 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 Schema. + /// 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 schemaName, EdgeSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, 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 Schema Resource. + /// 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 Schema. + /// 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 schemaName, EdgeSchemaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schemaName, 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 schemaName, EdgeSchemaPatch 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaPatch 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.Edge/schemas/", false); + uri.AppendPath(schemaName, 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; + } + + /// update a Schema Resource. + /// 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 Schema. + /// 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 schemaName, EdgeSchemaPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSchemaData.DeserializeEdgeSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// update a Schema Resource. + /// 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 Schema. + /// 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 schemaName, EdgeSchemaPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schemaName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSchemaData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSchemaData.DeserializeEdgeSchemaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schemaName) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schemaName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Schema Resource. + /// 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 Schema. + /// 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 schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName); + 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 Schema Resource. + /// 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 Schema. + /// 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 schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schemaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateVersionRequestUri(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaVersionWithUpdateType body) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/createVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateVersionRequest(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaVersionWithUpdateType body) + { + 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/createVersion", 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(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Schema Version Resource. + /// 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 Schema. + /// 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 CreateVersionAsync(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateVersionRequest(subscriptionId, resourceGroupName, schemaName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Schema Version Resource. + /// 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 Schema. + /// 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 CreateVersion(string subscriptionId, string resourceGroupName, string schemaName, EdgeSchemaVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateVersionRequest(subscriptionId, resourceGroupName, schemaName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveVersionRequestUri(string subscriptionId, string resourceGroupName, string schemaName, EdgeVersionContent 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/removeVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveVersionRequest(string subscriptionId, string resourceGroupName, string schemaName, EdgeVersionContent 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.Edge/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/removeVersion", 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; + } + + /// Remove Schema Version Resource. + /// 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 Schema. + /// 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> RemoveVersionAsync(string subscriptionId, string resourceGroupName, string schemaName, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveVersionRequest(subscriptionId, resourceGroupName, schemaName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RemoveVersionResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RemoveVersionResult.DeserializeRemoveVersionResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove Schema Version Resource. + /// 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 Schema. + /// 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 RemoveVersion(string subscriptionId, string resourceGroupName, string schemaName, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveVersionRequest(subscriptionId, resourceGroupName, schemaName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RemoveVersionResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RemoveVersionResult.DeserializeRemoveVersionResult(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.Edge/schemas", 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.Edge/schemas", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified 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: + { + SchemaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaListResult.DeserializeSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + SchemaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaListResult.DeserializeSchemaListResult(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.Edge/schemas", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/schemas", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List 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: + { + SchemaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaListResult.DeserializeSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + SchemaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaListResult.DeserializeSchemaListResult(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); + return message; + } + + /// List by specified 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: + { + SchemaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaListResult.DeserializeSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + SchemaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaListResult.DeserializeSchemaListResult(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); + return message; + } + + /// List 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: + { + SchemaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchemaListResult.DeserializeSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + SchemaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchemaListResult.DeserializeSchemaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SiteReferencesRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SiteReferencesRestOperations.cs new file mode 100644 index 000000000000..fec5088cdf40 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SiteReferencesRestOperations.cs @@ -0,0 +1,612 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SiteReferencesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SiteReferencesRestOperations. + /// 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 SiteReferencesRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSiteReferenceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSiteReferenceData.DeserializeEdgeSiteReferenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSiteReferenceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSiteReferenceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSiteReferenceData.DeserializeEdgeSiteReferenceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSiteReferenceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName, EdgeSiteReferenceData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName, EdgeSiteReferenceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, 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; + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName, 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); + } + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName, 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 contextName, string siteReferenceName, EdgeSiteReferenceData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName, EdgeSiteReferenceData data) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, 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; + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName, 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); + } + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, EdgeSiteReferenceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName, 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 contextName, string siteReferenceName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string contextName, string siteReferenceName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences/", false); + uri.AppendPath(siteReferenceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Site Reference Resource. + /// 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 Context. + /// The name of the SiteReference. + /// 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 contextName, string siteReferenceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(siteReferenceName, nameof(siteReferenceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, siteReferenceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByContextRequestUri(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByContextRequest(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/siteReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Site Reference Resources. + /// 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 Context. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByContextAsync(string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextRequest(subscriptionId, resourceGroupName, contextName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteReferenceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteReferenceListResult.DeserializeSiteReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site Reference Resources. + /// 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 Context. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByContext(string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextRequest(subscriptionId, resourceGroupName, contextName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteReferenceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteReferenceListResult.DeserializeSiteReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByContextNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string contextName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByContextNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string contextName) + { + 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 Site Reference Resources. + /// 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 Context. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByContextNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteReferenceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteReferenceListResult.DeserializeSiteReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site Reference Resources. + /// 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 Context. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByContextNextPage(string nextLink, string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteReferenceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteReferenceListResult.DeserializeSiteReferenceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionTemplateVersionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionTemplateVersionsRestOperations.cs new file mode 100644 index 000000000000..1be3cbe860fb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionTemplateVersionsRestOperations.cs @@ -0,0 +1,519 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SolutionTemplateVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SolutionTemplateVersionsRestOperations. + /// 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 SolutionTemplateVersionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionTemplateVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionTemplateVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Solution Template Version Resource. + /// 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 SolutionTemplate. + /// The name of the SolutionTemplateVersion. + /// 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 solutionTemplateName, string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionTemplateVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSolutionTemplateVersionData.DeserializeEdgeSolutionTemplateVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionTemplateVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Solution Template Version Resource. + /// 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 SolutionTemplate. + /// The name of the SolutionTemplateVersion. + /// 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 solutionTemplateName, string solutionTemplateVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionTemplateVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSolutionTemplateVersionData.DeserializeEdgeSolutionTemplateVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionTemplateVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySolutionTemplateRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySolutionTemplateRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Solution Template Version Resources. + /// 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 SolutionTemplate. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySolutionTemplateAsync(string subscriptionId, string resourceGroupName, string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateListBySolutionTemplateRequest(subscriptionId, resourceGroupName, solutionTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SolutionTemplateVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionTemplateVersionListResult.DeserializeSolutionTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Solution Template Version Resources. + /// 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 SolutionTemplate. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySolutionTemplate(string subscriptionId, string resourceGroupName, string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateListBySolutionTemplateRequest(subscriptionId, resourceGroupName, solutionTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SolutionTemplateVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionTemplateVersionListResult.DeserializeSolutionTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateBulkDeploySolutionRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkDeploySolutionContent 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionTemplateVersionName, true); + uri.AppendPath("/bulkDeploySolution", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateBulkDeploySolutionRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkDeploySolutionContent 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionTemplateVersionName, true); + uri.AppendPath("/bulkDeploySolution", 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; + } + + /// Post request for bulk deploy. + /// 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 SolutionTemplate. + /// The name of the SolutionTemplateVersion. + /// 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 BulkDeploySolutionAsync(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkDeploySolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBulkDeploySolutionRequest(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Post request for bulk deploy. + /// 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 SolutionTemplate. + /// The name of the SolutionTemplateVersion. + /// 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 BulkDeploySolution(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkDeploySolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBulkDeploySolutionRequest(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateBulkPublishSolutionRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkPublishSolutionContent 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionTemplateVersionName, true); + uri.AppendPath("/bulkPublishSolution", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateBulkPublishSolutionRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkPublishSolutionContent 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionTemplateVersionName, true); + uri.AppendPath("/bulkPublishSolution", 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; + } + + /// Post request for bulk publish. + /// 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 SolutionTemplate. + /// The name of the SolutionTemplateVersion. + /// 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 BulkPublishSolutionAsync(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkPublishSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBulkPublishSolutionRequest(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Post request for bulk publish. + /// 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 SolutionTemplate. + /// The name of the SolutionTemplateVersion. + /// 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 BulkPublishSolution(string subscriptionId, string resourceGroupName, string solutionTemplateName, string solutionTemplateVersionName, BulkPublishSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNullOrEmpty(solutionTemplateVersionName, nameof(solutionTemplateVersionName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBulkPublishSolutionRequest(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySolutionTemplateNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySolutionTemplateNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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 Solution Template Version Resources. + /// 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 SolutionTemplate. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySolutionTemplateNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateListBySolutionTemplateNextPageRequest(nextLink, subscriptionId, resourceGroupName, solutionTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SolutionTemplateVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionTemplateVersionListResult.DeserializeSolutionTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Solution Template Version Resources. + /// 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 SolutionTemplate. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySolutionTemplateNextPage(string nextLink, string subscriptionId, string resourceGroupName, string solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateListBySolutionTemplateNextPageRequest(nextLink, subscriptionId, resourceGroupName, solutionTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SolutionTemplateVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionTemplateVersionListResult.DeserializeSolutionTemplateVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionTemplatesRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionTemplatesRestOperations.cs new file mode 100644 index 000000000000..2fbec496885c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionTemplatesRestOperations.cs @@ -0,0 +1,915 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SolutionTemplatesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SolutionTemplatesRestOperations. + /// 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 SolutionTemplatesRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, solutionTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionTemplateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionTemplateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, solutionTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionTemplateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionTemplateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplateData 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplateData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, 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; + } + + /// Create or update a Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, EdgeSolutionTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, solutionTemplateName, 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 Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, EdgeSolutionTemplateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, solutionTemplateName, 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 solutionTemplateName, EdgeSolutionTemplatePatch 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplatePatch 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, 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; + } + + /// update a Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, EdgeSolutionTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, solutionTemplateName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionTemplateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// update a Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, EdgeSolutionTemplatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, solutionTemplateName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionTemplateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSolutionTemplateData.DeserializeEdgeSolutionTemplateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateVersionRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplateVersionWithUpdateType body) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/createVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateVersionRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplateVersionWithUpdateType body) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/createVersion", 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(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Solution Template Version Resource. + /// 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 SolutionTemplate. + /// 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 CreateVersionAsync(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateVersionRequest(subscriptionId, resourceGroupName, solutionTemplateName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Solution Template Version Resource. + /// 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 SolutionTemplate. + /// 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 CreateVersion(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeSolutionTemplateVersionWithUpdateType body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateVersionRequest(subscriptionId, resourceGroupName, solutionTemplateName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveVersionRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeVersionContent 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/removeVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveVersionRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeVersionContent 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendPath("/removeVersion", 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; + } + + /// Remove Solution Template Version Resource. + /// 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 SolutionTemplate. + /// 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 RemoveVersionAsync(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveVersionRequest(subscriptionId, resourceGroupName, solutionTemplateName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove Solution Template Version Resource. + /// 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 SolutionTemplate. + /// 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 RemoveVersion(string subscriptionId, string resourceGroupName, string solutionTemplateName, EdgeVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveVersionRequest(subscriptionId, resourceGroupName, solutionTemplateName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string solutionTemplateName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/solutionTemplates/", false); + uri.AppendPath(solutionTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, solutionTemplateName); + 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 Solution Template Resource. + /// 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 SolutionTemplate. + /// 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 solutionTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(solutionTemplateName, nameof(solutionTemplateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, solutionTemplateName); + _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.Edge/solutionTemplates", 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.Edge/solutionTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified 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: + { + SolutionTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + SolutionTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(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.Edge/solutionTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/solutionTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List 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: + { + SolutionTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + SolutionTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(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); + return message; + } + + /// List by specified 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: + { + SolutionTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + SolutionTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(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); + return message; + } + + /// List 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: + { + SolutionTemplateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + SolutionTemplateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionTemplateListResult.DeserializeSolutionTemplateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionVersionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionVersionsRestOperations.cs new file mode 100644 index 000000000000..f310a9205b53 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionVersionsRestOperations.cs @@ -0,0 +1,656 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SolutionVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SolutionVersionsRestOperations. + /// 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 SolutionVersionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSolutionVersionData.DeserializeEdgeSolutionVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSolutionVersionData.DeserializeEdgeSolutionVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, 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; + } + + /// Create or update a Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName, 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 Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName, 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 targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData data) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, 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; + } + + /// Update a Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName, 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 Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, EdgeSolutionVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName, 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 targetName, string solutionName, string solutionVersionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, string solutionVersionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(solutionVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + 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 Solution Version Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// Name of the solution version. + /// 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 targetName, string solutionName, string solutionVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNullOrEmpty(solutionVersionName, nameof(solutionVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySolutionRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySolutionRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Solution Version Resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListBySolutionAsync(string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionRequest(subscriptionId, resourceGroupName, targetName, solutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SolutionVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionVersionListResult.DeserializeSolutionVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Solution Version Resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListBySolution(string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionRequest(subscriptionId, resourceGroupName, targetName, solutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SolutionVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionVersionListResult.DeserializeSolutionVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySolutionNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySolutionNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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 Solution Version Resources. + /// 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. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListBySolutionNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName, solutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SolutionVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionVersionListResult.DeserializeSolutionVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Solution Version Resources. + /// 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. + /// Name of the target. + /// Name of the solution. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListBySolutionNextPage(string nextLink, string subscriptionId, string resourceGroupName, string targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateListBySolutionNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName, solutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SolutionVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionVersionListResult.DeserializeSolutionVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionsRestOperations.cs new file mode 100644 index 000000000000..6fd1fd027fc1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/SolutionsRestOperations.cs @@ -0,0 +1,612 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class SolutionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SolutionsRestOperations. + /// 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 SolutionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Solution resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeSolutionData.DeserializeEdgeSolutionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Solution resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName, solutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeSolutionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeSolutionData.DeserializeEdgeSolutionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeSolutionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string targetName, string solutionName, EdgeSolutionData 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, EdgeSolutionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, 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; + } + + /// Create or update a Solution Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, EdgeSolutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, 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 Solution Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, EdgeSolutionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, 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 targetName, string solutionName, EdgeSolutionPatch 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName, EdgeSolutionPatch 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, 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; + } + + /// Update a Solution Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, EdgeSolutionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, 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 Solution Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, EdgeSolutionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, solutionName, 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 targetName, string solutionName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string targetName, string solutionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions/", false); + uri.AppendPath(solutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Solution Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, solutionName); + 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 Solution Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Name of the solution. + /// 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 targetName, string solutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNullOrEmpty(solutionName, nameof(solutionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, solutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByTargetRequestUri(string subscriptionId, string resourceGroupName, string targetName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByTargetRequest(string subscriptionId, string resourceGroupName, string targetName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/solutions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Solution resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByTargetAsync(string subscriptionId, string resourceGroupName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateListByTargetRequest(subscriptionId, resourceGroupName, targetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SolutionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionListResult.DeserializeSolutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Solution resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByTarget(string subscriptionId, string resourceGroupName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateListByTargetRequest(subscriptionId, resourceGroupName, targetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SolutionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionListResult.DeserializeSolutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByTargetNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string targetName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByTargetNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string targetName) + { + 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 Solution resources. + /// 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. + /// Name of the target. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByTargetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateListByTargetNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SolutionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SolutionListResult.DeserializeSolutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Solution resources. + /// 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. + /// Name of the target. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByTargetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateListByTargetNextPageRequest(nextLink, subscriptionId, resourceGroupName, targetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SolutionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SolutionListResult.DeserializeSolutionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/TargetsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/TargetsRestOperations.cs new file mode 100644 index 000000000000..1b2ba18e260a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/TargetsRestOperations.cs @@ -0,0 +1,1381 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class TargetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of TargetsRestOperations. + /// 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 TargetsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string targetName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string targetName) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeTargetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeTargetData.DeserializeEdgeTargetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeTargetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, targetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeTargetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeTargetData.DeserializeEdgeTargetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeTargetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string targetName, EdgeTargetData 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, EdgeTargetData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/targets/", false); + uri.AppendPath(targetName, 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; + } + + /// Create or update a Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 targetName, EdgeTargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, 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 Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 targetName, EdgeTargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, targetName, 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 targetName, EdgeTargetPatch 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string targetName, EdgeTargetPatch 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.Edge/targets/", false); + uri.AppendPath(targetName, 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; + } + + /// update a Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 targetName, EdgeTargetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, 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 Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 targetName, EdgeTargetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, targetName, 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 targetName, bool? forceDelete) + { + 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (forceDelete != null) + { + uri.AppendQuery("forceDelete", forceDelete.Value, true); + } + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string targetName, bool? forceDelete) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (forceDelete != null) + { + uri.AppendQuery("forceDelete", forceDelete.Value, true); + } + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Force delete. + /// 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 targetName, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, forceDelete); + 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 Target Resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// Force delete. + /// 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 targetName, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, targetName, forceDelete); + _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.Edge/targets", 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.Edge/targets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List by specified 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: + { + TargetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + TargetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetListResult.DeserializeTargetListResult(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.Edge/targets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(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.Edge/targets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List 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: + { + TargetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + TargetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateInstallSolutionRequestUri(string subscriptionId, string resourceGroupName, string targetName, InstallSolutionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/installSolution", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateInstallSolutionRequest(string subscriptionId, string resourceGroupName, string targetName, InstallSolutionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/installSolution", 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; + } + + /// Post request to deploy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 InstallSolutionAsync(string subscriptionId, string resourceGroupName, string targetName, InstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateInstallSolutionRequest(subscriptionId, resourceGroupName, targetName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Post request to deploy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 InstallSolution(string subscriptionId, string resourceGroupName, string targetName, InstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateInstallSolutionRequest(subscriptionId, resourceGroupName, targetName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUninstallSolutionRequestUri(string subscriptionId, string resourceGroupName, string targetName, UninstallSolutionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/uninstallSolution", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUninstallSolutionRequest(string subscriptionId, string resourceGroupName, string targetName, UninstallSolutionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/uninstallSolution", 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; + } + + /// Post request to uninstall. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 UninstallSolutionAsync(string subscriptionId, string resourceGroupName, string targetName, UninstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUninstallSolutionRequest(subscriptionId, resourceGroupName, targetName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Post request to uninstall. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 UninstallSolution(string subscriptionId, string resourceGroupName, string targetName, UninstallSolutionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUninstallSolutionRequest(subscriptionId, resourceGroupName, targetName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveRevisionRequestUri(string subscriptionId, string resourceGroupName, string targetName, RemoveRevisionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/removeRevision", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveRevisionRequest(string subscriptionId, string resourceGroupName, string targetName, RemoveRevisionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/removeRevision", 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; + } + + /// Post request to remove solution version revision. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 RemoveRevisionAsync(string subscriptionId, string resourceGroupName, string targetName, RemoveRevisionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveRevisionRequest(subscriptionId, resourceGroupName, targetName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Post request to remove solution version revision. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 RemoveRevision(string subscriptionId, string resourceGroupName, string targetName, RemoveRevisionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRemoveRevisionRequest(subscriptionId, resourceGroupName, targetName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateResolveConfigurationRequestUri(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/resolveConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResolveConfigurationRequest(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/resolveConfiguration", 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; + } + + /// Post request to resolve configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 ResolveConfigurationAsync(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResolveConfigurationRequest(subscriptionId, resourceGroupName, targetName, 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); + } + } + + /// Post request to resolve configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 ResolveConfiguration(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResolveConfigurationRequest(subscriptionId, resourceGroupName, targetName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReviewSolutionVersionRequestUri(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/reviewSolutionVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReviewSolutionVersionRequest(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/reviewSolutionVersion", 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; + } + + /// Post request to review configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 ReviewSolutionVersionAsync(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateReviewSolutionVersionRequest(subscriptionId, resourceGroupName, targetName, 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); + } + } + + /// Post request to review configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 ReviewSolutionVersion(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionTemplateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateReviewSolutionVersionRequest(subscriptionId, resourceGroupName, targetName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePublishSolutionVersionRequestUri(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionVersionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/publishSolutionVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePublishSolutionVersionRequest(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionVersionContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/publishSolutionVersion", 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; + } + + /// Post request to publish. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 PublishSolutionVersionAsync(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePublishSolutionVersionRequest(subscriptionId, resourceGroupName, targetName, 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); + } + } + + /// Post request to publish. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 PublishSolutionVersion(string subscriptionId, string resourceGroupName, string targetName, EdgeSolutionVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePublishSolutionVersionRequest(subscriptionId, resourceGroupName, targetName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateExternalValidationStatusRequestUri(string subscriptionId, string resourceGroupName, string targetName, UpdateExternalValidationStatusContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/updateExternalValidationStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateExternalValidationStatusRequest(string subscriptionId, string resourceGroupName, string targetName, UpdateExternalValidationStatusContent 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.Edge/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendPath("/updateExternalValidationStatus", 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; + } + + /// Post request to update external validation status. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 UpdateExternalValidationStatusAsync(string subscriptionId, string resourceGroupName, string targetName, UpdateExternalValidationStatusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateExternalValidationStatusRequest(subscriptionId, resourceGroupName, targetName, 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); + } + } + + /// Post request to update external validation status. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the target. + /// 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 UpdateExternalValidationStatus(string subscriptionId, string resourceGroupName, string targetName, UpdateExternalValidationStatusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateExternalValidationStatusRequest(subscriptionId, resourceGroupName, targetName, 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 by specified 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: + { + TargetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List by specified 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: + { + TargetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetListResult.DeserializeTargetListResult(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); + return message; + } + + /// List 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: + { + TargetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List 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: + { + TargetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs new file mode 100644 index 000000000000..6aa95044d31a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs @@ -0,0 +1,656 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class WorkflowVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowVersionsRestOperations. + /// 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 WorkflowVersionsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Workflow Version Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeWorkflowVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeWorkflowVersionData.DeserializeEdgeWorkflowVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeWorkflowVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Workflow Version Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeWorkflowVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeWorkflowVersionData.DeserializeEdgeWorkflowVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeWorkflowVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, EdgeWorkflowVersionData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, EdgeWorkflowVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, 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; + } + + /// Create or update a Workflow Version Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, 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 Workflow Version Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, 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 contextName, string workflowName, string versionName, EdgeWorkflowVersionData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName, EdgeWorkflowVersionData data) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, 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; + } + + /// update an WorkflowVersion Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, 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 an WorkflowVersion Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, EdgeWorkflowVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName, 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 contextName, string workflowName, string versionName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, string versionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Workflow Version Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + 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 Workflow Version Resource. + /// 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 Context. + /// Name of the workflow. + /// The name of the workflowVersion. + /// 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 contextName, string workflowName, string versionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionName, nameof(versionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkflowRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkflowRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Workflow Version Resources. + /// 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 Context. + /// Name of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByWorkflowAsync(string subscriptionId, string resourceGroupName, string contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListByWorkflowRequest(subscriptionId, resourceGroupName, contextName, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Workflow Version Resources. + /// 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 Context. + /// Name of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkflow(string subscriptionId, string resourceGroupName, string contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListByWorkflowRequest(subscriptionId, resourceGroupName, contextName, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkflowNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkflowNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + 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 Workflow Version Resources. + /// 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 Context. + /// Name of the workflow. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByWorkflowNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListByWorkflowNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Workflow Version Resources. + /// 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 Context. + /// Name of the workflow. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkflowNextPage(string nextLink, string subscriptionId, string resourceGroupName, string contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListByWorkflowNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/WorkflowsRestOperations.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/WorkflowsRestOperations.cs new file mode 100644 index 000000000000..c1e9fac01c33 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Generated/RestOperations/WorkflowsRestOperations.cs @@ -0,0 +1,612 @@ +// 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.WorkloadOrchestration.Models; + +namespace Azure.ResourceManager.WorkloadOrchestration +{ + internal partial class WorkflowsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowsRestOperations. + /// 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 WorkflowsRestOperations(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-06-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeWorkflowData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeWorkflowData.DeserializeEdgeWorkflowData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeWorkflowData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, contextName, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeWorkflowData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeWorkflowData.DeserializeEdgeWorkflowData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeWorkflowData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string contextName, string workflowName, EdgeWorkflowData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, EdgeWorkflowData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, 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; + } + + /// Create or update a Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, 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 Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, 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 contextName, string workflowName, EdgeWorkflowData 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName, EdgeWorkflowData data) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, 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; + } + + /// update a Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, 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 Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, EdgeWorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, contextName, workflowName, 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 contextName, string workflowName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string contextName, string workflowName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete a Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, workflowName); + 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 Workflow resource. + /// 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 Context. + /// Name of the workflow. + /// 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 contextName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, contextName, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByContextRequestUri(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByContextRequest(string subscriptionId, string resourceGroupName, string contextName) + { + 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.Edge/contexts/", false); + uri.AppendPath(contextName, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Workflow resources. + /// 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 Context. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByContextAsync(string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextRequest(subscriptionId, resourceGroupName, contextName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkflowListResult.DeserializeWorkflowListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Workflow resources. + /// 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 Context. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByContext(string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextRequest(subscriptionId, resourceGroupName, contextName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkflowListResult.DeserializeWorkflowListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByContextNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string contextName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByContextNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string contextName) + { + 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 Workflow resources. + /// 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 Context. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByContextNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkflowListResult.DeserializeWorkflowListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Workflow resources. + /// 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 Context. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByContextNextPage(string nextLink, string subscriptionId, string resourceGroupName, string contextName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(contextName, nameof(contextName)); + + using var message = CreateListByContextNextPageRequest(nextLink, subscriptionId, resourceGroupName, contextName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkflowListResult.DeserializeWorkflowListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Properties/AssemblyInfo.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..de18dafce2c8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Edge")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.WorkloadOrchestration.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Azure.ResourceManager.WorkloadOrchestration.Tests.csproj b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Azure.ResourceManager.WorkloadOrchestration.Tests.csproj new file mode 100644 index 000000000000..d46b27964a19 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Azure.ResourceManager.WorkloadOrchestration.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + + + + + + + + + PreserveNewest + + + + + + + diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateCollection.cs new file mode 100644 index 000000000000..ba235e24a739 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateCollection.cs @@ -0,0 +1,200 @@ +// 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 Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeConfigTemplateCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ConfigTemplatesCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeConfigTemplateResource + EdgeConfigTemplateCollection collection = resourceGroupResource.GetEdgeConfigTemplates(); + + // invoke the operation + string configTemplateName = "testname"; + EdgeConfigTemplateData data = new EdgeConfigTemplateData(new AzureLocation("egqjo")) + { + Properties = new EdgeConfigTemplateProperties("ccdyggozwmhyvemlcwlsnhijwg"), + Tags = +{ +["key6936"] = "vnqujuvnbxonbsgb" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configTemplateName, data); + EdgeConfigTemplateResource 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 + EdgeConfigTemplateData 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_ConfigTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeConfigTemplateResource + EdgeConfigTemplateCollection collection = resourceGroupResource.GetEdgeConfigTemplates(); + + // invoke the operation + string configTemplateName = "testname"; + EdgeConfigTemplateResource result = await collection.GetAsync(configTemplateName); + + // 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 + EdgeConfigTemplateData 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_ConfigTemplatesListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeConfigTemplateResource + EdgeConfigTemplateCollection collection = resourceGroupResource.GetEdgeConfigTemplates(); + + // invoke the operation and iterate over the result + await foreach (EdgeConfigTemplateResource 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 + EdgeConfigTemplateData 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_ConfigTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeConfigTemplateResource + EdgeConfigTemplateCollection collection = resourceGroupResource.GetEdgeConfigTemplates(); + + // invoke the operation + string configTemplateName = "testname"; + bool result = await collection.ExistsAsync(configTemplateName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ConfigTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeConfigTemplateResource + EdgeConfigTemplateCollection collection = resourceGroupResource.GetEdgeConfigTemplates(); + + // invoke the operation + string configTemplateName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(configTemplateName); + EdgeConfigTemplateResource 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 + EdgeConfigTemplateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateResource.cs new file mode 100644 index 000000000000..acb410307021 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateResource.cs @@ -0,0 +1,179 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeConfigTemplateResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ConfigTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // invoke the operation + EdgeConfigTemplateResource result = await edgeConfigTemplate.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 + EdgeConfigTemplateData 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_ConfigTemplatesDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // invoke the operation + await edgeConfigTemplate.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ConfigTemplatesUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_Update_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // invoke the operation + EdgeConfigTemplatePatch patch = new EdgeConfigTemplatePatch + { + Tags = +{ +["key7701"] = "wrsv" +}, + ConfigTemplateUpdateDescription = "cavjiqnrbzsvedicrixhwnfj", + }; + EdgeConfigTemplateResource result = await edgeConfigTemplate.UpdateAsync(patch); + + // 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 + EdgeConfigTemplateData 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 CreateVersion_ConfigTemplatesCreateVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_CreateVersion_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplates_CreateVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // invoke the operation + ConfigTemplateVersionWithUpdateType body = new ConfigTemplateVersionWithUpdateType(new EdgeConfigTemplateVersionData + { + Properties = new EdgeConfigTemplateVersionProperties("rgricnhvcbqykc"), + }) + { + UpdateType = EdgeUpdateType.Major, + Version = "1.0.0", + }; + ArmOperation lro = await edgeConfigTemplate.CreateVersionAsync(WaitUntil.Completed, body); + EdgeConfigTemplateVersionResource 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 + EdgeConfigTemplateVersionData 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 RemoveVersion_ConfigTemplatesRemoveVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_RemoveVersion_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplates_RemoveVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // invoke the operation + EdgeVersionContent content = new EdgeVersionContent("ghtvdzgmzncaifrnuumg"); + RemoveVersionResult result = await edgeConfigTemplate.RemoveVersionAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateVersionCollection.cs new file mode 100644 index 000000000000..252a68c2e097 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateVersionCollection.cs @@ -0,0 +1,160 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeConfigTemplateVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ConfigTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplateVersion_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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // get the collection of this EdgeConfigTemplateVersionResource + EdgeConfigTemplateVersionCollection collection = edgeConfigTemplate.GetEdgeConfigTemplateVersions(); + + // invoke the operation + string configTemplateVersionName = "1.0.0"; + EdgeConfigTemplateVersionResource result = await collection.GetAsync(configTemplateVersionName); + + // 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 + EdgeConfigTemplateVersionData 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_ConfigTemplateVersionsListByConfigTemplateMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplateVersions_ListByConfigTemplate_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplateVersion_ListByConfigTemplate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // get the collection of this EdgeConfigTemplateVersionResource + EdgeConfigTemplateVersionCollection collection = edgeConfigTemplate.GetEdgeConfigTemplateVersions(); + + // invoke the operation and iterate over the result + await foreach (EdgeConfigTemplateVersionResource 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 + EdgeConfigTemplateVersionData 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_ConfigTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplateVersion_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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // get the collection of this EdgeConfigTemplateVersionResource + EdgeConfigTemplateVersionCollection collection = edgeConfigTemplate.GetEdgeConfigTemplateVersions(); + + // invoke the operation + string configTemplateVersionName = "1.0.0"; + bool result = await collection.ExistsAsync(configTemplateVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ConfigTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplateVersion_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 EdgeConfigTemplateResource created on azure + // for more information of creating EdgeConfigTemplateResource, please refer to the document of EdgeConfigTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + ResourceIdentifier edgeConfigTemplateResourceId = EdgeConfigTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName); + EdgeConfigTemplateResource edgeConfigTemplate = client.GetEdgeConfigTemplateResource(edgeConfigTemplateResourceId); + + // get the collection of this EdgeConfigTemplateVersionResource + EdgeConfigTemplateVersionCollection collection = edgeConfigTemplate.GetEdgeConfigTemplateVersions(); + + // invoke the operation + string configTemplateVersionName = "1.0.0"; + NullableResponse response = await collection.GetIfExistsAsync(configTemplateVersionName); + EdgeConfigTemplateVersionResource 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 + EdgeConfigTemplateVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateVersionResource.cs new file mode 100644 index 000000000000..7f80c7b8eb95 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeConfigTemplateVersionResource.cs @@ -0,0 +1,49 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeConfigTemplateVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ConfigTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplateVersion_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 EdgeConfigTemplateVersionResource created on azure + // for more information of creating EdgeConfigTemplateVersionResource, please refer to the document of EdgeConfigTemplateVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string configTemplateName = "testname"; + string configTemplateVersionName = "1.0.0"; + ResourceIdentifier edgeConfigTemplateVersionResourceId = EdgeConfigTemplateVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, configTemplateName, configTemplateVersionName); + EdgeConfigTemplateVersionResource edgeConfigTemplateVersion = client.GetEdgeConfigTemplateVersionResource(edgeConfigTemplateVersionResourceId); + + // invoke the operation + EdgeConfigTemplateVersionResource result = await edgeConfigTemplateVersion.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 + EdgeConfigTemplateVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeContextCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeContextCollection.cs new file mode 100644 index 000000000000..65b8870a7ad8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeContextCollection.cs @@ -0,0 +1,209 @@ +// 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 Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeContextCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ContextsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeContextResource + EdgeContextCollection collection = resourceGroupResource.GetEdgeContexts(); + + // invoke the operation + string contextName = "testname"; + EdgeContextData data = new EdgeContextData(new AzureLocation("pkquwbplcp")) + { + Properties = new EdgeContextProperties(new ContextCapability[] + { +new ContextCapability("tpylinjcmlnycfpofpxjtqmt", "banbenutsngwytoqh") +{ +State = EdgeResourceState.Active, +} + }, new ContextHierarchy[] + { +new ContextHierarchy("upqe", "vg") + }), + Tags = +{ +["key3046"] = "clcnhzwypk" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, contextName, data); + EdgeContextResource 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 + EdgeContextData 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_ContextsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeContextResource + EdgeContextCollection collection = resourceGroupResource.GetEdgeContexts(); + + // invoke the operation + string contextName = "testname"; + EdgeContextResource result = await collection.GetAsync(contextName); + + // 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 + EdgeContextData 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_ContextsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeContextResource + EdgeContextCollection collection = resourceGroupResource.GetEdgeContexts(); + + // invoke the operation and iterate over the result + await foreach (EdgeContextResource 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 + EdgeContextData 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_ContextsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeContextResource + EdgeContextCollection collection = resourceGroupResource.GetEdgeContexts(); + + // invoke the operation + string contextName = "testname"; + bool result = await collection.ExistsAsync(contextName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ContextsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeContextResource + EdgeContextCollection collection = resourceGroupResource.GetEdgeContexts(); + + // invoke the operation + string contextName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(contextName); + EdgeContextResource 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 + EdgeContextData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeContextResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeContextResource.cs new file mode 100644 index 000000000000..cb62ea9a82ce --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeContextResource.cs @@ -0,0 +1,121 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeContextResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ContextsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // invoke the operation + EdgeContextResource result = await edgeContext.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 + EdgeContextData 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_ContextsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // invoke the operation + await edgeContext.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ContextsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // invoke the operation + EdgeContextPatch patch = new EdgeContextPatch + { + Tags = +{ +["key9545"] = "dhxykbzgliyqxxizttbjhuruhhv" +}, + Properties = new EdgeContextPatchProperties + { + Capabilities = {new ContextCapability("tpylinjcmlnycfpofpxjtqmt", "banbenutsngwytoqh") +{ +State = EdgeResourceState.Active, +}}, + Hierarchies = { new ContextHierarchy("upqe", "vg") }, + }, + }; + ArmOperation lro = await edgeContext.UpdateAsync(WaitUntil.Completed, patch); + EdgeContextResource 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 + EdgeContextData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceCollection.cs new file mode 100644 index 000000000000..55d33bd5e358 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceCollection.cs @@ -0,0 +1,215 @@ +// 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.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDeploymentInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstancesCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeDeploymentInstanceResource + EdgeDeploymentInstanceCollection collection = edgeSolution.GetEdgeDeploymentInstances(); + + // invoke the operation + string instanceName = "testname"; + EdgeDeploymentInstanceData data = new EdgeDeploymentInstanceData + { + Properties = new EdgeDeploymentInstanceProperties("acpddbkfclsgxg", "eguutiftuxrsavvckjrv") + { + ActiveState = InstanceActiveState.Active, + ReconciliationPolicy = new InstanceReconciliationPolicy(InstanceReconciliationState.Inactive, "szucgzdbydcowvhprhx"), + SolutionScope = "testname", + }, + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, instanceName, data); + EdgeDeploymentInstanceResource 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 + EdgeDeploymentInstanceData 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_InstancesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeDeploymentInstanceResource + EdgeDeploymentInstanceCollection collection = edgeSolution.GetEdgeDeploymentInstances(); + + // invoke the operation + string instanceName = "testname"; + EdgeDeploymentInstanceResource result = await collection.GetAsync(instanceName); + + // 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 + EdgeDeploymentInstanceData 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_InstancesListBySolutionMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_ListBySolution_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_ListBySolution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeDeploymentInstanceResource + EdgeDeploymentInstanceCollection collection = edgeSolution.GetEdgeDeploymentInstances(); + + // invoke the operation and iterate over the result + await foreach (EdgeDeploymentInstanceResource 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 + EdgeDeploymentInstanceData 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_InstancesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeDeploymentInstanceResource + EdgeDeploymentInstanceCollection collection = edgeSolution.GetEdgeDeploymentInstances(); + + // invoke the operation + string instanceName = "testname"; + bool result = await collection.ExistsAsync(instanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_InstancesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeDeploymentInstanceResource + EdgeDeploymentInstanceCollection collection = edgeSolution.GetEdgeDeploymentInstances(); + + // invoke the operation + string instanceName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(instanceName); + EdgeDeploymentInstanceResource 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 + EdgeDeploymentInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceHistoryCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceHistoryCollection.cs new file mode 100644 index 000000000000..b71bd6d18e00 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceHistoryCollection.cs @@ -0,0 +1,168 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDeploymentInstanceHistoryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_InstanceHistoriesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/InstanceHistories_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceHistory_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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // get the collection of this EdgeDeploymentInstanceHistoryResource + EdgeDeploymentInstanceHistoryCollection collection = edgeDeploymentInstance.GetEdgeDeploymentInstanceHistories(); + + // invoke the operation + string instanceHistoryName = "testname"; + EdgeDeploymentInstanceHistoryResource result = await collection.GetAsync(instanceHistoryName); + + // 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 + EdgeDeploymentInstanceHistoryData 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_InstanceHistoriesListByInstanceMaximumSet() + { + // Generated from example definition: 2025-06-01/InstanceHistories_ListByInstance_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceHistory_ListByInstance" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // get the collection of this EdgeDeploymentInstanceHistoryResource + EdgeDeploymentInstanceHistoryCollection collection = edgeDeploymentInstance.GetEdgeDeploymentInstanceHistories(); + + // invoke the operation and iterate over the result + await foreach (EdgeDeploymentInstanceHistoryResource 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 + EdgeDeploymentInstanceHistoryData 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_InstanceHistoriesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/InstanceHistories_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceHistory_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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // get the collection of this EdgeDeploymentInstanceHistoryResource + EdgeDeploymentInstanceHistoryCollection collection = edgeDeploymentInstance.GetEdgeDeploymentInstanceHistories(); + + // invoke the operation + string instanceHistoryName = "testname"; + bool result = await collection.ExistsAsync(instanceHistoryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_InstanceHistoriesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/InstanceHistories_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceHistory_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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // get the collection of this EdgeDeploymentInstanceHistoryResource + EdgeDeploymentInstanceHistoryCollection collection = edgeDeploymentInstance.GetEdgeDeploymentInstanceHistories(); + + // invoke the operation + string instanceHistoryName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(instanceHistoryName); + EdgeDeploymentInstanceHistoryResource 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 + EdgeDeploymentInstanceHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceHistoryResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceHistoryResource.cs new file mode 100644 index 000000000000..cc40ccbc7f3d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceHistoryResource.cs @@ -0,0 +1,51 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDeploymentInstanceHistoryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_InstanceHistoriesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/InstanceHistories_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InstanceHistory_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 EdgeDeploymentInstanceHistoryResource created on azure + // for more information of creating EdgeDeploymentInstanceHistoryResource, please refer to the document of EdgeDeploymentInstanceHistoryResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + string instanceHistoryName = "testname"; + ResourceIdentifier edgeDeploymentInstanceHistoryResourceId = EdgeDeploymentInstanceHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName, instanceHistoryName); + EdgeDeploymentInstanceHistoryResource edgeDeploymentInstanceHistory = client.GetEdgeDeploymentInstanceHistoryResource(edgeDeploymentInstanceHistoryResourceId); + + // invoke the operation + EdgeDeploymentInstanceHistoryResource result = await edgeDeploymentInstanceHistory.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 + EdgeDeploymentInstanceHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceResource.cs new file mode 100644 index 000000000000..40894d137778 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDeploymentInstanceResource.cs @@ -0,0 +1,121 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDeploymentInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_InstancesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // invoke the operation + EdgeDeploymentInstanceResource result = await edgeDeploymentInstance.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 + EdgeDeploymentInstanceData 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_InstancesDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // invoke the operation + await edgeDeploymentInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_InstancesUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Instances_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Instance_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 EdgeDeploymentInstanceResource created on azure + // for more information of creating EdgeDeploymentInstanceResource, please refer to the document of EdgeDeploymentInstanceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string instanceName = "testname"; + ResourceIdentifier edgeDeploymentInstanceResourceId = EdgeDeploymentInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, instanceName); + EdgeDeploymentInstanceResource edgeDeploymentInstance = client.GetEdgeDeploymentInstanceResource(edgeDeploymentInstanceResourceId); + + // invoke the operation + EdgeDeploymentInstanceData data = new EdgeDeploymentInstanceData + { + Properties = new EdgeDeploymentInstanceProperties("vrpzlamkvanqibtjarpxit", "tqkdvc") + { + ActiveState = InstanceActiveState.Active, + ReconciliationPolicy = new InstanceReconciliationPolicy(InstanceReconciliationState.Inactive, "cmzlrjwnlshnkgv"), + SolutionScope = "testname", + }, + }; + ArmOperation lro = await edgeDeploymentInstance.UpdateAsync(WaitUntil.Completed, data); + EdgeDeploymentInstanceResource 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 + EdgeDeploymentInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDiagnosticCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDiagnosticCollection.cs new file mode 100644 index 000000000000..168f6a8b4534 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDiagnosticCollection.cs @@ -0,0 +1,203 @@ +// 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 Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDiagnosticCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DiagnosticsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeDiagnosticResource + EdgeDiagnosticCollection collection = resourceGroupResource.GetEdgeDiagnostics(); + + // invoke the operation + string diagnosticName = "testname"; + EdgeDiagnosticData data = new EdgeDiagnosticData(new AzureLocation("ouwfvnokjvivmjzqpupwrbsmls")) + { + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + Tags = +{ +["key4304"] = "mdrwpsdrcicagvximokxrrp" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diagnosticName, data); + EdgeDiagnosticResource 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 + EdgeDiagnosticData 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_DiagnosticsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeDiagnosticResource + EdgeDiagnosticCollection collection = resourceGroupResource.GetEdgeDiagnostics(); + + // invoke the operation + string diagnosticName = "testname"; + EdgeDiagnosticResource result = await collection.GetAsync(diagnosticName); + + // 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 + EdgeDiagnosticData 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_DiagnosticsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeDiagnosticResource + EdgeDiagnosticCollection collection = resourceGroupResource.GetEdgeDiagnostics(); + + // invoke the operation and iterate over the result + await foreach (EdgeDiagnosticResource 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 + EdgeDiagnosticData 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_DiagnosticsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeDiagnosticResource + EdgeDiagnosticCollection collection = resourceGroupResource.GetEdgeDiagnostics(); + + // invoke the operation + string diagnosticName = "testname"; + bool result = await collection.ExistsAsync(diagnosticName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DiagnosticsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeDiagnosticResource + EdgeDiagnosticCollection collection = resourceGroupResource.GetEdgeDiagnostics(); + + // invoke the operation + string diagnosticName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(diagnosticName); + EdgeDiagnosticResource 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 + EdgeDiagnosticData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDiagnosticResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDiagnosticResource.cs new file mode 100644 index 000000000000..e3d0f2c2ede1 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDiagnosticResource.cs @@ -0,0 +1,114 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDiagnosticResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DiagnosticsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 EdgeDiagnosticResource created on azure + // for more information of creating EdgeDiagnosticResource, please refer to the document of EdgeDiagnosticResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string diagnosticName = "testname"; + ResourceIdentifier edgeDiagnosticResourceId = EdgeDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, diagnosticName); + EdgeDiagnosticResource edgeDiagnostic = client.GetEdgeDiagnosticResource(edgeDiagnosticResourceId); + + // invoke the operation + EdgeDiagnosticResource result = await edgeDiagnostic.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 + EdgeDiagnosticData 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_DiagnosticsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 EdgeDiagnosticResource created on azure + // for more information of creating EdgeDiagnosticResource, please refer to the document of EdgeDiagnosticResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string diagnosticName = "testname"; + ResourceIdentifier edgeDiagnosticResourceId = EdgeDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, diagnosticName); + EdgeDiagnosticResource edgeDiagnostic = client.GetEdgeDiagnosticResource(edgeDiagnosticResourceId); + + // invoke the operation + await edgeDiagnostic.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DiagnosticsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 EdgeDiagnosticResource created on azure + // for more information of creating EdgeDiagnosticResource, please refer to the document of EdgeDiagnosticResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string diagnosticName = "testname"; + ResourceIdentifier edgeDiagnosticResourceId = EdgeDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, diagnosticName); + EdgeDiagnosticResource edgeDiagnostic = client.GetEdgeDiagnosticResource(edgeDiagnosticResourceId); + + // invoke the operation + EdgeDiagnosticPatch patch = new EdgeDiagnosticPatch + { + Properties = new EdgeDiagnosticPatchProperties(), + Tags = +{ +["key1922"] = "efraipifhmdfekwgunngrgvsc" +}, + }; + ArmOperation lro = await edgeDiagnostic.UpdateAsync(WaitUntil.Completed, patch); + EdgeDiagnosticResource 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 + EdgeDiagnosticData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaCollection.cs new file mode 100644 index 000000000000..9596c9c0d93f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaCollection.cs @@ -0,0 +1,200 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDynamicSchemaCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DynamicSchemasCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaResource + EdgeDynamicSchemaCollection collection = edgeSchema.GetEdgeDynamicSchemas(); + + // invoke the operation + string dynamicSchemaName = "testname"; + EdgeDynamicSchemaData data = new EdgeDynamicSchemaData + { + Properties = new EdgeDynamicSchemaProperties(), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dynamicSchemaName, data); + EdgeDynamicSchemaResource 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 + EdgeDynamicSchemaData 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_DynamicSchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaResource + EdgeDynamicSchemaCollection collection = edgeSchema.GetEdgeDynamicSchemas(); + + // invoke the operation + string dynamicSchemaName = "testname"; + EdgeDynamicSchemaResource result = await collection.GetAsync(dynamicSchemaName); + + // 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 + EdgeDynamicSchemaData 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_DynamicSchemasListBySchemaMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_ListBySchema_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_ListBySchema" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaResource + EdgeDynamicSchemaCollection collection = edgeSchema.GetEdgeDynamicSchemas(); + + // invoke the operation and iterate over the result + await foreach (EdgeDynamicSchemaResource 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 + EdgeDynamicSchemaData 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_DynamicSchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaResource + EdgeDynamicSchemaCollection collection = edgeSchema.GetEdgeDynamicSchemas(); + + // invoke the operation + string dynamicSchemaName = "testname"; + bool result = await collection.ExistsAsync(dynamicSchemaName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DynamicSchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaResource + EdgeDynamicSchemaCollection collection = edgeSchema.GetEdgeDynamicSchemas(); + + // invoke the operation + string dynamicSchemaName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(dynamicSchemaName); + EdgeDynamicSchemaResource 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 + EdgeDynamicSchemaData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaResource.cs new file mode 100644 index 000000000000..6cb655158b7c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaResource.cs @@ -0,0 +1,112 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDynamicSchemaResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DynamicSchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // invoke the operation + EdgeDynamicSchemaResource result = await edgeDynamicSchema.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 + EdgeDynamicSchemaData 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_DynamicSchemasDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // invoke the operation + await edgeDynamicSchema.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DynamicSchemasUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemas_Update_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchema_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // invoke the operation + EdgeDynamicSchemaData data = new EdgeDynamicSchemaData + { + Properties = new EdgeDynamicSchemaProperties(), + }; + EdgeDynamicSchemaResource result = await edgeDynamicSchema.UpdateAsync(data); + + // 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 + EdgeDynamicSchemaData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaVersionCollection.cs new file mode 100644 index 000000000000..48026f929cc2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaVersionCollection.cs @@ -0,0 +1,205 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDynamicSchemaVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DynamicSchemaVersionsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaVersionResource + EdgeDynamicSchemaVersionCollection collection = edgeDynamicSchema.GetEdgeDynamicSchemaVersions(); + + // invoke the operation + string dynamicSchemaVersionName = "1.0.0"; + EdgeDynamicSchemaVersionData data = new EdgeDynamicSchemaVersionData + { + Properties = new EdgeSchemaVersionProperties("uiaqdwsi"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dynamicSchemaVersionName, data); + EdgeDynamicSchemaVersionResource 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 + EdgeDynamicSchemaVersionData 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_DynamicSchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaVersionResource + EdgeDynamicSchemaVersionCollection collection = edgeDynamicSchema.GetEdgeDynamicSchemaVersions(); + + // invoke the operation + string dynamicSchemaVersionName = "1.0.0"; + EdgeDynamicSchemaVersionResource result = await collection.GetAsync(dynamicSchemaVersionName); + + // 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 + EdgeDynamicSchemaVersionData 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_DynamicSchemaVersionsListByDynamicSchemaMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_ListByDynamicSchema_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_ListByDynamicSchema" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaVersionResource + EdgeDynamicSchemaVersionCollection collection = edgeDynamicSchema.GetEdgeDynamicSchemaVersions(); + + // invoke the operation and iterate over the result + await foreach (EdgeDynamicSchemaVersionResource 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 + EdgeDynamicSchemaVersionData 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_DynamicSchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaVersionResource + EdgeDynamicSchemaVersionCollection collection = edgeDynamicSchema.GetEdgeDynamicSchemaVersions(); + + // invoke the operation + string dynamicSchemaVersionName = "1.0.0"; + bool result = await collection.ExistsAsync(dynamicSchemaVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DynamicSchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaResource created on azure + // for more information of creating EdgeDynamicSchemaResource, please refer to the document of EdgeDynamicSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + ResourceIdentifier edgeDynamicSchemaResourceId = EdgeDynamicSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName); + EdgeDynamicSchemaResource edgeDynamicSchema = client.GetEdgeDynamicSchemaResource(edgeDynamicSchemaResourceId); + + // get the collection of this EdgeDynamicSchemaVersionResource + EdgeDynamicSchemaVersionCollection collection = edgeDynamicSchema.GetEdgeDynamicSchemaVersions(); + + // invoke the operation + string dynamicSchemaVersionName = "1.0.0"; + NullableResponse response = await collection.GetIfExistsAsync(dynamicSchemaVersionName); + EdgeDynamicSchemaVersionResource 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 + EdgeDynamicSchemaVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaVersionResource.cs new file mode 100644 index 000000000000..716a2a827f6c --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeDynamicSchemaVersionResource.cs @@ -0,0 +1,115 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeDynamicSchemaVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DynamicSchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaVersionResource created on azure + // for more information of creating EdgeDynamicSchemaVersionResource, please refer to the document of EdgeDynamicSchemaVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + string dynamicSchemaVersionName = "1.0.0"; + ResourceIdentifier edgeDynamicSchemaVersionResourceId = EdgeDynamicSchemaVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + EdgeDynamicSchemaVersionResource edgeDynamicSchemaVersion = client.GetEdgeDynamicSchemaVersionResource(edgeDynamicSchemaVersionResourceId); + + // invoke the operation + EdgeDynamicSchemaVersionResource result = await edgeDynamicSchemaVersion.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 + EdgeDynamicSchemaVersionData 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_DynamicSchemaVersionsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaVersionResource created on azure + // for more information of creating EdgeDynamicSchemaVersionResource, please refer to the document of EdgeDynamicSchemaVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + string dynamicSchemaVersionName = "1.0.0"; + ResourceIdentifier edgeDynamicSchemaVersionResourceId = EdgeDynamicSchemaVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + EdgeDynamicSchemaVersionResource edgeDynamicSchemaVersion = client.GetEdgeDynamicSchemaVersionResource(edgeDynamicSchemaVersionResourceId); + + // invoke the operation + await edgeDynamicSchemaVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DynamicSchemaVersionsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/DynamicSchemaVersions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "DynamicSchemaVersion_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 EdgeDynamicSchemaVersionResource created on azure + // for more information of creating EdgeDynamicSchemaVersionResource, please refer to the document of EdgeDynamicSchemaVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string dynamicSchemaName = "testname"; + string dynamicSchemaVersionName = "1.0.0"; + ResourceIdentifier edgeDynamicSchemaVersionResourceId = EdgeDynamicSchemaVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, dynamicSchemaName, dynamicSchemaVersionName); + EdgeDynamicSchemaVersionResource edgeDynamicSchemaVersion = client.GetEdgeDynamicSchemaVersionResource(edgeDynamicSchemaVersionResourceId); + + // invoke the operation + EdgeDynamicSchemaVersionData data = new EdgeDynamicSchemaVersionData + { + Properties = new EdgeSchemaVersionProperties("muezi"), + }; + EdgeDynamicSchemaVersionResource result = await edgeDynamicSchemaVersion.UpdateAsync(data); + + // 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 + EdgeDynamicSchemaVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeExecutionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeExecutionCollection.cs new file mode 100644 index 000000000000..05c960317964 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeExecutionCollection.cs @@ -0,0 +1,218 @@ +// 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.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeExecutionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ExecutionsCreateOrUpdateMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // get the collection of this EdgeExecutionResource + EdgeExecutionCollection collection = edgeWorkflowVersion.GetEdgeExecutions(); + + // invoke the operation + string executionName = "abcde"; + EdgeExecutionData data = new EdgeExecutionData + { + Properties = new EdgeExecutionProperties("souenlqwltljsojdcbpc") + { + Specification = { }, + }, + ExtendedLocation = new ExtendedLocation + { + Name = "ugf", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, executionName, data); + EdgeExecutionResource 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 + EdgeExecutionData 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_ExecutionsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // get the collection of this EdgeExecutionResource + EdgeExecutionCollection collection = edgeWorkflowVersion.GetEdgeExecutions(); + + // invoke the operation + string executionName = "abcde"; + EdgeExecutionResource result = await collection.GetAsync(executionName); + + // 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 + EdgeExecutionData 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_ExecutionsListByWorkflowVersionMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_ListByWorkflowVersion_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_ListByWorkflowVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // get the collection of this EdgeExecutionResource + EdgeExecutionCollection collection = edgeWorkflowVersion.GetEdgeExecutions(); + + // invoke the operation and iterate over the result + await foreach (EdgeExecutionResource 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 + EdgeExecutionData 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_ExecutionsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // get the collection of this EdgeExecutionResource + EdgeExecutionCollection collection = edgeWorkflowVersion.GetEdgeExecutions(); + + // invoke the operation + string executionName = "abcde"; + bool result = await collection.ExistsAsync(executionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ExecutionsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // get the collection of this EdgeExecutionResource + EdgeExecutionCollection collection = edgeWorkflowVersion.GetEdgeExecutions(); + + // invoke the operation + string executionName = "abcde"; + NullableResponse response = await collection.GetIfExistsAsync(executionName); + EdgeExecutionResource 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 + EdgeExecutionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeExecutionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeExecutionResource.cs new file mode 100644 index 000000000000..7a58dd22d5e4 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeExecutionResource.cs @@ -0,0 +1,122 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeExecutionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExecutionsGetMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeExecutionResource created on azure + // for more information of creating EdgeExecutionResource, please refer to the document of EdgeExecutionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + string executionName = "abcde"; + ResourceIdentifier edgeExecutionResourceId = EdgeExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + EdgeExecutionResource edgeExecution = client.GetEdgeExecutionResource(edgeExecutionResourceId); + + // invoke the operation + EdgeExecutionResource result = await edgeExecution.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 + EdgeExecutionData 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_ExecutionsDeleteMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeExecutionResource created on azure + // for more information of creating EdgeExecutionResource, please refer to the document of EdgeExecutionResource + string subscriptionId = "EE6D9590-0D52-4B1C-935C-FE49DBF838EB"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + string executionName = "abcde"; + ResourceIdentifier edgeExecutionResourceId = EdgeExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + EdgeExecutionResource edgeExecution = client.GetEdgeExecutionResource(edgeExecutionResourceId); + + // invoke the operation + await edgeExecution.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ExecutionsUpdateMaximumSetGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-06-01/Executions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Execution_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 EdgeExecutionResource created on azure + // for more information of creating EdgeExecutionResource, please refer to the document of EdgeExecutionResource + string subscriptionId = "FFA229AF-C1A3-4CB6-9E5D-62C25CFBE4D0"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "abcde"; + string workflowName = "abcde"; + string versionName = "abcde"; + string executionName = "abcde"; + ResourceIdentifier edgeExecutionResourceId = EdgeExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName, executionName); + EdgeExecutionResource edgeExecution = client.GetEdgeExecutionResource(edgeExecutionResourceId); + + // invoke the operation + EdgeExecutionData data = new EdgeExecutionData + { + Properties = new EdgeExecutionProperties("xjsxzbfltzvbuvn") + { + Specification = { }, + }, + }; + ArmOperation lro = await edgeExecution.UpdateAsync(WaitUntil.Completed, data); + EdgeExecutionResource 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 + EdgeExecutionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeJobCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeJobCollection.cs new file mode 100644 index 000000000000..c38c79e08646 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeJobCollection.cs @@ -0,0 +1,132 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeJobCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_JobsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Jobs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Job_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); + + // get the collection of this EdgeJobResource + string resourceUri = "gt"; + EdgeJobCollection collection = client.GetEdgeJobs(new ResourceIdentifier(resourceUri)); + + // invoke the operation + string jobName = "jobsName"; + EdgeJobResource result = await collection.GetAsync(jobName); + + // 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 + EdgeJobData 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_JobsListByTargetMaximumSet() + { + // Generated from example definition: 2025-06-01/Jobs_ListByTarget_MaximumSet_Gen.json + // this example is just showing the usage of "Job_ListByTarget" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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); + + // get the collection of this EdgeJobResource + string resourceUri = "gt"; + EdgeJobCollection collection = client.GetEdgeJobs(new ResourceIdentifier(resourceUri)); + + // invoke the operation and iterate over the result + await foreach (EdgeJobResource 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 + EdgeJobData 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_JobsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Jobs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Job_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); + + // get the collection of this EdgeJobResource + string resourceUri = "gt"; + EdgeJobCollection collection = client.GetEdgeJobs(new ResourceIdentifier(resourceUri)); + + // invoke the operation + string jobName = "jobsName"; + bool result = await collection.ExistsAsync(jobName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_JobsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Jobs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Job_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); + + // get the collection of this EdgeJobResource + string resourceUri = "gt"; + EdgeJobCollection collection = client.GetEdgeJobs(new ResourceIdentifier(resourceUri)); + + // invoke the operation + string jobName = "jobsName"; + NullableResponse response = await collection.GetIfExistsAsync(jobName); + EdgeJobResource 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 + EdgeJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeJobResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeJobResource.cs new file mode 100644 index 000000000000..121c5a5d20ad --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeJobResource.cs @@ -0,0 +1,47 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeJobResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_JobsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Jobs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Job_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 EdgeJobResource created on azure + // for more information of creating EdgeJobResource, please refer to the document of EdgeJobResource + string resourceUri = "gt"; + string jobName = "jobsName"; + ResourceIdentifier edgeJobResourceId = EdgeJobResource.CreateResourceIdentifier(resourceUri, jobName); + EdgeJobResource edgeJob = client.GetEdgeJobResource(edgeJobResourceId); + + // invoke the operation + EdgeJobResource result = await edgeJob.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 + EdgeJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaCollection.cs new file mode 100644 index 000000000000..a2b59e0a7e3d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaCollection.cs @@ -0,0 +1,200 @@ +// 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 Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSchemaCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SchemasCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSchemaResource + EdgeSchemaCollection collection = resourceGroupResource.GetEdgeSchemas(); + + // invoke the operation + string schemaName = "testname"; + EdgeSchemaData data = new EdgeSchemaData(new AzureLocation("alvi")) + { + Properties = new EdgeSchemaProperties(), + Tags = +{ +["key7017"] = "rdynaxxagwjzubehiz" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schemaName, data); + EdgeSchemaResource 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 + EdgeSchemaData 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_SchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSchemaResource + EdgeSchemaCollection collection = resourceGroupResource.GetEdgeSchemas(); + + // invoke the operation + string schemaName = "testname"; + EdgeSchemaResource result = await collection.GetAsync(schemaName); + + // 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 + EdgeSchemaData 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_SchemasListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSchemaResource + EdgeSchemaCollection collection = resourceGroupResource.GetEdgeSchemas(); + + // invoke the operation and iterate over the result + await foreach (EdgeSchemaResource 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 + EdgeSchemaData 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_SchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSchemaResource + EdgeSchemaCollection collection = resourceGroupResource.GetEdgeSchemas(); + + // invoke the operation + string schemaName = "testname"; + bool result = await collection.ExistsAsync(schemaName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSchemaResource + EdgeSchemaCollection collection = resourceGroupResource.GetEdgeSchemas(); + + // invoke the operation + string schemaName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(schemaName); + EdgeSchemaResource 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 + EdgeSchemaData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaReferenceCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaReferenceCollection.cs new file mode 100644 index 000000000000..eb0aa4223426 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaReferenceCollection.cs @@ -0,0 +1,132 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSchemaReferenceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchemaReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaReference_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); + + // get the collection of this EdgeSchemaReferenceResource + string resourceUri = "jdvtghygpz"; + EdgeSchemaReferenceCollection collection = client.GetEdgeSchemaReferences(new ResourceIdentifier(resourceUri)); + + // invoke the operation + string schemaReferenceName = "testname"; + EdgeSchemaReferenceResource result = await collection.GetAsync(schemaReferenceName); + + // 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 + EdgeSchemaReferenceData 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_SchemaReferencesListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaReferences_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaReference_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); + + // get the collection of this EdgeSchemaReferenceResource + string resourceUri = "jdvtghygpz"; + EdgeSchemaReferenceCollection collection = client.GetEdgeSchemaReferences(new ResourceIdentifier(resourceUri)); + + // invoke the operation and iterate over the result + await foreach (EdgeSchemaReferenceResource 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 + EdgeSchemaReferenceData 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_SchemaReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaReference_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); + + // get the collection of this EdgeSchemaReferenceResource + string resourceUri = "jdvtghygpz"; + EdgeSchemaReferenceCollection collection = client.GetEdgeSchemaReferences(new ResourceIdentifier(resourceUri)); + + // invoke the operation + string schemaReferenceName = "testname"; + bool result = await collection.ExistsAsync(schemaReferenceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SchemaReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaReference_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); + + // get the collection of this EdgeSchemaReferenceResource + string resourceUri = "jdvtghygpz"; + EdgeSchemaReferenceCollection collection = client.GetEdgeSchemaReferences(new ResourceIdentifier(resourceUri)); + + // invoke the operation + string schemaReferenceName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(schemaReferenceName); + EdgeSchemaReferenceResource 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 + EdgeSchemaReferenceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaReferenceResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaReferenceResource.cs new file mode 100644 index 000000000000..b30808e1611e --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaReferenceResource.cs @@ -0,0 +1,47 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSchemaReferenceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchemaReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaReference_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 EdgeSchemaReferenceResource created on azure + // for more information of creating EdgeSchemaReferenceResource, please refer to the document of EdgeSchemaReferenceResource + string resourceUri = "jdvtghygpz"; + string schemaReferenceName = "testname"; + ResourceIdentifier edgeSchemaReferenceResourceId = EdgeSchemaReferenceResource.CreateResourceIdentifier(resourceUri, schemaReferenceName); + EdgeSchemaReferenceResource edgeSchemaReference = client.GetEdgeSchemaReferenceResource(edgeSchemaReferenceResourceId); + + // invoke the operation + EdgeSchemaReferenceResource result = await edgeSchemaReference.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 + EdgeSchemaReferenceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaResource.cs new file mode 100644 index 000000000000..0d54c37ebf7a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaResource.cs @@ -0,0 +1,179 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSchemaResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchemasGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // invoke the operation + EdgeSchemaResource result = await edgeSchema.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 + EdgeSchemaData 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_SchemasDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // invoke the operation + await edgeSchema.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SchemasUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // invoke the operation + EdgeSchemaPatch patch = new EdgeSchemaPatch + { + Properties = new EdgeSchemaPatchProperties(), + Tags = +{ +["key6760"] = "lknwkzihsmzbzkezkartwgsv" +}, + }; + EdgeSchemaResource result = await edgeSchema.UpdateAsync(patch); + + // 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 + EdgeSchemaData 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 CreateVersion_SchemasCreateVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_CreateVersion_MaximumSet_Gen.json + // this example is just showing the usage of "Schemas_CreateVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // invoke the operation + EdgeSchemaVersionWithUpdateType body = new EdgeSchemaVersionWithUpdateType(new EdgeSchemaVersionData + { + Properties = new EdgeSchemaVersionProperties("uiaqdwsi"), + }) + { + UpdateType = EdgeUpdateType.Major, + Version = "1.0.0", + }; + ArmOperation lro = await edgeSchema.CreateVersionAsync(WaitUntil.Completed, body); + EdgeSchemaVersionResource 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 + EdgeSchemaVersionData 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 RemoveVersion_SchemasRemoveVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_RemoveVersion_MaximumSet_Gen.json + // this example is just showing the usage of "Schemas_RemoveVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // invoke the operation + EdgeVersionContent content = new EdgeVersionContent("ghtvdzgmzncaifrnuumg"); + RemoveVersionResult result = await edgeSchema.RemoveVersionAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaVersionCollection.cs new file mode 100644 index 000000000000..72ba0221c51f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaVersionCollection.cs @@ -0,0 +1,200 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSchemaVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SchemaVersionsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeSchemaVersionResource + EdgeSchemaVersionCollection collection = edgeSchema.GetEdgeSchemaVersions(); + + // invoke the operation + string schemaVersionName = "1.0.0"; + EdgeSchemaVersionData data = new EdgeSchemaVersionData + { + Properties = new EdgeSchemaVersionProperties("uiaqdwsi"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schemaVersionName, data); + EdgeSchemaVersionResource 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 + EdgeSchemaVersionData 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_SchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeSchemaVersionResource + EdgeSchemaVersionCollection collection = edgeSchema.GetEdgeSchemaVersions(); + + // invoke the operation + string schemaVersionName = "1.0.0"; + EdgeSchemaVersionResource result = await collection.GetAsync(schemaVersionName); + + // 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 + EdgeSchemaVersionData 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_SchemaVersionsListBySchemaMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_ListBySchema_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_ListBySchema" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeSchemaVersionResource + EdgeSchemaVersionCollection collection = edgeSchema.GetEdgeSchemaVersions(); + + // invoke the operation and iterate over the result + await foreach (EdgeSchemaVersionResource 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 + EdgeSchemaVersionData 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_SchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeSchemaVersionResource + EdgeSchemaVersionCollection collection = edgeSchema.GetEdgeSchemaVersions(); + + // invoke the operation + string schemaVersionName = "1.0.0"; + bool result = await collection.ExistsAsync(schemaVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaResource created on azure + // for more information of creating EdgeSchemaResource, please refer to the document of EdgeSchemaResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + ResourceIdentifier edgeSchemaResourceId = EdgeSchemaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName); + EdgeSchemaResource edgeSchema = client.GetEdgeSchemaResource(edgeSchemaResourceId); + + // get the collection of this EdgeSchemaVersionResource + EdgeSchemaVersionCollection collection = edgeSchema.GetEdgeSchemaVersions(); + + // invoke the operation + string schemaVersionName = "1.0.0"; + NullableResponse response = await collection.GetIfExistsAsync(schemaVersionName); + EdgeSchemaVersionResource 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 + EdgeSchemaVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaVersionResource.cs new file mode 100644 index 000000000000..fb7cf0595bc2 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSchemaVersionResource.cs @@ -0,0 +1,112 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSchemaVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchemaVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaVersionResource created on azure + // for more information of creating EdgeSchemaVersionResource, please refer to the document of EdgeSchemaVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string schemaVersionName = "1.0.0"; + ResourceIdentifier edgeSchemaVersionResourceId = EdgeSchemaVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + EdgeSchemaVersionResource edgeSchemaVersion = client.GetEdgeSchemaVersionResource(edgeSchemaVersionResourceId); + + // invoke the operation + EdgeSchemaVersionResource result = await edgeSchemaVersion.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 + EdgeSchemaVersionData 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_SchemaVersionsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaVersionResource created on azure + // for more information of creating EdgeSchemaVersionResource, please refer to the document of EdgeSchemaVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string schemaVersionName = "1.0.0"; + ResourceIdentifier edgeSchemaVersionResourceId = EdgeSchemaVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + EdgeSchemaVersionResource edgeSchemaVersion = client.GetEdgeSchemaVersionResource(edgeSchemaVersionResourceId); + + // invoke the operation + await edgeSchemaVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SchemaVersionsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SchemaVersions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "SchemaVersion_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 EdgeSchemaVersionResource created on azure + // for more information of creating EdgeSchemaVersionResource, please refer to the document of EdgeSchemaVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string schemaName = "testname"; + string schemaVersionName = "1.0.0"; + ResourceIdentifier edgeSchemaVersionResourceId = EdgeSchemaVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schemaName, schemaVersionName); + EdgeSchemaVersionResource edgeSchemaVersion = client.GetEdgeSchemaVersionResource(edgeSchemaVersionResourceId); + + // invoke the operation + EdgeSchemaVersionData data = new EdgeSchemaVersionData + { + Properties = new EdgeSchemaVersionProperties("muezi"), + }; + EdgeSchemaVersionResource result = await edgeSchemaVersion.UpdateAsync(data); + + // 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 + EdgeSchemaVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSiteReferenceCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSiteReferenceCollection.cs new file mode 100644 index 000000000000..6b0c6bc483c6 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSiteReferenceCollection.cs @@ -0,0 +1,200 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSiteReferenceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SiteReferencesCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeSiteReferenceResource + EdgeSiteReferenceCollection collection = edgeContext.GetEdgeSiteReferences(); + + // invoke the operation + string siteReferenceName = "testname"; + EdgeSiteReferenceData data = new EdgeSiteReferenceData + { + Properties = new EdgeSiteReferenceProperties("xxjpxdcaumewwgpbwzkcrgrcw"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, siteReferenceName, data); + EdgeSiteReferenceResource 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 + EdgeSiteReferenceData 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_SiteReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeSiteReferenceResource + EdgeSiteReferenceCollection collection = edgeContext.GetEdgeSiteReferences(); + + // invoke the operation + string siteReferenceName = "testname"; + EdgeSiteReferenceResource result = await collection.GetAsync(siteReferenceName); + + // 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 + EdgeSiteReferenceData 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_SiteReferencesListByContextMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_ListByContext_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_ListByContext" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeSiteReferenceResource + EdgeSiteReferenceCollection collection = edgeContext.GetEdgeSiteReferences(); + + // invoke the operation and iterate over the result + await foreach (EdgeSiteReferenceResource 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 + EdgeSiteReferenceData 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_SiteReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeSiteReferenceResource + EdgeSiteReferenceCollection collection = edgeContext.GetEdgeSiteReferences(); + + // invoke the operation + string siteReferenceName = "testname"; + bool result = await collection.ExistsAsync(siteReferenceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SiteReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeSiteReferenceResource + EdgeSiteReferenceCollection collection = edgeContext.GetEdgeSiteReferences(); + + // invoke the operation + string siteReferenceName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(siteReferenceName); + EdgeSiteReferenceResource 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 + EdgeSiteReferenceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSiteReferenceResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSiteReferenceResource.cs new file mode 100644 index 000000000000..0a16c83fdf91 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSiteReferenceResource.cs @@ -0,0 +1,113 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSiteReferenceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SiteReferencesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeSiteReferenceResource created on azure + // for more information of creating EdgeSiteReferenceResource, please refer to the document of EdgeSiteReferenceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string siteReferenceName = "testname"; + ResourceIdentifier edgeSiteReferenceResourceId = EdgeSiteReferenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, siteReferenceName); + EdgeSiteReferenceResource edgeSiteReference = client.GetEdgeSiteReferenceResource(edgeSiteReferenceResourceId); + + // invoke the operation + EdgeSiteReferenceResource result = await edgeSiteReference.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 + EdgeSiteReferenceData 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_SiteReferencesDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeSiteReferenceResource created on azure + // for more information of creating EdgeSiteReferenceResource, please refer to the document of EdgeSiteReferenceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string siteReferenceName = "testname"; + ResourceIdentifier edgeSiteReferenceResourceId = EdgeSiteReferenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, siteReferenceName); + EdgeSiteReferenceResource edgeSiteReference = client.GetEdgeSiteReferenceResource(edgeSiteReferenceResourceId); + + // invoke the operation + await edgeSiteReference.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SiteReferencesUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SiteReferences_Update_MaximumSet_Gen.json + // this example is just showing the usage of "SiteReference_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 EdgeSiteReferenceResource created on azure + // for more information of creating EdgeSiteReferenceResource, please refer to the document of EdgeSiteReferenceResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string siteReferenceName = "testname"; + ResourceIdentifier edgeSiteReferenceResourceId = EdgeSiteReferenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, siteReferenceName); + EdgeSiteReferenceResource edgeSiteReference = client.GetEdgeSiteReferenceResource(edgeSiteReferenceResourceId); + + // invoke the operation + EdgeSiteReferenceData data = new EdgeSiteReferenceData + { + Properties = new EdgeSiteReferenceProperties("nwiuyaro"), + }; + ArmOperation lro = await edgeSiteReference.UpdateAsync(WaitUntil.Completed, data); + EdgeSiteReferenceResource 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 + EdgeSiteReferenceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionCollection.cs new file mode 100644 index 000000000000..91c75b6a3a07 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionCollection.cs @@ -0,0 +1,205 @@ +// 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.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SolutionsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // get the collection of this EdgeSolutionResource + EdgeSolutionCollection collection = edgeTarget.GetEdgeSolutions(); + + // invoke the operation + string solutionName = "testname"; + EdgeSolutionData data = new EdgeSolutionData + { + Properties = new EdgeSolutionProperties(), + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, solutionName, data); + EdgeSolutionResource 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 + EdgeSolutionData 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_SolutionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // get the collection of this EdgeSolutionResource + EdgeSolutionCollection collection = edgeTarget.GetEdgeSolutions(); + + // invoke the operation + string solutionName = "testname"; + EdgeSolutionResource result = await collection.GetAsync(solutionName); + + // 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 + EdgeSolutionData 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_SolutionsListByTargetMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_ListByTarget_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_ListByTarget" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // get the collection of this EdgeSolutionResource + EdgeSolutionCollection collection = edgeTarget.GetEdgeSolutions(); + + // invoke the operation and iterate over the result + await foreach (EdgeSolutionResource 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 + EdgeSolutionData 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_SolutionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // get the collection of this EdgeSolutionResource + EdgeSolutionCollection collection = edgeTarget.GetEdgeSolutions(); + + // invoke the operation + string solutionName = "testname"; + bool result = await collection.ExistsAsync(solutionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SolutionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // get the collection of this EdgeSolutionResource + EdgeSolutionCollection collection = edgeTarget.GetEdgeSolutions(); + + // invoke the operation + string solutionName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(solutionName); + EdgeSolutionResource 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 + EdgeSolutionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionResource.cs new file mode 100644 index 000000000000..03a7ef22a785 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionResource.cs @@ -0,0 +1,113 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SolutionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // invoke the operation + EdgeSolutionResource result = await edgeSolution.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 + EdgeSolutionData 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_SolutionsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // invoke the operation + await edgeSolution.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SolutionsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Solutions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Solution_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // invoke the operation + EdgeSolutionPatch patch = new EdgeSolutionPatch + { + Properties = new EdgeSolutionPatchProperties(), + }; + ArmOperation lro = await edgeSolution.UpdateAsync(WaitUntil.Completed, patch); + EdgeSolutionResource 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 + EdgeSolutionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateCollection.cs new file mode 100644 index 000000000000..62422c801024 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateCollection.cs @@ -0,0 +1,204 @@ +// 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 Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionTemplateCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SolutionTemplatesCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSolutionTemplateResource + EdgeSolutionTemplateCollection collection = resourceGroupResource.GetEdgeSolutionTemplates(); + + // invoke the operation + string solutionTemplateName = "testname"; + EdgeSolutionTemplateData data = new EdgeSolutionTemplateData(new AzureLocation("zheaaqvadewftnctxzpinrgeproqs")) + { + Properties = new EdgeSolutionTemplateProperties("psrftehgzngcdlccivhjmwsmiz", new string[] { "dfoyxbbknrhvlunhmuyyt" }) + { + State = EdgeResourceState.Active, + IsExternalValidationEnabled = true, + }, + Tags = +{ +["key5091"] = "dov" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, solutionTemplateName, data); + EdgeSolutionTemplateResource 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 + EdgeSolutionTemplateData 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_SolutionTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSolutionTemplateResource + EdgeSolutionTemplateCollection collection = resourceGroupResource.GetEdgeSolutionTemplates(); + + // invoke the operation + string solutionTemplateName = "testname"; + EdgeSolutionTemplateResource result = await collection.GetAsync(solutionTemplateName); + + // 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 + EdgeSolutionTemplateData 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_SolutionTemplatesListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSolutionTemplateResource + EdgeSolutionTemplateCollection collection = resourceGroupResource.GetEdgeSolutionTemplates(); + + // invoke the operation and iterate over the result + await foreach (EdgeSolutionTemplateResource 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 + EdgeSolutionTemplateData 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_SolutionTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSolutionTemplateResource + EdgeSolutionTemplateCollection collection = resourceGroupResource.GetEdgeSolutionTemplates(); + + // invoke the operation + string solutionTemplateName = "testname"; + bool result = await collection.ExistsAsync(solutionTemplateName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SolutionTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeSolutionTemplateResource + EdgeSolutionTemplateCollection collection = resourceGroupResource.GetEdgeSolutionTemplates(); + + // invoke the operation + string solutionTemplateName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(solutionTemplateName); + EdgeSolutionTemplateResource 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 + EdgeSolutionTemplateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateResource.cs new file mode 100644 index 000000000000..23786190a6db --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateResource.cs @@ -0,0 +1,189 @@ +// 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.Core; +using Azure.Identity; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionTemplateResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SolutionTemplatesGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // invoke the operation + EdgeSolutionTemplateResource result = await edgeSolutionTemplate.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 + EdgeSolutionTemplateData 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_SolutionTemplatesDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // invoke the operation + await edgeSolutionTemplate.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SolutionTemplatesUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_Update_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // invoke the operation + EdgeSolutionTemplatePatch patch = new EdgeSolutionTemplatePatch + { + Tags = +{ +["key8772"] = "vbdujmqklnwiepis" +}, + Properties = new EdgeSolutionTemplatePatchProperties + { + Description = "onqlteg", + Capabilities = { "relsv" }, + State = EdgeResourceState.Active, + IsExternalValidationEnabled = true, + }, + }; + EdgeSolutionTemplateResource result = await edgeSolutionTemplate.UpdateAsync(patch); + + // 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 + EdgeSolutionTemplateData 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 CreateVersion_SolutionTemplatesCreateVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_CreateVersion_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplates_CreateVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // invoke the operation + EdgeSolutionTemplateVersionWithUpdateType body = new EdgeSolutionTemplateVersionWithUpdateType(new EdgeSolutionTemplateVersionData + { + Properties = new EdgeSolutionTemplateVersionProperties("ofqcsavwmeuwmvtjnqpoybtjvkmrlh", new Dictionary()) + { + OrchestratorType = SolutionVersionOrchestratorType.TO, + }, + }) + { + UpdateType = EdgeUpdateType.Major, + Version = "1.0.0", + }; + ArmOperation lro = await edgeSolutionTemplate.CreateVersionAsync(WaitUntil.Completed, body); + EdgeSolutionTemplateVersionResource 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 + EdgeSolutionTemplateVersionData 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 RemoveVersion_SolutionTemplatesRemoveVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_RemoveVersion_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplates_RemoveVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // invoke the operation + EdgeVersionContent content = new EdgeVersionContent("ghtvdzgmzncaifrnuumg"); + await edgeSolutionTemplate.RemoveVersionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateVersionCollection.cs new file mode 100644 index 000000000000..22bf79d1d83a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateVersionCollection.cs @@ -0,0 +1,160 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionTemplateVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SolutionTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersion_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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // get the collection of this EdgeSolutionTemplateVersionResource + EdgeSolutionTemplateVersionCollection collection = edgeSolutionTemplate.GetEdgeSolutionTemplateVersions(); + + // invoke the operation + string solutionTemplateVersionName = "1.0.0"; + EdgeSolutionTemplateVersionResource result = await collection.GetAsync(solutionTemplateVersionName); + + // 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 + EdgeSolutionTemplateVersionData 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_SolutionTemplateVersionsListBySolutionTemplateMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_ListBySolutionTemplate_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersion_ListBySolutionTemplate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // get the collection of this EdgeSolutionTemplateVersionResource + EdgeSolutionTemplateVersionCollection collection = edgeSolutionTemplate.GetEdgeSolutionTemplateVersions(); + + // invoke the operation and iterate over the result + await foreach (EdgeSolutionTemplateVersionResource 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 + EdgeSolutionTemplateVersionData 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_SolutionTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersion_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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // get the collection of this EdgeSolutionTemplateVersionResource + EdgeSolutionTemplateVersionCollection collection = edgeSolutionTemplate.GetEdgeSolutionTemplateVersions(); + + // invoke the operation + string solutionTemplateVersionName = "1.0.0"; + bool result = await collection.ExistsAsync(solutionTemplateVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SolutionTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersion_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 EdgeSolutionTemplateResource created on azure + // for more information of creating EdgeSolutionTemplateResource, please refer to the document of EdgeSolutionTemplateResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + ResourceIdentifier edgeSolutionTemplateResourceId = EdgeSolutionTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName); + EdgeSolutionTemplateResource edgeSolutionTemplate = client.GetEdgeSolutionTemplateResource(edgeSolutionTemplateResourceId); + + // get the collection of this EdgeSolutionTemplateVersionResource + EdgeSolutionTemplateVersionCollection collection = edgeSolutionTemplate.GetEdgeSolutionTemplateVersions(); + + // invoke the operation + string solutionTemplateVersionName = "1.0.0"; + NullableResponse response = await collection.GetIfExistsAsync(solutionTemplateVersionName); + EdgeSolutionTemplateVersionResource 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 + EdgeSolutionTemplateVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateVersionResource.cs new file mode 100644 index 000000000000..bb7ffa47deb3 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionTemplateVersionResource.cs @@ -0,0 +1,127 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionTemplateVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SolutionTemplateVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersion_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 EdgeSolutionTemplateVersionResource created on azure + // for more information of creating EdgeSolutionTemplateVersionResource, please refer to the document of EdgeSolutionTemplateVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + string solutionTemplateVersionName = "1.0.0"; + ResourceIdentifier edgeSolutionTemplateVersionResourceId = EdgeSolutionTemplateVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName); + EdgeSolutionTemplateVersionResource edgeSolutionTemplateVersion = client.GetEdgeSolutionTemplateVersionResource(edgeSolutionTemplateVersionResourceId); + + // invoke the operation + EdgeSolutionTemplateVersionResource result = await edgeSolutionTemplateVersion.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 + EdgeSolutionTemplateVersionData 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 BulkDeploySolution_SolutionTemplateVersionsBulkDeploySolutionMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_BulkDeploySolution_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersions_BulkDeploySolution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionTemplateVersionResource created on azure + // for more information of creating EdgeSolutionTemplateVersionResource, please refer to the document of EdgeSolutionTemplateVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + string solutionTemplateVersionName = "1.0.0"; + ResourceIdentifier edgeSolutionTemplateVersionResourceId = EdgeSolutionTemplateVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName); + EdgeSolutionTemplateVersionResource edgeSolutionTemplateVersion = client.GetEdgeSolutionTemplateVersionResource(edgeSolutionTemplateVersionResourceId); + + // invoke the operation + BulkDeploySolutionContent content = new BulkDeploySolutionContent(new BulkDeployTargetDetails[] + { +new BulkDeployTargetDetails(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Edge/Targets/target/Solutions/solution/Versions/solution-1.0.0.1")) + }); + await edgeSolutionTemplateVersion.BulkDeploySolutionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task BulkPublishSolution_SolutionTemplateVersionsBulkPublishSolutionMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplateVersions_BulkPublishSolution_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplateVersions_BulkPublishSolution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionTemplateVersionResource created on azure + // for more information of creating EdgeSolutionTemplateVersionResource, please refer to the document of EdgeSolutionTemplateVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string solutionTemplateName = "testname"; + string solutionTemplateVersionName = "1.0.0"; + ResourceIdentifier edgeSolutionTemplateVersionResourceId = EdgeSolutionTemplateVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionTemplateName, solutionTemplateVersionName); + EdgeSolutionTemplateVersionResource edgeSolutionTemplateVersion = client.GetEdgeSolutionTemplateVersionResource(edgeSolutionTemplateVersionResourceId); + + // invoke the operation + BulkPublishSolutionContent content = new BulkPublishSolutionContent(new BulkPublishTargetDetails[] + { +new BulkPublishTargetDetails(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Edge/Targets/target")) +{ +SolutionInstanceName = "test-instance", +} + }) + { + SolutionInstanceName = "test-instance", + SolutionDependencies = {new EdgeSolutionDependencyContent +{ +SolutionVersionId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Edge/Targets/target/Solutions/solution/Versions/solution-1.0.0.1"), +SolutionTemplateId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Edge/SolutionTemplates/st"), +SolutionTemplateVersion = "1.0.0", +SolutionInstanceName = "test-instance", +TargetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Edge/Targets/target"), +Dependencies = {}, +}}, + }; + await edgeSolutionTemplateVersion.BulkPublishSolutionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionVersionCollection.cs new file mode 100644 index 000000000000..8db4211783cb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionVersionCollection.cs @@ -0,0 +1,211 @@ +// 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.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SolutionVersionsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeSolutionVersionResource + EdgeSolutionVersionCollection collection = edgeSolution.GetEdgeSolutionVersions(); + + // invoke the operation + string solutionVersionName = "testname"; + EdgeSolutionVersionData data = new EdgeSolutionVersionData + { + Properties = new EdgeSolutionVersionProperties(new Dictionary()), + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, solutionVersionName, data); + EdgeSolutionVersionResource 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 + EdgeSolutionVersionData 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_SolutionVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeSolutionVersionResource + EdgeSolutionVersionCollection collection = edgeSolution.GetEdgeSolutionVersions(); + + // invoke the operation + string solutionVersionName = "testname"; + EdgeSolutionVersionResource result = await collection.GetAsync(solutionVersionName); + + // 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 + EdgeSolutionVersionData 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_SolutionVersionsListBySolutionMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_ListBySolution_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_ListBySolution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeSolutionVersionResource + EdgeSolutionVersionCollection collection = edgeSolution.GetEdgeSolutionVersions(); + + // invoke the operation and iterate over the result + await foreach (EdgeSolutionVersionResource 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 + EdgeSolutionVersionData 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_SolutionVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeSolutionVersionResource + EdgeSolutionVersionCollection collection = edgeSolution.GetEdgeSolutionVersions(); + + // invoke the operation + string solutionVersionName = "testname"; + bool result = await collection.ExistsAsync(solutionVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SolutionVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionResource created on azure + // for more information of creating EdgeSolutionResource, please refer to the document of EdgeSolutionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + ResourceIdentifier edgeSolutionResourceId = EdgeSolutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName); + EdgeSolutionResource edgeSolution = client.GetEdgeSolutionResource(edgeSolutionResourceId); + + // get the collection of this EdgeSolutionVersionResource + EdgeSolutionVersionCollection collection = edgeSolution.GetEdgeSolutionVersions(); + + // invoke the operation + string solutionVersionName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(solutionVersionName); + EdgeSolutionVersionResource 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 + EdgeSolutionVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionVersionResource.cs new file mode 100644 index 000000000000..a24d8933a975 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeSolutionVersionResource.cs @@ -0,0 +1,117 @@ +// 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.Core; +using Azure.Identity; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeSolutionVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SolutionVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionVersionResource created on azure + // for more information of creating EdgeSolutionVersionResource, please refer to the document of EdgeSolutionVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string solutionVersionName = "testname"; + ResourceIdentifier edgeSolutionVersionResourceId = EdgeSolutionVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + EdgeSolutionVersionResource edgeSolutionVersion = client.GetEdgeSolutionVersionResource(edgeSolutionVersionResourceId); + + // invoke the operation + EdgeSolutionVersionResource result = await edgeSolutionVersion.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 + EdgeSolutionVersionData 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_SolutionVersionsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionVersionResource created on azure + // for more information of creating EdgeSolutionVersionResource, please refer to the document of EdgeSolutionVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string solutionVersionName = "testname"; + ResourceIdentifier edgeSolutionVersionResourceId = EdgeSolutionVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + EdgeSolutionVersionResource edgeSolutionVersion = client.GetEdgeSolutionVersionResource(edgeSolutionVersionResourceId); + + // invoke the operation + await edgeSolutionVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SolutionVersionsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionVersions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionVersion_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 EdgeSolutionVersionResource created on azure + // for more information of creating EdgeSolutionVersionResource, please refer to the document of EdgeSolutionVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + string solutionName = "testname"; + string solutionVersionName = "testname"; + ResourceIdentifier edgeSolutionVersionResourceId = EdgeSolutionVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName, solutionName, solutionVersionName); + EdgeSolutionVersionResource edgeSolutionVersion = client.GetEdgeSolutionVersionResource(edgeSolutionVersionResourceId); + + // invoke the operation + EdgeSolutionVersionData data = new EdgeSolutionVersionData + { + Properties = new EdgeSolutionVersionProperties(new Dictionary()), + }; + ArmOperation lro = await edgeSolutionVersion.UpdateAsync(WaitUntil.Completed, data); + EdgeSolutionVersionResource 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 + EdgeSolutionVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeTargetCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeTargetCollection.cs new file mode 100644 index 000000000000..ce931da9713f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeTargetCollection.cs @@ -0,0 +1,216 @@ +// 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.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeTargetCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TargetsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeTargetResource + EdgeTargetCollection collection = resourceGroupResource.GetEdgeTargets(); + + // invoke the operation + string targetName = "testname"; + EdgeTargetData data = new EdgeTargetData(new AzureLocation("kckloegmwsjgwtcl")) + { + Properties = new EdgeTargetProperties( + "riabrxtvhlmizyhffdpjeyhvw", + "qjlbshhqzfmwxvvynibkoi", + new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"), + new Dictionary(), + new string[] { "grjapghdidoao" }, + "octqptfirejhjfavlnfqeiikqx") + { + SolutionScope = "testname", + State = EdgeResourceState.Active, + }, + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + Tags = +{ +["key612"] = "vtqzrk" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, targetName, data); + EdgeTargetResource 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 + EdgeTargetData 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_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeTargetResource + EdgeTargetCollection collection = resourceGroupResource.GetEdgeTargets(); + + // invoke the operation + string targetName = "testname"; + EdgeTargetResource result = await collection.GetAsync(targetName); + + // 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 + EdgeTargetData 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_TargetsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeTargetResource + EdgeTargetCollection collection = resourceGroupResource.GetEdgeTargets(); + + // invoke the operation and iterate over the result + await foreach (EdgeTargetResource 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 + EdgeTargetData 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_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeTargetResource + EdgeTargetCollection collection = resourceGroupResource.GetEdgeTargets(); + + // invoke the operation + string targetName = "testname"; + bool result = await collection.ExistsAsync(targetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EdgeTargetResource + EdgeTargetCollection collection = resourceGroupResource.GetEdgeTargets(); + + // invoke the operation + string targetName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(targetName); + EdgeTargetResource 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 + EdgeTargetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeTargetResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeTargetResource.cs new file mode 100644 index 000000000000..938905e85eeb --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeTargetResource.cs @@ -0,0 +1,360 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeTargetResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + EdgeTargetResource result = await edgeTarget.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 + EdgeTargetData 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_TargetsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + bool? forceDelete = true; + await edgeTarget.DeleteAsync(WaitUntil.Completed, forceDelete: forceDelete); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_TargetsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + EdgeTargetPatch patch = new EdgeTargetPatch + { + Tags = +{ +["key8026"] = "yoosplotwgoquvpox" +}, + Properties = new EdgeTargetPatchProperties + { + Description = "yhnhdpznncdvncmnvoeohqjx", + DisplayName = "pguujtzjjvixgjitugybrefp", + ContextId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"), + TargetSpecification = { }, + Capabilities = { "dasqhyxfakivfzqb" }, + HierarchyLevel = "hfyntwxetgsmnucbjvvphtyxu", + SolutionScope = "testname", + State = EdgeResourceState.Active, + }, + }; + ArmOperation lro = await edgeTarget.UpdateAsync(WaitUntil.Completed, patch); + EdgeTargetResource 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 + EdgeTargetData 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 InstallSolution_TargetsInstallSolutionMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_InstallSolution_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_InstallSolution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + InstallSolutionContent content = new InstallSolutionContent(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}")); + await edgeTarget.InstallSolutionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task UninstallSolution_TargetsUninstallSolutionMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_UninstallSolution_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_UninstallSolution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + UninstallSolutionContent content = new UninstallSolutionContent(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}")) + { + SolutionInstanceName = "lzihiumrcxbolmkqktvtuqyhg", + }; + await edgeTarget.UninstallSolutionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RemoveRevision_TargetsRemoveRevisionMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_RemoveRevision_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_RemoveRevision" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + RemoveRevisionContent content = new RemoveRevisionContent(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"), "tomwmqybqomwkfaeukjneva"); + await edgeTarget.RemoveRevisionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ResolveConfiguration_TargetsResolveConfigurationMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_ResolveConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_ResolveConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + EdgeSolutionTemplateContent content = new EdgeSolutionTemplateContent(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/{resourceType}/{resourceName}")) + { + SolutionInstanceName = "testname", + SolutionDependencies = {new EdgeSolutionDependencyContent +{ +SolutionVersionId = new ResourceIdentifier("cydzqntmjlqtksbavjwteru"), +SolutionTemplateId = new ResourceIdentifier("liqauthxnscodbiwktwfwrrsg"), +SolutionTemplateVersion = "gordjasyxxrj", +SolutionInstanceName = "testname", +TargetId = new ResourceIdentifier("steadvphxtyhjokqicrtg"), +Dependencies = {}, +}}, + }; + ArmOperation lro = await edgeTarget.ResolveConfigurationAsync(WaitUntil.Completed, content); + ResolvedConfiguration result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ReviewSolutionVersion_TargetsReviewSolutionVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_ReviewSolutionVersion_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_ReviewSolutionVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + EdgeSolutionTemplateContent content = new EdgeSolutionTemplateContent(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/{resourceType}/{resourceName}")) + { + SolutionInstanceName = "testname", + SolutionDependencies = {new EdgeSolutionDependencyContent +{ +SolutionVersionId = new ResourceIdentifier("cydzqntmjlqtksbavjwteru"), +SolutionTemplateId = new ResourceIdentifier("liqauthxnscodbiwktwfwrrsg"), +SolutionTemplateVersion = "gordjasyxxrj", +SolutionInstanceName = "testname", +TargetId = new ResourceIdentifier("steadvphxtyhjokqicrtg"), +Dependencies = {}, +}}, + }; + ArmOperation lro = await edgeTarget.ReviewSolutionVersionAsync(WaitUntil.Completed, content); + EdgeSolutionVersionResource 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 + EdgeSolutionVersionData 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 PublishSolutionVersion_TargetsPublishSolutionVersionMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_PublishSolutionVersion_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_PublishSolutionVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + EdgeSolutionVersionContent content = new EdgeSolutionVersionContent(new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}")); + ArmOperation lro = await edgeTarget.PublishSolutionVersionAsync(WaitUntil.Completed, content); + EdgeSolutionVersionResource 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 + EdgeSolutionVersionData 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 UpdateExternalValidationStatus_TargetsUpdateExternalValidationStatusMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_UpdateExternalValidationStatus_MaximumSet_Gen.json + // this example is just showing the usage of "Targets_UpdateExternalValidationStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeTargetResource created on azure + // for more information of creating EdgeTargetResource, please refer to the document of EdgeTargetResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string targetName = "testname"; + ResourceIdentifier edgeTargetResourceId = EdgeTargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, targetName); + EdgeTargetResource edgeTarget = client.GetEdgeTargetResource(edgeTargetResourceId); + + // invoke the operation + UpdateExternalValidationStatusContent content = new UpdateExternalValidationStatusContent(new ResourceIdentifier("shntcsuwlmpehmuqkrbf"), "ivsjzwy", SolutionInstanceValidationStatus.Valid) + { + ErrorDetails = new ResponseError(null, null), + }; + ArmOperation lro = await edgeTarget.UpdateExternalValidationStatusAsync(WaitUntil.Completed, content); + EdgeSolutionVersionResource 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 + EdgeSolutionVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowCollection.cs new file mode 100644 index 000000000000..ce5ca414c2ac --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowCollection.cs @@ -0,0 +1,205 @@ +// 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.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeWorkflowCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_WorkflowsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeWorkflowResource + EdgeWorkflowCollection collection = edgeContext.GetEdgeWorkflows(); + + // invoke the operation + string workflowName = "testname"; + EdgeWorkflowData data = new EdgeWorkflowData + { + Properties = new EdgeWorkflowProperties(), + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workflowName, data); + EdgeWorkflowResource 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 + EdgeWorkflowData 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_WorkflowsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeWorkflowResource + EdgeWorkflowCollection collection = edgeContext.GetEdgeWorkflows(); + + // invoke the operation + string workflowName = "testname"; + EdgeWorkflowResource result = await collection.GetAsync(workflowName); + + // 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 + EdgeWorkflowData 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_WorkflowsListByContextMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_ListByContext_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_ListByContext" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeWorkflowResource + EdgeWorkflowCollection collection = edgeContext.GetEdgeWorkflows(); + + // invoke the operation and iterate over the result + await foreach (EdgeWorkflowResource 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 + EdgeWorkflowData 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_WorkflowsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeWorkflowResource + EdgeWorkflowCollection collection = edgeContext.GetEdgeWorkflows(); + + // invoke the operation + string workflowName = "testname"; + bool result = await collection.ExistsAsync(workflowName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WorkflowsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeContextResource created on azure + // for more information of creating EdgeContextResource, please refer to the document of EdgeContextResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + ResourceIdentifier edgeContextResourceId = EdgeContextResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName); + EdgeContextResource edgeContext = client.GetEdgeContextResource(edgeContextResourceId); + + // get the collection of this EdgeWorkflowResource + EdgeWorkflowCollection collection = edgeContext.GetEdgeWorkflows(); + + // invoke the operation + string workflowName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(workflowName); + EdgeWorkflowResource 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 + EdgeWorkflowData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowResource.cs new file mode 100644 index 000000000000..aed9bbdaebf8 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowResource.cs @@ -0,0 +1,113 @@ +// 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.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeWorkflowResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WorkflowsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // invoke the operation + EdgeWorkflowResource result = await edgeWorkflow.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 + EdgeWorkflowData 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_WorkflowsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // invoke the operation + await edgeWorkflow.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_WorkflowsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/Workflows_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Workflow_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // invoke the operation + EdgeWorkflowData data = new EdgeWorkflowData + { + Properties = new EdgeWorkflowProperties(), + }; + ArmOperation lro = await edgeWorkflow.UpdateAsync(WaitUntil.Completed, data); + EdgeWorkflowResource 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 + EdgeWorkflowData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowVersionCollection.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowVersionCollection.cs new file mode 100644 index 000000000000..27e7f7b8ab4d --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowVersionCollection.cs @@ -0,0 +1,233 @@ +// 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.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeWorkflowVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_WorkflowVersionsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // get the collection of this EdgeWorkflowVersionResource + EdgeWorkflowVersionCollection collection = edgeWorkflow.GetEdgeWorkflowVersions(); + + // invoke the operation + string versionName = "testname"; + EdgeWorkflowVersionData data = new EdgeWorkflowVersionData + { + Properties = new EdgeWorkflowVersionProperties(new EdgeWorkflowStageSpec[] + { +new EdgeWorkflowStageSpec("amrbjd") +{ +Specification = {}, +Tasks = {new EdgeWorkflowTaskSpec("xxmeyvmgydbcwxqwjhadjxjod", new Dictionary()) +{ +TargetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"), +}}, +TaskOption = new EdgeWorkflowTaskConfig +{ +Concurrency = 3, +ErrorAction = new TaskErrorAction +{ +Mode = TaskErrorActionModeType.StopOnAnyFailure, +MaxToleratedFailures = 0, +}, +}, +} + }) + { + Specification = { }, + }, + ExtendedLocation = new ExtendedLocation + { + Name = "szjrwimeqyiue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, versionName, data); + EdgeWorkflowVersionResource 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 + EdgeWorkflowVersionData 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_WorkflowVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // get the collection of this EdgeWorkflowVersionResource + EdgeWorkflowVersionCollection collection = edgeWorkflow.GetEdgeWorkflowVersions(); + + // invoke the operation + string versionName = "testname"; + EdgeWorkflowVersionResource result = await collection.GetAsync(versionName); + + // 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 + EdgeWorkflowVersionData 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_WorkflowVersionsListByWorkflowMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_ListByWorkflow_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_ListByWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // get the collection of this EdgeWorkflowVersionResource + EdgeWorkflowVersionCollection collection = edgeWorkflow.GetEdgeWorkflowVersions(); + + // invoke the operation and iterate over the result + await foreach (EdgeWorkflowVersionResource 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 + EdgeWorkflowVersionData 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_WorkflowVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // get the collection of this EdgeWorkflowVersionResource + EdgeWorkflowVersionCollection collection = edgeWorkflow.GetEdgeWorkflowVersions(); + + // invoke the operation + string versionName = "testname"; + bool result = await collection.ExistsAsync(versionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WorkflowVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowResource created on azure + // for more information of creating EdgeWorkflowResource, please refer to the document of EdgeWorkflowResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + ResourceIdentifier edgeWorkflowResourceId = EdgeWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName); + EdgeWorkflowResource edgeWorkflow = client.GetEdgeWorkflowResource(edgeWorkflowResourceId); + + // get the collection of this EdgeWorkflowVersionResource + EdgeWorkflowVersionCollection collection = edgeWorkflow.GetEdgeWorkflowVersions(); + + // invoke the operation + string versionName = "testname"; + NullableResponse response = await collection.GetIfExistsAsync(versionName); + EdgeWorkflowVersionResource 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 + EdgeWorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowVersionResource.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowVersionResource.cs new file mode 100644 index 000000000000..f56787a9d36a --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_EdgeWorkflowVersionResource.cs @@ -0,0 +1,139 @@ +// 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.Core; +using Azure.Identity; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Samples +{ + public partial class Sample_EdgeWorkflowVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WorkflowVersionsGetMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + string versionName = "testname"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // invoke the operation + EdgeWorkflowVersionResource result = await edgeWorkflowVersion.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 + EdgeWorkflowVersionData 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_WorkflowVersionsDeleteMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + string versionName = "testname"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // invoke the operation + await edgeWorkflowVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_WorkflowVersionsUpdateMaximumSet() + { + // Generated from example definition: 2025-06-01/WorkflowVersions_Update_MaximumSet_Gen.json + // this example is just showing the usage of "WorkflowVersion_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 EdgeWorkflowVersionResource created on azure + // for more information of creating EdgeWorkflowVersionResource, please refer to the document of EdgeWorkflowVersionResource + string subscriptionId = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + string resourceGroupName = "rgconfigurationmanager"; + string contextName = "testname"; + string workflowName = "testname"; + string versionName = "testname"; + ResourceIdentifier edgeWorkflowVersionResourceId = EdgeWorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, contextName, workflowName, versionName); + EdgeWorkflowVersionResource edgeWorkflowVersion = client.GetEdgeWorkflowVersionResource(edgeWorkflowVersionResourceId); + + // invoke the operation + EdgeWorkflowVersionData data = new EdgeWorkflowVersionData + { + Properties = new EdgeWorkflowVersionProperties(new EdgeWorkflowStageSpec[] + { +new EdgeWorkflowStageSpec("amrbjd") +{ +Specification = {}, +Tasks = {new EdgeWorkflowTaskSpec("xxmeyvmgydbcwxqwjhadjxjod", new Dictionary()) +{ +TargetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"), +}}, +TaskOption = new EdgeWorkflowTaskConfig +{ +Concurrency = 3, +ErrorAction = new TaskErrorAction +{ +Mode = TaskErrorActionModeType.StopOnAnyFailure, +MaxToleratedFailures = 0, +}, +}, +} + }) + { + Specification = { }, + }, + }; + ArmOperation lro = await edgeWorkflowVersion.UpdateAsync(WaitUntil.Completed, data); + EdgeWorkflowVersionResource 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 + EdgeWorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..1dff32113f85 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,205 @@ +// 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.WorkloadOrchestration.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetEdgeSchemas_SchemasListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-06-01/Schemas_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "Schema_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EdgeSchemaResource item in subscriptionResource.GetEdgeSchemasAsync()) + { + // 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 + EdgeSchemaData 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 GetEdgeTargets_TargetsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-06-01/Targets_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "Target_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EdgeTargetResource item in subscriptionResource.GetEdgeTargetsAsync()) + { + // 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 + EdgeTargetData 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 GetEdgeSolutionTemplates_SolutionTemplatesListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-06-01/SolutionTemplates_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "SolutionTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EdgeSolutionTemplateResource item in subscriptionResource.GetEdgeSolutionTemplatesAsync()) + { + // 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 + EdgeSolutionTemplateData 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 GetEdgeConfigTemplates_ConfigTemplatesListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-06-01/ConfigTemplates_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "ConfigTemplate_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EdgeConfigTemplateResource item in subscriptionResource.GetEdgeConfigTemplatesAsync()) + { + // 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 + EdgeConfigTemplateData 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 GetEdgeDiagnostics_DiagnosticsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-06-01/Diagnostics_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "Diagnostic_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EdgeDiagnosticResource item in subscriptionResource.GetEdgeDiagnosticsAsync()) + { + // 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 + EdgeDiagnosticData 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 GetEdgeContexts_ContextsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-06-01/Contexts_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "Context_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 = "9D54FE4C-00AF-4836-8F48-B6A9C4E47192"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EdgeContextResource item in subscriptionResource.GetEdgeContextsAsync()) + { + // 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 + EdgeContextData 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/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/InformaticaDataManagementManagementTestBase.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/InformaticaDataManagementManagementTestBase.cs new file mode 100644 index 000000000000..bdbb09e43583 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/InformaticaDataManagementManagementTestBase.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.WorkloadOrchestration.Tests +{ + public class InformaticaDataManagementManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected InformaticaDataManagementManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected InformaticaDataManagementManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/InformaticaDataManagementManagementTestEnvironment.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/InformaticaDataManagementManagementTestEnvironment.cs new file mode 100644 index 000000000000..239c60713a6f --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/InformaticaDataManagementManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Tests +{ + public class InformaticaDataManagementManagementTestEnvironment : TestEnvironment + { + } +} \ No newline at end of file diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Scenario/WorkloadOrchestrationScenarioTests.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Scenario/WorkloadOrchestrationScenarioTests.cs new file mode 100644 index 000000000000..1daf012467d5 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/Scenario/WorkloadOrchestrationScenarioTests.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.WorkloadOrchestration.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Tests +{ + public class WorkloadOrchestrationScenarioTests : WorkloadOrchestrationTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag indicating whether the test should run asynchronously. + /// The recording mode for the test. If null, uses the default mode. + public WorkloadOrchestrationScenarioTests(bool isAsync) : base(isAsync) + { + } + + public static IEnumerable TestData => new[] { new object[] { false }, new object[] { true } }; + + [Test] + [RecordedTest] + public async Task Schema_LifecycleAsync() + { + string schemaName = Recording.GenerateAssetName("schema88"); + string schemaVersionName = Recording.GenerateAssetName("1.0.0"); + + // Get client and resource group from test base + ArmClient client = GetArmClient(); + ResourceGroupResource resourceGroupResource = GetResourceGroup(); + + // Get schema collection and create new schema + EdgeSchemaCollection collection = resourceGroupResource.GetEdgeSchemas(); + EdgeSchemaData data = new EdgeSchemaData(new AzureLocation("eastus2euap")) + { + Properties = new EdgeSchemaProperties() + }; + + // Create the schema + ArmOperation createOperation = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schemaName, data); + EdgeSchemaResource createdSchema = createOperation.Value; + Assert.NotNull(createdSchema, "Created schema should not be null"); + Assert.That(createdSchema.Data.Name, Is.EqualTo(schemaName)); + + // Get the schema and verify + EdgeSchemaResource retrievedSchema = await collection.GetAsync(schemaName); + Assert.NotNull(retrievedSchema, "Retrieved schema should not be null"); + Assert.That(retrievedSchema.Data.Name, Is.EqualTo(schemaName)); + Assert.That(retrievedSchema.Data.Id, Is.EqualTo(createdSchema.Data.Id)); + + // Now create a version for this schema + EdgeSchemaVersionCollection versionCollection = retrievedSchema.GetEdgeSchemaVersions(); + + EdgeSchemaVersionData versionData = new EdgeSchemaVersionData + { + Properties = new EdgeSchemaVersionProperties( +"rules:\r\n configs:\r\n ErrorThreshold:\r\n type: float\r\n required: true\r\n editableAt:\r\n - factory\r\n editableBy:\r\n - OT\r\n HealthCheckEndpoint:\r\n type: string\r\n required: false\r\n editableAt:\r\n - line\r\n editableBy:\r\n - OT\r\n EnableLocalLog:\r\n type: boolean\r\n required: true\r\n editableAt:\r\n - line\r\n editableBy:\r\n - OT\r\n AgentEndpoint:\r\n type: string\r\n required: true\r\n editableAt:\r\n - line\r\n editableBy:\r\n - OT\r\n HealthCheckEnabled:\r\n type: boolean\r\n required: false\r\n editableAt:\r\n - line\r\n editableBy:\r\n - OT\r\n ApplicationEndpoint:\r\n type: string\r\n required: true\r\n editableAt:\r\n - line\r\n editableBy:\r\n - OT\r\n TemperatureRangeMax:\r\n type: float\r\n required: true\r\n editableAt:\r\n - line\r\n editableBy:\r\n - OT\r\n" + ) + }; + + // Create the schema version + ArmOperation createVersionOperation = await versionCollection.CreateOrUpdateAsync(WaitUntil.Completed, schemaVersionName, versionData); + EdgeSchemaVersionResource createdVersion = createVersionOperation.Value; + Assert.NotNull(createdVersion, "Created schema version should not be null"); + Assert.That(createdVersion.Data.Name, Is.EqualTo(schemaVersionName)); + } + } +} \ No newline at end of file diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/WorkloadOrchestrationTestBase.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/WorkloadOrchestrationTestBase.cs new file mode 100644 index 000000000000..d9329763e809 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/WorkloadOrchestrationTestBase.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.WorkloadOrchestration.Tests +{ + public class WorkloadOrchestrationTestBase : RecordedTestBase + { + public WorkloadOrchestrationTestBase(bool isAsync) : base(isAsync) + { + } + + protected ArmClient GetArmClient() + { + var options = new ArmClientOptions(); + InstrumentClientOptions(options); + return new ArmClient(TestEnvironment.Credential, null, options); + } + + protected ResourceGroupResource GetResourceGroup() + { + var subscriptionId = "973d15c6-6c57-447e-b9c6-6d79b5b784ab"; // Use the subscription ID from your test environment + var rgName = "audapurerg"; + var resourceGroupId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, rgName); + return GetArmClient().GetResourceGroupResource(resourceGroupId); + } + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/WorkloadOrchestrationTestEnvironment.cs b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/WorkloadOrchestrationTestEnvironment.cs new file mode 100644 index 000000000000..50bd1e5a27bd --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tests/WorkloadOrchestrationTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.WorkloadOrchestration.Tests +{ + public class WorkloadOrchestrationTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tsp-location.yaml b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tsp-location.yaml new file mode 100644 index 000000000000..8585cb01b400 --- /dev/null +++ b/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/edge/Microsoft.Edge.ConfigurationManager.Management +commit: 229dfd2b11c491c4c48a738d8f16a2629957225a +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/workloadorchestration/ci.mgmt.yml b/sdk/workloadorchestration/ci.mgmt.yml new file mode 100644 index 000000000000..2a47e7c62a1f --- /dev/null +++ b/sdk/workloadorchestration/ci.mgmt.yml @@ -0,0 +1,24 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadorchestration/ci.mgmt.yml + - sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: workloadorchestration + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.WorkloadOrchestration + safeName: AzureResourceManagerWorkloadOrchestration diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tsp-location.yaml b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tsp-location.yaml index a53ddf3a0e7c..6f6e1c162f84 100644 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tsp-location.yaml +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/workloads/Workloads.SAPVirtualInstance.Management -commit: ada20fa9d6dcc6453f04f32d20fe3cf97293aa88 +commit: a3f8a42ba3d15b424ffd19ba1e3e4a61a1ba38c5 repo: Azure/azure-rest-api-specs \ No newline at end of file